Refactor nunit tests off InMemory/WebApplicationFactory, remove tuple returns #4

Merged
wamplerj merged 2 commits from unit-test-refactor into main 2026-07-04 21:40:48 -07:00

2 Commits

Author SHA1 Message Date
James Wampler
643188ca9e Replace tuple return types with named records
CLAUDE.md prohibits tuples as return types. Add PagedResult<T>,
ProfileUpdateResult, and ApiKeyCreationResult records and update all
callers (AuditLogQueryService, AdminIdentityService, UserService,
ApiKeyService and their controllers/endpoints).
2026-07-04 21:21:29 -07:00
James Wampler
b4a666ebf0 Refactor nunit tests off EF InMemory provider and web server
Extract IMicCheckDbContext so DB access can be mocked with Moq instead
of the InMemory provider, per project testing guidelines. Add shared
async DbSet test doubles (TestSupport/) to back the mocks. Rewrite
HTTP-pipeline tests (WebApplicationFactory) to exercise controllers
and auth handlers directly instead of running the web server. Drop
DbContext/seeder tests that only made sense against a real provider,
and remove stale duplicate test files left over from a namespace move.
2026-07-04 19:54:22 -07:00