Rig.TUnit.Databases.NoSql
0.1.0-beta.2
dotnet add package Rig.TUnit.Databases.NoSql --version 0.1.0-beta.2
NuGet\Install-Package Rig.TUnit.Databases.NoSql -Version 0.1.0-beta.2
<PackageReference Include="Rig.TUnit.Databases.NoSql" Version="0.1.0-beta.2" />
<PackageVersion Include="Rig.TUnit.Databases.NoSql" Version="0.1.0-beta.2" />
<PackageReference Include="Rig.TUnit.Databases.NoSql" />
paket add Rig.TUnit.Databases.NoSql --version 0.1.0-beta.2
#r "nuget: Rig.TUnit.Databases.NoSql, 0.1.0-beta.2"
#:package Rig.TUnit.Databases.NoSql@0.1.0-beta.2
#addin nuget:?package=Rig.TUnit.Databases.NoSql&version=0.1.0-beta.2&prerelease
#tool nuget:?package=Rig.TUnit.Databases.NoSql&version=0.1.0-beta.2&prerelease
Rig.TUnit.Databases.NoSql
NoSQL family-base:
INoSqlRig,DocumentFixtureBase,NoSqlRigBuilder<TSelf>,JsonDocumentAssert,ChangeFeedCapture.
What this package is
The shared contract for every NoSQL / document / search / event-store
provider Rig.TUnit ships (.Cassandra, .Cosmos, .Dynamo,
.ElasticSearch, .KurrentDb, .Mongo, .Redis). Defines
DocumentFixtureBase (partition/collection create + teardown),
NoSqlRigBuilder<TSelf> (CRTP), JsonDocumentAssert (system-field-
scrubbing deep equality — ignores _ts, _etag, _self, _rid during
comparison), and ChangeFeedCapture (records emitted events for assertion).
Install one of the leaf packages directly — this base is useful only for provider authors and cross-engine test harness code.
When to use it
- Authoring a new document-store backend.
- Writing provider-agnostic NoSQL helpers.
- Not for: concrete NoSQL testing — install a leaf.
Prerequisites
- .NET 10 SDK
Newtonsoft.Json(transitive — used for partial-scrub comparison).
Quick start
using Rig.TUnit.Core.Builder;
using Rig.TUnit.Core.Helpers;
var rig = new RigBuilder()
.WithIsolation(IsolationKey.FromExecutionContext())
.Build();
await using var _ = rig;
Options
| Property | Type | Default | Description |
|---|---|---|---|
CollectionPrefix |
string |
$"test-{IsolationKey}" |
Applied to every container / table / keyspace name |
DropOnDispose |
bool |
true |
Teardown removes the per-test collection |
SystemFieldsToScrub |
string[] |
["_ts","_etag","_self","_rid","ETag"] |
Scrubbed by JsonDocumentAssert |
Fixture + helper APIs
Rig.TUnit.Databases.NoSql.INoSqlRigRig.TUnit.Databases.NoSql.Fixtures.DocumentFixtureBaseRig.TUnit.Databases.NoSql.Builder.NoSqlRigBuilder<TSelf>Rig.TUnit.Databases.NoSql.Assertions.JsonDocumentAssertRig.TUnit.Databases.NoSql.Helpers.ChangeFeedCapture
Per-test isolation
Each leaf provider names its container / collection / keyspace with the
IsolationKey. Teardown removes the named unit. The base package enforces
the naming contract but does not itself know how to create/delete — that
is the leaf's job.
Parallelism + performance
§9 — N/A: family-base; parallelism profile depends on the provider. See
each leaf for the cost model (Cosmos emulator is Linux-only, DynamoDB is cheap, Cassandra's keyspace create is expensive).
Troubleshooting
JsonDocumentAssertreports a diff on_ts— the default scrub list missed a provider-specific system field. Override viaSystemFieldsToScrub.
Provider quirks + edge cases
- Every leaf has at least one system field that legitimately differs per write; the default scrub list covers the common ones but exotic providers (event-sourcing stores with version vectors) need extensions.
Benchmarks
§12 — N/A: family-base; concrete leaves have individual
*Benchmarks.cs entries under tests/Rig.TUnit.Benchmarks/.
Related docs
License
MIT. See LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Bogus (>= 35.6.1)
- Microsoft.Extensions.Configuration (>= 10.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.0)
- Rig.TUnit.Databases (>= 0.1.0-beta.2)
- TUnit.Core (>= 1.34.5)
NuGet packages (8)
Showing the top 5 NuGet packages that depend on Rig.TUnit.Databases.NoSql:
| Package | Downloads |
|---|---|
|
Rig.TUnit.Databases.NoSql.Mongo
TUnit fixture for MongoDB backed by Testcontainers. Per-test isolation, change-stream helpers, and BSON-aware assertions. |
|
|
Rig.TUnit.Databases.NoSql.KurrentDb
TUnit fixture for KurrentDb (formerly EventStoreDB) backed by Testcontainers. Stream-aware lifecycle and read-model assertions. |
|
|
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.Databases.NoSql.Cosmos
TUnit fixture for Azure Cosmos DB via the Linux emulator. Container-only; integration tests skip on Windows runners. |
|
|
Rig.TUnit.Databases.NoSql.Cassandra
TUnit fixture for Apache Cassandra backed by Testcontainers. Per-test keyspace isolation and CQL assertion helpers. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-beta.2 | 47 | 4/27/2026 |
| 0.0.0-alpha.0.14 | 54 | 4/26/2026 |