![]() |
VOOZH | about |
dotnet add package Rig.TUnit.Core --version 0.1.0-beta.2
NuGet\Install-Package Rig.TUnit.Core -Version 0.1.0-beta.2
<PackageReference Include="Rig.TUnit.Core" Version="0.1.0-beta.2" />
<PackageVersion Include="Rig.TUnit.Core" Version="0.1.0-beta.2" />Directory.Packages.props
<PackageReference Include="Rig.TUnit.Core" />Project file
paket add Rig.TUnit.Core --version 0.1.0-beta.2
#r "nuget: Rig.TUnit.Core, 0.1.0-beta.2"
#:package Rig.TUnit.Core@0.1.0-beta.2
#addin nuget:?package=Rig.TUnit.Core&version=0.1.0-beta.2&prereleaseInstall as a Cake Addin
#tool nuget:?package=Rig.TUnit.Core&version=0.1.0-beta.2&prereleaseInstall as a Cake Tool
The heart of Rig.TUnit —
RigBuilderCRTP,IsolationKey, and theFixtureOptionsbase contract every provider builds on.
The foundation layer. Every provider (Postgres, Redis, Kafka, Cosmos, …)
derives from RigBuilder<TSelf> via the curiously-recurring template
pattern so Use{Provider}(…) extension chains return strongly-typed builders
without erasing state. IsolationKey.FromExecutionContext() reads the
ambient TUnit test-context and produces a deterministic
feature/class/method/iteration identifier that provider fixtures thread
into container names, schema names, queue names — anywhere per-test naming
matters.
If you are reading one README in this repo, read this one — everything else specialises what happens here.
Rig.TUnit.* provider — derive your builder from
RigBuilder<TSelf>.IsolationKey but no container.Options class — every one of them has a
public const string SectionName convention inherited from this package.Microsoft.Extensions.DependencyInjection.Abstractions and
Microsoft.Extensions.Options.using Rig.TUnit.Core.Builder;
using Rig.TUnit.Core.Helpers;
var isolation = IsolationKey.FromExecutionContext();
var rig = new RigBuilder()
.WithIsolation(isolation)
.Build();
await using var _ = rig;
| Property | Type | Default | Description |
|---|---|---|---|
TimeProvider |
TimeProvider |
TimeProvider.System |
Injected clock; override in tests to freeze time. |
DefaultCancellationTimeout |
TimeSpan |
30s |
Auto-cancel token used by async helpers. |
Rig.TUnit.Core.Builder.RigBuilder / RigBuilder<TSelf> — CRTP rootRig.TUnit.Core.Helpers.IsolationKey — per-test namingRig.TUnit.Core.Configuration.TestConfigurationBuilder — options bindingRig.TUnit.Core.Fixtures.IRigFixture — the disposable fixture contractRig.TUnit.Core.Fakers.* — Bogus Faker<T> presetsIsolationKey.FromExecutionContext() returns a short, filesystem-safe
identifier of the form fixture_ABCD1234 derived from the TUnit
TestContext.TestDetails (class + method + iteration). Every provider
fixture appends this to container / schema / queue names.
Core level — new RigBuilder() is O(µs).IsolationKey.FromExecutionContext() is a single SHA256 over the
test-context tuple, memoised per AsyncLocal flow.IsolationKey.FromExecutionContext() returns same value in two tests —
confirm you are inside a TUnit test method, not a static constructor or
module initialiser.FixtureOptions.ValidateOnStart() fails — the bound configuration
section is missing a [Required] property; the error message names it.See .
IsolationKey includes the test iteration index when you use TUnit's
[Repeat] / [Arguments] attributes — critical when the same method runs
N times against parallel fixtures.RigBuilder uses CRTP, not interface-default-methods, because TUnit's
source-generator-driven discovery historically struggled with
interface-default method disambiguation (ADR-002).See
and ;
baseline numbers are tracked 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 5 NuGet packages that depend on Rig.TUnit.Core:
| Package | Downloads |
|---|---|
|
Rig.TUnit.Databases
Family base for database fixtures - shared abstractions consumed by both SQL and NoSQL leaf packages. |
|
|
Rig.TUnit.Messaging
Messaging family base - EventSenderBase, ListenerBase, unified SendContext (SessionKey, PartitionKey, DeduplicationKey), and ITopologyBuilder consumed by every messaging leaf package. |
|
|
Rig.TUnit.WebAPI
TUnit fixture for ASP.NET Core Web APIs - WebApplicationFactory-style host, OpenAPI drift assertions, and per-test client isolation. |
|
|
Rig.TUnit.HealthChecks
TUnit fixture for ASP.NET Core health-check assertions - liveness/readiness lifecycle and degraded-state simulation. |
|
|
Rig.TUnit.Grpc
TUnit fixture for gRPC clients and servers - channel reconnection, deadline assertion, streaming helpers. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-beta.2 | 151 | 4/27/2026 |
| 0.0.0-alpha.0.14 | 149 | 4/26/2026 |