LogAssertions.TUnit
Assert on logs captured from ILogger via a fake collector.
await Assert.That(collector).HasLoggedOnly(LogLevel.Warning);
Nine small packages. Each adds a fluent Assert.That(...) vocabulary for one domain: logs, time, JSON, snapshots, math, traces, metrics, SSE, and gRPC. Reflection-free, MIT, test projects only.
Not a general-purpose assertion library. TUnit's own assertions stay as they are; these packages only add domain vocabulary on top of them.
Assert on logs captured from ILogger via a fake collector.
await Assert.That(collector).HasLoggedOnly(LogLevel.Warning);
TimeProvider state, timer leaks, and time budgets.
await Assert.That(fakeTime).HasAdvancedExactly(TimeSpan.FromMinutes(31));
JSON path, value, and shape assertions over a document.
await Assert.That(json).HasJsonProperty("user.name");
Text-snapshot and approval testing with scrubbers and diffs.
await Assert.That(actual).MatchesSnapshot();
Tolerance-aware numeric, geometry, and statistics checks.
await Assert.That(actual).IsApproximatelyEqualTo(target, tolerance: 1e-3);
OpenTelemetry Activity, span, and tag assertions.
await Assert.That(span).HasOperationName("order.pipeline");
Metrics and instrument measurements via a collector.
await Assert.That(capture).HasCounterTotal(5);
Server-Sent Events wire-format and event-stream checks.
await Assert.That(body).HasSseEvent("tick").Exactly(3);
gRPC status codes, error details, and call assertions.
await Assert.That(() => client.GetOrderAsync(request, ct)) .ThrowsGrpcException(StatusCode.Unavailable);