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.
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" />
paket add FluentAssertions --version 1.7.0
- 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.
GitHub repositories (302)
Showing the top 5 popular GitHub repositories that depend on FluentAssertions:
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+.
Simple REST and HTTP API Client for .NET
ML.NET is an open source and cross-platform machine learning framework for .NET.
A Terminal Emulator based on UWP and web technologies.
OpenID Connect and OAuth 2.0 Framework for ASP.NET Core