XBullet.EasyTesting.Snapshots.Core
1.0.14
dotnet add package XBullet.EasyTesting.Snapshots.Core --version 1.0.14
NuGet\Install-Package XBullet.EasyTesting.Snapshots.Core -Version 1.0.14
<PackageReference Include="XBullet.EasyTesting.Snapshots.Core" Version="1.0.14" />
<PackageVersion Include="XBullet.EasyTesting.Snapshots.Core" Version="1.0.14" />
<PackageReference Include="XBullet.EasyTesting.Snapshots.Core" />
paket add XBullet.EasyTesting.Snapshots.Core --version 1.0.14
#r "nuget: XBullet.EasyTesting.Snapshots.Core, 1.0.14"
#:package XBullet.EasyTesting.Snapshots.Core@1.0.14
#addin nuget:?package=XBullet.EasyTesting.Snapshots.Core&version=1.0.14
#tool nuget:?package=XBullet.EasyTesting.Snapshots.Core&version=1.0.14
XBullet.EasyTesting.Snapshots.Core
Framework-independent snapshot assertions for serializable values, raw JSON, plain text, HTTP content, controller responses, and complete request/response exchanges.
The package targets .NET 8, .NET 9, and .NET 10. It does not depend on xUnit, Verify,
XBullet.EasyTesting, ASP.NET testing, or XBullet.EasyTesting.Http.
Install
dotnet add package XBullet.EasyTesting.Snapshots.Core
Use XBullet.EasyTesting.Snapshots.Http instead when the test snapshots requests or exchanges
captured by StubHttpMessageHandler. Existing references to XBullet.EasyTesting.Snapshots can
remain temporarily through the compatibility facade.
Example
var settings = new SnapshotSettings()
.Named("administrator-order")
.ScrubMembers("Id", "CreatedAt")
.IgnoreMember("AccessToken")
.ScrubGuids();
await SnapshotAssert.MatchAsync(result, settings, cancellationToken);
The first verification failure writes a target-framework-qualified *.received.* file. Review it,
ensure dynamic and sensitive values are handled, and promote it to the shared *.verified.* file.
Commit verified files; do not commit received files.
Controller and complete TestServer exchange assertions use the same settings:
await response.ShouldMatchControllerSnapshot(
snapshotSettings: settings,
cancellationToken: cancellationToken);
await response.ShouldMatchHttpExchangeSnapshot(
snapshotSettings: settings,
cancellationToken: cancellationToken);
Attach HttpExchangeRecorder to the real client pipeline when the complete request body must be
captured before TestServer consumes it.
Safety and maintenance
- Common sensitive HTTP headers and query values are excluded or redacted by default, but application-specific secrets still require explicit rules.
SnapshotUpdateMode.Allcan replace reviewed files. Never enable it in ordinary CI.- CI updates require a separate explicit authorization.
- Bulk acceptance and deletion require
confirmed: true; preview paths first. - Obsolete-file detection is valid only after the complete intended test scope passes.
Documentation
| 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
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on XBullet.EasyTesting.Snapshots.Core:
| Package | Downloads |
|---|---|
|
XBullet.EasyTesting.Snapshots
Compatibility facade for the split snapshot core and outbound HTTP adapter packages. |
|
|
XBullet.EasyTesting.Verify.Xunit
Verify.XunitV3 snapshot support for XBullet.EasyTesting controller responses. |
|
|
XBullet.EasyTesting.Snapshots.Http
Snapshot adapters for XBullet.EasyTesting outbound HTTP stubs. |
GitHub repositories
This package is not used by any popular GitHub repositories.