OrionAudit.Testing
2.0.0
dotnet add package OrionAudit.Testing --version 2.0.0
NuGet\Install-Package OrionAudit.Testing -Version 2.0.0
<PackageReference Include="OrionAudit.Testing" Version="2.0.0" />
<PackageVersion Include="OrionAudit.Testing" Version="2.0.0" />
<PackageReference Include="OrionAudit.Testing" />
paket add OrionAudit.Testing --version 2.0.0
#r "nuget: OrionAudit.Testing, 2.0.0"
#:package OrionAudit.Testing@2.0.0
#addin nuget:?package=OrionAudit.Testing&version=2.0.0
#tool nuget:?package=OrionAudit.Testing&version=2.0.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 (>= 2.0.0)
-
net8.0
- OrionAudit (>= 2.0.0)
-
net9.0
- OrionAudit (>= 2.0.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 |
|---|---|---|
| 2.0.0 | 51 | 9/20/2026 |
| 1.0.0 | 59 | 9/20/2026 |
| 0.11.3 | 125 | 7/28/2026 |
| 0.11.1 | 120 | 6/30/2026 |
| 0.11.0 | 119 | 6/28/2026 |
| 0.10.0 | 128 | 6/27/2026 |
| 0.9.0 | 125 | 6/22/2026 |
| 0.8.1 | 125 | 6/20/2026 |
| 0.8.0 | 116 | 6/19/2026 |
| 0.7.32 | 127 | 6/17/2026 |
| 0.7.31 | 125 | 6/16/2026 |
| 0.7.30 | 142 | 6/16/2026 |
| 0.7.29 | 115 | 6/15/2026 |
| 0.7.28 | 121 | 6/15/2026 |
| 0.7.27 | 127 | 6/15/2026 |
| 0.7.26 | 131 | 6/13/2026 |
| 0.7.25 | 115 | 6/13/2026 |
| 0.7.24 | 119 | 6/12/2026 |
| 0.7.23 | 128 | 6/12/2026 |
| 0.7.22 | 116 | 6/11/2026 |