fullstackhero ships with around 900 [Fact] + [Theory] tests that run green on every build. Three layers: unit tests verify domain invariants and handler logic without infrastructure; integration tests spin up real Postgres + Valkey + MinIO via Testcontainers and exercise the API end-to-end through Microsoft.AspNetCore.Mvc.Testing; architecture tests use NetArchTest to enforce module boundaries, contracts purity, and naming conventions as compiler-level rules.
The pages
- 01/06
Unit tests
xUnit + Shouldly + NSubstitute + AutoFixture for fast in-process tests of handlers, aggregates, and validators — no DbContext, no file system, no network.
- 02/06
Integration tests
WebApplicationFactory in-process API tests against Testcontainers Postgres + Valkey + MinIO — one container set, all modules, real round trips.
- 03/06
Architecture tests
NetArchTest assertions that enforce module boundaries, contracts purity, naming conventions, and architectural invariants as compile-time rules.
- 04/06
Fixtures & seed data
Shared test fixtures (containers, factory, seeded users + tenants + catalog) used across the integration suite.
- 05/06
Running tests
Commands and CI patterns for running the unit / integration / architecture suites locally and in CI.
- 06/06
Writing new tests
Step-by-step recipes for adding a unit test, an integration test, or an architecture rule — copy-paste-ready.
Related
- Architecture: modular monolith — the rules architecture tests enforce.
- Architecture: vertical slice — the slice shape unit tests mirror.
- Catalog module — the most thoroughly tested module; use its integration tests as templates.