BudgetSeedingExtensions.cs creates demo data on app startup. Achieving high unit test coverage requires:
- Mocking entire EF Core context
- Complex test fixtures replicating DB state
- Testing code that's already validated by integration tests
Root cause: Codecov treats all code equally. But startup/initialization code is infrastructure, not business logic.
Solution: Document that certain code categories (seeding, initialization, infrastructure setup) should be excluded from coverage thresholds. Provide codecov.yml patterns for this.
Pattern used: Added to ignore list in codecov.yml
BudgetSeedingExtensions.cs creates demo data on app startup. Achieving high unit test coverage requires:
Root cause: Codecov treats all code equally. But startup/initialization code is infrastructure, not business logic.
Solution: Document that certain code categories (seeding, initialization, infrastructure setup) should be excluded from coverage thresholds. Provide codecov.yml patterns for this.
Pattern used: Added to ignore list in codecov.yml