Top 3 C# Assertion Projects
-
Fluent Assertions
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.
-
AutoFixture
AutoFixture is an open source library for .NET designed to minimize the 'Arrange' phase of your unit tests in order to maximize maintainability. Its primary goal is to allow developers to focus on what is being tested rather than how to setup the test scenario, by making it easier to create object graphs containing test data.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Yes, it does feel like some of the "standard stuff" in other more nuanced languages are missing (especially miss AutoFixture ngl). Some of those are a conscious decison by the golang team for example.
Several well-known NuGet packages such as xUnit.net, FluentAssertions, StyleCop, Entity Framework Core, and others include by default a significant number of Roslyn analyzers. They help you adhere to the conventions and best practices of these libraries.
C# Assertions related posts
Index
What are some of the best open-source Assertion projects in C#? This list will help you:
Project | Stars | |
---|---|---|
1 | Fluent Assertions | 3,593 |
2 | AutoFixture | 3,219 |
3 | fluentassertions.analyzers | 128 |
Sponsored