Installation

Install with NuGet NuGet

PM > Install-Package FluentAssertions

News

Fluent Assertions 5.0.0-beta.1 was released on 25 August 2017

Changes:

  • {Breaking} Unified ShouldBeEquivalentTo, ShouldAllBeEquivalentTo and collection.Should().BeEquivalentTo - #593
  • {Breaking} Use the expectation instead of the subject to drive equivalency assertions in and moved them to the assertion classes - #593
  • {Breaking} Removed support for Silverlight, WP for Silverlight and .NET 4.0 - #536
  • {Breaking} Disable automatic conversion of property values in BeEquivalentTo and provided an opt-in API WithAutoConversion instead - #616
  • {New} Supports .NET 4.5.1, .NET Standard 1.3, 1.6 and 2.0
  • {New} Added NotBeInRange, NotHaveSameCount, NotApproximatelly, NotBeAssignableTo to the numeric assertions - #598, #599, #600, #601
  • {New} Added [Not]Have{Implicit,Explicit}ConversionOperator, NotBeDecoratedWith and ThatAreNotDecoratedWith to the type assertions - #604, #609
  • {New} Added NotHaveCount, HaveCount{Greater,Less}{Than,OrEqualTo} to the numeric assertions - #618
  • {New} Report all indices offending collection.Should().NotContainNulls - #608
  • {New} Added predicate overload to OnlyHaveUniqueItems and NotContainNull collection assertions - #611
  • {New} Fail fast on NotIntersectWith, NotBeSubsetOf, NotHaveSameCount ,NotBeEquivalentTo - #610
  • {New} Added BeCloseTo with TimeSpan - #621
  • {New} Added missing/negations type assertions/selectors - #620
  • {New} Added HaveCount variants for generic collections - #623
  • {Changed} Fail fast ReferenceEquals on NotEqual (#606)
  • {Changed} Report all non-duplicate keys in collection.Should().OnlyHaveUniqueItems - #607

View Release on GitHub

Supported Frameworks and Libraries

Fluent Assertions supports the following .NET versions:

Fluent Assertions supports the following unit test frameworks:

Community Extensions

There are a number of community maintained extension projects. The ones we are aware of a listed below. To add yours please fork the repository and send a pull request.

Support us

As you can imagine, a lot of our private time is put into this wonderful project. Please support us:

Special thanks

This project would not have been possible without the support of JetBrains. We thank them generously for providing us with the ReSharper licenses necessary to make us productive developers.
Resharper