Skip to main content
net10.0net11.0

Snapshot assertions for AwesomeAssertions: value.Should().MatchSnapshot().

Published
Nov 14, 2026
9d ago
Total Downloads
7.4K
7,363

Install

dotnet add package Nullean.Snapshots.AwesomeAssertions --version 0.12.2
ProductVersions
.NET
net10.0net11.0

README

Nullean.Snapshots.AwesomeAssertions

snapshots.

Text snapshot assertions for AwesomeAssertions, value.Should().MatchSnapshot() and MatchInlineSnapshot(), and the building blocks the HTML, JSON and YAML packages use. Part of Nullean.Snapshots, structural snapshot tests for .NET.

NuGet

Install

dotnet add package Nullean.Snapshots.AwesomeAssertions

Quick start

The extensions live in the Nullean.Snapshots namespace:

using AwesomeAssertions;
using Nullean.Snapshots;

public class ReportTests
{
	[Test]
	public void Renders()
	{
		var report = Report.Render();
		report.Should().MatchSnapshot();                     // .verified.txt, compared line by line
		Report.Header().Should().MatchSnapshot(name: "header"); // a second snapshot in the same test
	}

	[Test]
	public void Totals() =>
		Report.Totals().Should().MatchInlineSnapshot("""
			2 x beats
			1 x kibana
			""");
}

Leave out the inline snapshot's expected value for a new one; snap accept writes it into the test.

For structured output prefer Nullean.Snapshots.Json or Nullean.Snapshots.Yaml, which compare as trees, not lines. Add Nullean.Snapshots.TUnit so every case of a data-driven test gets its own file.

Learn more

Changes from Previous Version

v0.12.1v0.12.2
Added Frameworks
net11.0
Added Dependencies

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.