A very extensive set of extension methods for .NET 3.5, 4.0 and Silverlight 4.0 that allow you to more naturally specify the expected outcome of a TDD or BDD-style unit test.

There is a newer version of this package available.
See the version list below for details.
Install-Package FluentAssertions -Version
dotnet add package FluentAssertions --version
<PackageReference Include="FluentAssertions" Version="" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FluentAssertions --version
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FluentAssertions,"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install FluentAssertions as a Cake Addin
#addin nuget:?package=FluentAssertions&version=

// Install FluentAssertions as a Cake Tool
#tool nuget:?package=FluentAssertions&version=
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

- Fixed a bug that occurs when two collections are compared for equality but the collection contains null.
     - Fixed a stack overflow while formatting an object graph containing static cyclic references.
     - Fixed the issue where an exception was thrown when building a failure message by dumping the values of all properties, and one of the properties throws an exception.
     - Made the handling of cyclic references when validating equality of nested properties configurable (ignore / throw exception)
     - Fixed some incorrect failure messages when comparing XML elements and attributes
     - Fixed a NullReferenceException when comparing objects that have a write-only properties
     - Fixed a potential NullReferenceException while comparing the properties of a complex graph and when a deep property contains a null object.


This package has no dependencies.

GitHub repositories (423)

Showing the top 5 popular GitHub repositories that depend on FluentAssertions:

Repository Stars
Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. From version 6.0.1, Polly targets .NET Standard 1.1 and 2.0+.
OpenID Connect and OAuth 2.0 Framework for ASP.NET Core
A Terminal Emulator based on UWP and web technologies.
Simple REST and HTTP API Client for .NET
Orleans is a cross-platform framework for building distributed applications with .NET

Version History

Version Downloads Last updated
3.3.0 87,021 2/18/2015
3.2.2 57,367 12/12/2014
3.2.1 76,745 9/11/2014
3.1.229 35,750 7/29/2014
3.0.107 44,859 4/30/2014
2.2.0 49,856 12/30/2013
2.1.0 28,903 8/23/2013
2.0.1 25,457 3/3/2013 10,682 10/15/2012 5,863 3/24/2012
1.7.0 478 1/13/2012
1.6.0 615 10/31/2011
1.5.0 540 6/29/2011
1.4.0 271 3/14/2011 193 1/15/2011
Show less