![]() |
VOOZH | about |
dotnet add package Rig.TUnit.Microservices.Contracts --version 0.1.0-beta.2
NuGet\Install-Package Rig.TUnit.Microservices.Contracts -Version 0.1.0-beta.2
<PackageReference Include="Rig.TUnit.Microservices.Contracts" Version="0.1.0-beta.2" />
<PackageVersion Include="Rig.TUnit.Microservices.Contracts" Version="0.1.0-beta.2" />Directory.Packages.props
<PackageReference Include="Rig.TUnit.Microservices.Contracts" />Project file
paket add Rig.TUnit.Microservices.Contracts --version 0.1.0-beta.2
#r "nuget: Rig.TUnit.Microservices.Contracts, 0.1.0-beta.2"
#:package Rig.TUnit.Microservices.Contracts@0.1.0-beta.2
#addin nuget:?package=Rig.TUnit.Microservices.Contracts&version=0.1.0-beta.2&prereleaseInstall as a Cake Addin
#tool nuget:?package=Rig.TUnit.Microservices.Contracts&version=0.1.0-beta.2&prereleaseInstall as a Cake Tool
Pact-style contract-test harness:
ContractPact+ContractInteraction+ builders that replay consumer expectations against a provider host.
A lightweight in-process alternative to Pact.Net. A ContractPact captures
the set of HTTP or gRPC interactions a consumer expects; the harness replays
them against the provider's actual WebApplicationFactory host and verifies
every response matches the expectation. Shipped as a family-level contract
(ADR-005) so every microservice in the estate has the same verifier surface.
It does not broker files with a remote Pact Broker — the assumption is that contracts are versioned alongside the consumer code in a shared package.
.contract.json.Rig.TUnit.Http for building interactions.using Rig.TUnit.Microservices.Contracts;
var pact = new ContractPact(
consumer: "orders-web",
provider: "orders-api",
interactions: Array.Empty<ContractInteraction>());
// Verify against the running provider fixture.
await pact.VerifyAsync(providerBaseUri: new Uri("http://localhost:5097"));
| Property | Type | Default | Description |
|---|---|---|---|
StrictMatching |
bool |
true |
Reject responses with unexpected extra fields. |
TimeoutPerInteraction |
TimeSpan |
10s |
Per-replay HTTP timeout. |
CaseSensitiveHeaders |
bool |
false |
Off-by-default per HTTP spec. |
Rig.TUnit.Microservices.Contracts.ContractPactRig.TUnit.Microservices.Contracts.ContractInteractionRig.TUnit.Microservices.Contracts.Helpers.PactFileReader / PactFileWriterEach ContractPact is a value-type recording; verification runs against the
provider-supplied base URI. No shared state.
HttpClient).ExtraField(s) present in response — set
StrictMatching = false if the extra field is a deliberate backward-
compatible addition.ContractInteraction.Request.Body is null after read — call
ContractInteraction.ReadBodyAsync() before asserting; the raw stream is
read lazily.See .
See ;
baseline in benchmarks/baseline-005.json.
MIT. See .
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 2 NuGet packages that depend on Rig.TUnit.Microservices.Contracts:
| Package | Downloads |
|---|---|
|
Rig.TUnit.All
Meta-package containing every Rig.TUnit.* package. DISCOURAGED — prefer per-feature or per-stack meta-packages (Rig.TUnit, Rig.TUnit.Microservices). |
|
|
Rig.TUnit.Microservices
Meta-package: Core + Mediator + Grpc + Outbox + Tracing + Jwt + Seq — the opinionated microservice testing kit. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-beta.2 | 67 | 4/27/2026 |
| 0.0.0-alpha.0.14 | 70 | 4/26/2026 |