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.
Latest public signals
Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.
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
- Natural language API:
Should()assertions read like sentences. - Object graph comparison:
BeEquivalentTowith fine-grained options. - Assertion scopes: Report several failures together.
- Detailed failure messages: Explain exactly what differed.
Pros
- Expressive: Some of the most readable assertions in .NET.
- Mature: Years of development and wide adoption.
Cons
- Commercial licence for v8+: Commercial teams must buy a licence or stay on v7 (see site).
- Large API surface: Many ways to express the same check.
Usage and Links (Example)
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.
Recommended for?
- Open-source and non-commercial .NET projects wanting rich assertions.
- 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.
SShouldlyShouldly is a BSD-3-Clause .NET assertion library focused on readable code and great failure messages that include the source expression being tested.Compare with Fluent Assertions
XxUnit.netxUnit.net is a free, Apache-2.0, community-focused unit testing tool for C#, F# and Visual Basic, part of the .NET Foundation; v3 supports .NET 8+ and .NET Framework 4.7.2+.Compare with Fluent Assertions
NNUnitNUnit is an MIT-licensed unit-testing framework for all .NET languages on Windows, macOS and Linux, broad and non-opinionated, now at version 5 after NUnit 3 and 4.Compare with Fluent Assertions
MMSTestMSTest is Microsoft's MIT-licensed test framework for .NET, developed in the microsoft/testfx repository alongside Microsoft.Testing.Platform, a lightweight alternative to VSTest, with the MSTest.Sdk project SDK.Compare with Fluent Assertions
NNSubstituteNSubstitute is a BSD-3-Clause mocking library for .NET with a concise, readable syntax for creating substitutes, configuring returns and checking received calls.Compare with Fluent Assertions
MMoqMoq is a popular MIT-licensed mocking library for .NET that uses lambda expressions to set up and verify mocks; stable v4.x is maintained on the v4 branch while the main branch hosts the upcoming v5.Compare with Fluent Assertions