Rig.TUnit.Databases.NoSql 0.1.0-beta.2

This is a prerelease version of Rig.TUnit.Databases.NoSql.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Rig.TUnit.Databases.NoSql" Version="0.1.0-beta.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rig.TUnit.Databases.NoSql" Version="0.1.0-beta.2" />
                    
Directory.Packages.props
<PackageReference Include="Rig.TUnit.Databases.NoSql" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Rig.TUnit.Databases.NoSql --version 0.1.0-beta.2
                    
#r "nuget: Rig.TUnit.Databases.NoSql, 0.1.0-beta.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Rig.TUnit.Databases.NoSql@0.1.0-beta.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Rig.TUnit.Databases.NoSql&version=0.1.0-beta.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Rig.TUnit.Databases.NoSql&version=0.1.0-beta.2&prerelease
                    
Install as a Cake Tool

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.INoSqlRig
  • Rig.TUnit.Databases.NoSql.Fixtures.DocumentFixtureBase
  • Rig.TUnit.Databases.NoSql.Builder.NoSqlRigBuilder<TSelf>
  • Rig.TUnit.Databases.NoSql.Assertions.JsonDocumentAssert
  • Rig.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

  • JsonDocumentAssert reports a diff on _ts — the default scrub list missed a provider-specific system field. Override via SystemFieldsToScrub.

See docs/troubleshooting.md.

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/.

License

MIT. See LICENSE.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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