Using Assertion Scopes to execute multiple Assertions in C#

Using Assertion Scopes to execute multiple Assertions in C#

Fluent Assertions is a .NET library that provides use with a bunch of useful extension methods that allow us to test our C# code in a more natural way. Let’s say for example we are testing the output of a string. Without Fluent Assertions, we might write something like this: string testString = "hello"; string expectedOutput = testString.ToUpper(); Assert.Equal(expectedOutput, "HELLO"); If we were to write this test using Fluent Assertions, we could do so like this:...

<span title='2023-06-27 00:00:00 +0000 UTC'>June 27, 2023</span>&nbsp;·&nbsp;4 min&nbsp;·&nbsp;Will Velida