OrionAudit.Testing
0.9.0
See the version list below for details.
dotnet add package OrionAudit.Testing --version 0.9.0
NuGet\Install-Package OrionAudit.Testing -Version 0.9.0
<PackageReference Include="OrionAudit.Testing" Version="0.9.0" />
<PackageVersion Include="OrionAudit.Testing" Version="0.9.0" />
<PackageReference Include="OrionAudit.Testing" />
paket add OrionAudit.Testing --version 0.9.0
#r "nuget: OrionAudit.Testing, 0.9.0"
#:package OrionAudit.Testing@0.9.0
#addin nuget:?package=OrionAudit.Testing&version=0.9.0
#tool nuget:?package=OrionAudit.Testing&version=0.9.0
OrionAudit.Testing
Testing helpers for OrionAudit. Provides
AuditCapture, fluent assertions, and in-memory resolvers — framework-agnostic, with no
dependency on xUnit, NUnit, or FluentAssertions. Throws plain exceptions on failure so it
works with any test runner.
dotnet add package OrionAudit.Testing
Capture and assert
using Moongazing.OrionAudit;
using Moongazing.OrionAudit.Testing;
// Act — write something that produces an audit row.
ctx.Orders.Add(new Order { Status = "Pending" });
await ctx.SaveChangesAsync();
// Assert.
AuditCapture.From(ctx)
.Should()
.HaveLogged<Order>(AuditAction.Inserted)
.HaveLoggedExactly(1).Of<Order>();
In-memory user / tenant resolvers
Replace the real resolvers in tests when you need deterministic attribution:
services.AddSingleton<IAuditUserResolver>(new InMemoryAuditUserResolver(
new AuditUser("test-user", "Test User")));
services.AddSingleton<IAuditTenantResolver>(new InMemoryAuditTenantResolver("tenant-A"));
Both resolvers expose mutable User / TenantId properties so the same instance can be
re-pointed mid-test to simulate cross-tenant scenarios.
Why no FluentAssertions / xUnit dependency
OrionAudit.Testing ships with applications that run their tests on any framework. Pulling in a
specific assertion library would force a choice on consumers. Failures throw
OrionAuditAssertionException — every modern test runner treats any thrown exception as a test
failure, so this works everywhere.
See the project repository for the full design spec, sample app, and benchmarks.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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
- OrionAudit (>= 0.9.0)
-
net8.0
- OrionAudit (>= 0.9.0)
-
net9.0
- OrionAudit (>= 0.9.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.11.3 | 106 | 7/28/2026 |
| 0.11.1 | 112 | 6/30/2026 |
| 0.11.0 | 110 | 6/28/2026 |
| 0.10.0 | 118 | 6/27/2026 |
| 0.9.0 | 118 | 6/22/2026 |
| 0.8.1 | 119 | 6/20/2026 |
| 0.8.0 | 108 | 6/19/2026 |
| 0.7.32 | 123 | 6/17/2026 |
| 0.7.31 | 122 | 6/16/2026 |
| 0.7.30 | 137 | 6/16/2026 |
| 0.7.29 | 110 | 6/15/2026 |
| 0.7.28 | 114 | 6/15/2026 |
| 0.7.27 | 118 | 6/15/2026 |
| 0.7.26 | 122 | 6/13/2026 |
| 0.7.25 | 112 | 6/13/2026 |
| 0.7.24 | 114 | 6/12/2026 |
| 0.7.23 | 123 | 6/12/2026 |
| 0.7.22 | 112 | 6/11/2026 |
| 0.7.21 | 109 | 6/11/2026 |
| 0.7.20 | 106 | 6/11/2026 |