A unit test checks non-trivial code in memory, such as an algorithm or business logic. Isolating behavior can replace slower integration tests that require infrastructure services. section 5.4.4 section 6.2.5
In a modular monolith, keep tests focused at the appropriate level:
- Unit-test domain behavior, such as an Order entity; use integration tests for adapters and module tests for the whole module. section 6.2.5
- Use dependency injection to provide a mock data-access object, or test dependency-free functional business logic directly. section 5.4.4

















