Spring Boot TDD Workflow
TDD guidance for Spring Boot services with 80%+ coverage (unit + integration).
When to Use
- New features or endpoints
- Bug fixes or refactors
- Adding data access logic or security rules
Workflow
1) Write tests first (they should fail) 2) Implement minimal code to pass 3) Refactor with tests green 4) Enforce coverage (JaCoCo)
Unit Tests (JUnit 5 + Mockito)
@ExtendWith(MockitoExtension.class)
class MarketServiceTest {
@Mock MarketRepository r
[Description truncada. Veja o README completo no GitHub.]