TAF.Infra.TestKit
1.0.0
dotnet add package TAF.Infra.TestKit --version 1.0.0
NuGet\Install-Package TAF.Infra.TestKit -Version 1.0.0
<PackageReference Include="TAF.Infra.TestKit" Version="1.0.0" />
<PackageVersion Include="TAF.Infra.TestKit" Version="1.0.0" />
<PackageReference Include="TAF.Infra.TestKit" />
paket add TAF.Infra.TestKit --version 1.0.0
#r "nuget: TAF.Infra.TestKit, 1.0.0"
#:package TAF.Infra.TestKit@1.0.0
#addin nuget:?package=TAF.Infra.TestKit&version=1.0.0
#tool nuget:?package=TAF.Infra.TestKit&version=1.0.0
TAF.Infra.TestKit
Phase-1 (no-DB) unit-test foundation shared by every TAF service's *.UnitTests project.
What's in it
| Area | Type | Purpose |
|---|---|---|
Context/ |
BusContextBuilder |
Fluent BusContext (TenantId / AppId / UserId / EnvironmentId / CorrelationId) with deterministic defaults. |
Builders/ |
AppObjectBuilder, FieldBuilder |
In-memory AppObject / FieldDefinition metadata (types live in TAF.Infra.Contract.Models). |
Assertions/ |
OperationResultAssertions |
ShouldBeSuccess / ShouldBeFailure / ShouldBeFailureWithCode over the OperationResult pattern. |
Fakes/ |
BusFakes |
NSubstitute fakes for ICommandBus / IQueryBus. |
TestIds |
static | Single source of deterministic Guids used by the builders. |
Test stack (Phase 1)
xUnit · AwesomeAssertions (not FluentAssertions) · NSubstitute (not Moq) · Bogus · coverlet.collector. No DB / HTTP / Testcontainers / Respawn / WebApplicationFactory — those are deferred to an integration phase.
Distribution & consumption
TAF.Infra.TestKit is packaged as a NuGet package (like every other TAF.Infra.* library) and
referenced by service test projects via <PackageReference Include="TAF.Infra.TestKit" Version="1.0.0" />.
AwesomeAssertions / NSubstitute / Bogus flow transitively, so a consuming *.UnitTests project only needs
this package plus xUnit + the test SDK + coverlet.
Why not domain (e.g. permission) builders here? taf_infra cannot reference service-owned domain types (that would invert the Clean-Architecture dependency flow). Service-specific builders/assertions (e.g.
PermissionBuilder,AssertAllows/AssertDenies/AssertScopefor the identity bitwise model) live in that service's own test project.
Central package management & coverage
Each service repo carries a tests/Directory.Packages.props (CPM versions) and tests/Directory.Build.props
(coverlet collector + coverage exclusions) scoped to the tests/ folder, so production projects — which use
inline package versions — are never forced under CPM.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- AwesomeAssertions (>= 9.0.0)
- Bogus (>= 35.6.1)
- NSubstitute (>= 5.3.0)
- TAF.Infra.Contract (>= 1.11.5)
- TAF.Infra.MassTransit (>= 2.2.16)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 361 | 6/22/2026 |