What problem does it solve?
Ensures tests for .NET 10 applications are reliable and meaningful by avoiding in-memory databases and exercising the full stack (routing, validation, MediatR pipelines, EF Core persistence), preventing false positives and brittle assumptions about database behavior.
Core Features & Use Cases
- Integration tests with WebApplicationFactory: exercise routing, model binding, pipeline behaviors, and full request/response lifecycles.
- SQL Server Testcontainers: run MsSqlContainer to validate real SQL Server behavior including transactions, constraints, and migrations.
- Handler and validator unit tests: test MediatR handlers against a real AppDbContext when needed and keep validators isolated for fast feedback.
- Assertions and conventions: use FluentAssertions, Ardalis.Result checks, NSubstitute for doubles when necessary, and the AAA test pattern with clear naming conventions.
- Shared expensive fixtures: reuse IClassFixture/IAsyncLifetime patterns to avoid repeated container startup for test collections.
Quick Start
Run an integration test with WebApplicationFactory configured to use a Testcontainers MsSql instance and assert that POST /api/v1/hotstrings returns 201 for a valid create request.