![]() |
VOOZH | about |
dotnet add package Rig.TUnit.Microservices.EventSourcing --version 0.1.0-beta.2
NuGet\Install-Package Rig.TUnit.Microservices.EventSourcing -Version 0.1.0-beta.2
<PackageReference Include="Rig.TUnit.Microservices.EventSourcing" Version="0.1.0-beta.2" />
<PackageVersion Include="Rig.TUnit.Microservices.EventSourcing" Version="0.1.0-beta.2" />Directory.Packages.props
<PackageReference Include="Rig.TUnit.Microservices.EventSourcing" />Project file
paket add Rig.TUnit.Microservices.EventSourcing --version 0.1.0-beta.2
#r "nuget: Rig.TUnit.Microservices.EventSourcing, 0.1.0-beta.2"
#:package Rig.TUnit.Microservices.EventSourcing@0.1.0-beta.2
#addin nuget:?package=Rig.TUnit.Microservices.EventSourcing&version=0.1.0-beta.2&prereleaseInstall as a Cake Addin
#tool nuget:?package=Rig.TUnit.Microservices.EventSourcing&version=0.1.0-beta.2&prereleaseInstall as a Cake Tool
Given/When/Then harness for event-sourced aggregates with
AggregateAssert.Raised<T>().WithData(…)andEventCatalogueAssertfor schema-evolution verification.
The testing harness for event-sourced aggregates. EventSourcingHarness <TAggregate> lets you rehydrate an aggregate from a list of past events,
execute a command, and assert on the events it raises.
EventCatalogueAssert takes a declared catalogue (version → event-type
list) and verifies the aggregate's rehydration path still accepts every
historical event shape — the load-bearing check for additive schema
evolution.
Rig.TUnit.Databases.NoSql.KurrentDb.Rehydrate(events) factory and a
Pending / ClearPending raised-event pattern (or equivalent).using Rig.TUnit.Microservices.EventSourcing;
var harness = new EventSourcingHarness<Order>(
rehydrate: events => Order.Rehydrate(events),
getRaised: o => o.Pending,
clearRaised: o => o.ClearPending());
harness.Given(new OrderCreated("O-1", 100m))
.When(o => o.Approve())
.Then(new OrderApproved("O-1"));
| Property | Type | Default | Description |
|---|---|---|---|
RequireExactEventOrder |
bool |
true |
Fail if raised event order does not match Then(…) |
IgnoreEventMetadata |
bool |
true |
Scrub EventId / Timestamp in comparisons |
CatalogueSourceType |
Type? |
null |
Optional EventCatalogue type for schema checks |
Rig.TUnit.Microservices.EventSourcing.EventSourcingHarness<TAggregate>Rig.TUnit.Microservices.EventSourcing.Assertions.AggregateAssertRig.TUnit.Microservices.EventSourcing.Assertions.EventCatalogueAssertEach harness instance owns its own aggregate state — no shared statics, no cross-test bleed. Safe under full parallelism.
Then(expected) fails with length mismatch — aggregate raised
more or fewer events than expected. Strict mode is the default; switch
to RequireExactEventOrder=false if the contract allows extras.EventCatalogueAssert fails after version bump — a new event
type was added to the code but not to the catalogue declaration;
update both in lockstep.See .
When calls — each call
reapplies the full event stream. Aggregates that cache state across
calls break this assumption; see WithCarriedState opt-in.IgnoreEventMetadata flag controls this.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.EventSourcing:
| 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 | 63 | 4/27/2026 |
| 0.0.0-alpha.0.14 | 65 | 4/26/2026 |