Six .NET test frameworks side-by-side, tested against the same code: a Calculator, an Aspire-orchestrated WebApp + ApiService, a Blazor Counter component.
Use this repo to read the same test written six different ways.
AdvancedPatterns/ is the extra study project: reusable contract tests, in-memory protocol hosts, deterministic call expectations, JSON workflow harnesses, and adversarial file-store tests.
| Folder | Package |
|---|---|
UnitTests/ IntegrationTests/ PlaywrightTests/ |
TUnit |
XUnit/ |
xUnit v2 |
XUnitV3/ |
xUnit v3 |
NUnit/ |
NUnit 4 |
MSTest/ |
MSTest 4 |
BUnit/ |
bUnit |
AdvancedPatterns/ |
xUnit v3 + ASP.NET TestServer |
dotnet build DotNetTests.slnx
dotnet test XUnit/XUnit.Tests.csproj
dotnet test NUnit/NUnit.Tests.csproj
dotnet test MSTest/MSTest.Tests.csproj
dotnet test BUnit/BUnit.Tests.csproj
cd UnitTests && dotnet run # TUnit
cd XUnitV3 && dotnet run # xUnit v3
dotnet run --project AdvancedPatterns/AdvancedPatterns.Tests.csprojcd src/AppHost && dotnet runOpen the Aspire dashboard URL printed in the console. Requires Docker (for Redis).
.NET 10 SDK · Docker (for AppHost and IntegrationTests)
AGENTS.md — layout, conventions, framework-specific gotchas.