FluentAssertions 1.7.0

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 1.7.0
dotnet add package FluentAssertions --version 1.7.0
<PackageReference Include="FluentAssertions" Version="1.7.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FluentAssertions --version 1.7.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

- Added methods for asserting that a collection of types matching a predicate have specific methods that are virtual or marked with a specific attribute.
     - Added methods for asserting XElements and Xattributes
     - Added support for recursively comparing the properties of nested (collection of objects ). By default it will compare all properties of the expected object graph, unless SharedProperties is used.
     - Added a fallback mechanism so that if FA cannot find any of the supported frameworks, it will fall back to using a custom AssertFailedException exception class rather than crashing.
     - Added support for ComparisonMode.StartWith and ComparisonMode.StartWithEquivalent when asserting the message of an exception.
     - For assertions that verify against a Type, the failure message will use the AssemblyQualifiedName rather than just the name of the type.
     - Fixed a bug so that collection.Should().OnlyContain(lamba) now throws if the collection is empty. See this discussion for more details.
     - Minor fix that ignores trailing blank characters when looking for the 'because' text in the reason of an assertion.
     - Added better and deeper detection of cyclic references when recursively comparing properties or generating a string representation of a complex object graph.
     - For long strings, the error message for string.Should().StartWith() places the actual and expected strings on seperate lines. This makes it easier to find the differences.


This package has no dependencies.

Showing the top 10 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+.
Orleans is a cross-platform framework for building distributed applications with .NET
A Terminal Emulator based on UWP and web technologies.
OpenID Connect and OAuth 2.0 Framework for ASP.NET Core
An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming. ReactiveUI allows you to abstract mutable state away from your user interfaces, express the idea around a feature in one readable place and improve the testability of your application.
Smart PVR for newsgroup and bittorrent users.
LiteDB - A .NET NoSQL Document Store in a single data file - https://www.litedb.org
Git Extensions is a standalone UI tool for managing git repositories. It also integrates with Windows Explorer and Microsoft Visual Studio (2015/2017/2019).
The Reactive Extensions for .NET
API Support for your favorite torrent trackers.

Read more about the GitHub Usage information on our documentation.

Version History

Version Downloads Last updated
3.3.0 87,015 2/18/2015
3.2.2 57,367 12/12/2014
3.2.1 76,745 9/11/2014
3.1.229 35,740 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,673 10/15/2012 5,863 3/24/2012
1.7.0 478 1/13/2012
1.6.0 607 10/31/2011
1.5.0 531 6/29/2011
1.4.0 271 3/14/2011 193 1/15/2011
Show less