xunit
Installation
SKILL.md
xUnit.net
xUnit.net is the modern, open-source unit testing tool for .NET (C#, F#, VB). It is chosen by Microsoft/dotnet for their own repositories.
When to Use
- Modern .NET Core Unit Testing: The modern, opinionated, community-preferred testing framework for C# and ASP.NET Core applications.
- Isolated Clean Test Execution: Enforcing a new class instance for every single test method to guarantee zero state contamination.
- Theory-Driven Parameterized Tests: Running tests across inline data (
[InlineData]), member data, and class data sources. - Constructor-Based Test Setup: Replacing
[SetUp]attributes with standard C# object-oriented constructors andIDisposable.
Quick Start
using Xunit;