TDD Mastery
Core Cycle: Red-Green-Refactor
- Red - Write a failing test that defines the desired behavior
- Green - Write the minimum code to make the test pass
- Refactor - Clean up while keeping tests green
Never write production code without a failing test first. Each cycle should take 2-10 minutes.
Test Structure
Use the Arrange-Act-Assert pattern consistently:
Arrange: Set up test data and dependencies
Act: Execute the behavior under test
Assert: Verify
[Description truncada. Veja o README completo no GitHub.]