A very extensive set of extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style unit tests. Targets .NET Framework 4.7, as well as .NET Core 2.1, .NET Core 3.0, .NET 6, .NET Standard 2.0 and 2.1. Supports the unit test frameworks MSTest2, NUnit3, XUnit2, MSpec, and NSpec3.
Description
In the error message, it is easier to compare strings when they are presented escaped. For example,
and
will look identical in the VS test result window if they are unescaped.
Right now, there is no way to tell AssertionScope.FailWith to not unescape the whole string or some part of the string because
MessageBuilder.Build
unconditionally callsUnescape()
: https://github.com/fluentassertions/fluentassertions/blob/24fba2074035892b0fc82584a6b3d11d2a42dd8f/Src/FluentAssertions/Execution/MessageBuilder.cs#L42