Current lesson | Lesson 2/4

Testing Objects with Assert and Fluent Assertions in C# xUnit

Unit Tests in C# with xUnit: Complete Guide to Testing in .NET 0%

Chapters

Let's see how to test objects in C# with xUnit: first using Assert.Equal and Assert.NotNull, then with Fluent Assertions using Should().Be(), Should().NotBeNull(), and BeEquivalentTo() to compare complex object properties without writing a separate assertion for each field.
Instructor
Up next Testing Collections with Assert and Fluent Assertions in C# xUnit