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.

Dependencies

This package has no dependencies.

Showing the top 10 GitHub repositories that depend on FluentAssertions:

Repository Stars
App-vNext/Polly
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+.
dotnet/orleans
Orleans - Distributed Virtual Actor Model
IdentityServer/IdentityServer4
OpenID Connect and OAuth 2.0 Framework for ASP.NET Core
felixse/FluentTerminal
A Terminal Emulator based on UWP and web technologies.
reactiveui/ReactiveUI
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.
Sonarr/Sonarr
Smart PVR for newsgroup and bittorrent users.
mbdavid/LiteDB
LiteDB - A .NET NoSQL Document Store in a single data file - https://www.litedb.org
gitextensions/gitextensions
Git Extensions is a standalone UI tool for managing git repositories. It also integrates with Windows Explorer and Microsoft Visual Studio (2015/2017/2019).
dotnet/reactive
The Reactive Extensions for .NET
dotnet/cli
The .NET Core command-line (CLI) tools, used for building .NET Core apps and libraries through your development flow (compiling, NuGet package management, running, testing, ...).

Version History

Version Downloads Last updated
5.9.0 151,976 8/28/2019
5.8.0 202,725 8/9/2019
5.7.0 1,033,266 6/8/2019
5.6.0 3,819,924 1/11/2019
5.5.3 1,320,626 11/20/2018
5.5.1 116,783 11/16/2018
5.4.2 1,455,858 9/14/2018
5.4.1 2,266,488 6/20/2018
5.4.0 253,553 6/13/2018
5.3.2 438,605 5/30/2018
5.3.0 1,082,936 4/19/2018
5.2.0 905,897 3/15/2018
5.1.2 564,744 2/19/2018
5.1.1 132,074 2/14/2018
5.0.0 375,678 2/4/2018
4.19.4 3,262,969 8/24/2017
4.19.3 839,342 7/4/2017
4.19.2 2,015,197 3/8/2017
4.19.0 743,360 2/4/2017
4.18.0 1,041,224 12/4/2016
4.17.0 400,066 11/9/2016
4.16.0 206,374 10/26/2016
4.15.0 161,004 10/11/2016
4.14.0 502,079 9/5/2016
4.13.1 68,973 9/1/2016
4.13.0 267,300 8/2/2016
4.12.0 213,120 7/15/2016
4.11.0 148,892 7/6/2016
4.10.0 18,040 7/5/2016
4.9.1 163,001 6/23/2016
4.9.0 88,747 6/13/2016
4.8.0 41,120 6/7/2016
4.7.0 31,135 6/6/2016
4.6.3 177,078 5/24/2016
4.6.2 40,937 5/22/2016
4.6.1 77,310 5/13/2016
4.5.0 167,165 4/25/2016
4.4.0 95,884 4/17/2016
4.3.2 63,155 4/3/2016
4.3.1 3,223 4/1/2016
4.3.0 42,651 3/31/2016
4.2.2 366,537 2/5/2016
4.2.1 186,641 1/10/2016
4.2.0 91,239 1/8/2016
4.1.1 128,587 12/13/2015
4.1.0 210,472 11/24/2015
4.0.1 203,661 10/21/2015
4.0.0 324,417 8/24/2015
4.0.0-beta0001 2,260 8/7/2015
3.5.0 161,007 8/2/2015
3.4.1 166,178 7/3/2015
3.4.0 57,171 6/22/2015
3.3.0 496,944 2/18/2015
3.2.2 188,475 12/12/2014
3.2.1 229,923 9/11/2014
3.1.229 120,334 7/29/2014
3.0.107 152,457 4/30/2014
2.2.0 358,766 12/30/2013
2.1.0 185,180 8/23/2013
2.0.1 199,727 3/3/2013
2.0.0.1 90,465 10/15/2012
1.7.1.1 59,700 3/24/2012
1.7.0 8,621 1/13/2012
1.6.0 7,729 10/31/2011
1.5.0 6,804 6/29/2011
1.4.0 4,255 3/14/2011
1.3.0.1 9,813 1/15/2011
Show less