Skip to main content
net8.0net10.0.NETStandard2.0

Core package for writing extensions for aweXpect.

Published
Sep 20, 2025
1y ago
Total Downloads
143.6K
143,645

Install

dotnet add package aweXpect.Core --version 3.0.0-pre.1
ProductVersions
.NET
net10.0net8.0
.NET Standard
netstandard2.0

README

aweXpect

Changelog Nuget Nuget Coverage Mutation testing badge

Assert unit tests in natural language using awesome expectations.

Getting started

  1. Install the aweXpect nuget package

    dotnet add package aweXpect
    
  2. Add the following using statement:

    using aweXpect;
    

    This brings the static Expect class and lots of extension methods into scope.

  3. See the documentation or the migration guide for more information.

Features

Async everything

By using async assertions per default, we have a consistent API and other perks:

  • Complete async support, e.g. IAsyncEnumerable HttpResponseMessage or similar async types
  • No need to distinguish between action.Throws() and await asyncAction.ThrowsAsync()
  • The evaluation is only triggered after the complete fluent chain is loaded, which has some nice benefits:
    • Because can be registered once as a general method that can be applied at the end of the expectation instead of cluttering all methods with the because and becauseArgs parameters
    • WithCancellation can also be registered at the end an applies a CancellationToken to all async methods which allows cancellation of IAsyncEnumerable evaluations
    • Expectations can be combined directly (via Expect.ThatAll) instead of relying on global state ( e.g. assertion scopes)

Performant

A focus on performance allows you to execute your tests as fast as possible.
Special care is taken for the happy case (succeeding tests) to be as performant as possible. See the benchmarks for more details.

Extensible

We added lots of extensibility points to allow you to build custom extensions.
The aweXpect.Core package is intended to be a stable source for extensions, so that the risk of version conflicts between different extensions can be reduced.

You can extend the functionality for any types, by adding extension methods on IThat<TType>. More information can be found in the extensibility guide.

Extension projects

Changes from Previous Version

No structural changes between v2.37.0 and v3.0.0-pre.1.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 3 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.