Skip to main content

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

Total Downloads
7.4K
7,363
Published
Nov 17, 2026
6d ago

Get Started

dotnet add package Nullean.Snapshots.AwesomeAssertions --version 0.18.0
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

Downloads by Version

Similar & Alternative Packages

Hand-picked matching NuGet libraries based on tags & ecosystem

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

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.