CheckOps home

Tools directory

F

CheckOps

Fluent Assertions

Fluent Assertions is a .NET assertions library with natural-language `Should()` syntax; versions 8 and later are free for open-source and non-commercial use but require a paid licence (via Xceed) for commercial use.

Visit website

Latest public signals

Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.

Visit Website

Introduction

Fluent Assertions provides a large set of extension methods that let you express the expected outcome of a .NET test naturally, such as result.Should().Be(5) or orders.Should().HaveCount(3).And.OnlyContain(o => o.Paid). It was originally authored by Dennis Doomen with Jonas Nyrup and has been one of the most popular .NET testing libraries for years.

Assertions cover primitives, strings, collections, dictionaries, dates and times, exceptions (action.Should().Throw<T>().WithMessage(...)), async code, events and object graphs. BeEquivalentTo performs structural comparison with options to include or exclude members, and assertion scopes collect multiple failures into one report. Failure messages are detailed and explain why an assertion failed. Licensing changed with version 8: the README states that versions 8 and beyond are free for open-source projects and non-commercial use, but commercial use requires a paid licence from Xceed, now an official partner. Version 7 and earlier were released under Apache-2.0. Version 8.11.0 was released on 14 September 2026.

Features

  1. Natural language API: Should() assertions read like sentences.
  2. Object graph comparison: BeEquivalentTo with fine-grained options.
  3. Assertion scopes: Report several failures together.
  4. Detailed failure messages: Explain exactly what differed.

Pros

  1. Expressive: Some of the most readable assertions in .NET.
  2. Mature: Years of development and wide adoption.

Cons

  1. Commercial licence for v8+: Commercial teams must buy a licence or stay on v7 (see site).
  2. Large API surface: Many ways to express the same check.
using FluentAssertions;

[Fact]
public void CreatesInvoice()
{
    var invoice = InvoiceFactory.Create(order);

    invoice.Total.Should().Be(120);
    invoice.Lines.Should().HaveCount(2).And.OnlyContain(l => l.Amount > 0);
    invoice.Should().BeEquivalentTo(new { Customer = "Ana", Currency = "EUR" },
        options => options.ExcludingMissingMembers());
}

Resources:

Pricing

Free for open-source projects and non-commercial use (versions 8+); commercial use requires a paid licence from Xceed (see site). Versions 7 and earlier are Apache-2.0.

  1. Open-source and non-commercial .NET projects wanting rich assertions.
  2. Commercial teams willing to license v8+, or staying on Apache-licensed v7.

Conclusion

Fluent Assertions offers excellent, expressive assertions for .NET, but check the v8+ licence terms before using it commercially.

Alternatives

Other tools on CheckOps that cover similar ground. Open a page, or compare one with Fluent Assertions side by side.