Skip to content

Comments

refactor(tests): reduce test duplication with helper classes and base…#23

Merged
kr0ggg merged 1 commit intomainfrom
dbcontextfactory
Jan 10, 2026
Merged

refactor(tests): reduce test duplication with helper classes and base…#23
kr0ggg merged 1 commit intomainfrom
dbcontextfactory

Conversation

@kr0ggg
Copy link
Collaborator

@kr0ggg kr0ggg commented Jan 9, 2026

… fixtures

  • Created TestDbContextFactory for consistent context creation
  • Created MockObserverFactory for standardized mock setup
  • Created DbContextTestBase and DbContextTestBaseWithStrictMocks
  • Refactored ReadOnlyEntityBaseTests and AuditBaseTests to use base classes
  • Reorganized tests to match production folder structure (DI/, Domain/, Extensions/)
  • Renamed test classes to follow Tests convention
  • Added TEST_REFACTORING_SUMMARY.md documentation

All 72 tests passing. Test-only changes, no production code modified.

… fixtures

- Created TestDbContextFactory for consistent context creation
- Created MockObserverFactory for standardized mock setup
- Created DbContextTestBase and DbContextTestBaseWithStrictMocks
- Refactored ReadOnlyEntityBaseTests and AuditBaseTests to use base classes
- Reorganized tests to match production folder structure (DI/, Domain/, Extensions/)
- Renamed test classes to follow <ClassUnderTest>Tests convention
- Added TEST_REFACTORING_SUMMARY.md documentation

All 72 tests passing. Test-only changes, no production code modified.
@kr0ggg kr0ggg merged commit e9e23ca into main Jan 10, 2026
3 checks passed
@kr0ggg kr0ggg deleted the dbcontextfactory branch January 10, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant