-
Book Overview & Buying
-
Table Of Contents
Tools and Skills for .NET 10 - Second Edition
By :
FluentAssertions is a set of extension methods that make writing and reading the code in unit tests and the error messages of failing tests more like a natural human language like English.
It works with most unit testing frameworks, including xUnit. When you add a package reference for a test framework, FluentAssertions will automatically find the package and use it to throw exceptions.
After importing the FluentAssertions namespace, call the Should() extension method on a variable and then one of the hundreds of other extension methods to make assertions in a human-readable way. You can chain multiple assertions using the And() extension method or have separate statements, each calling Should().
Warning! Since version 8.0.0, released on January 14, 2025, there has been a license change. Here’s a statement from the project owner, dennisdoomen: “v7 will remain free indefinitely and will still receive critical...