Four major parts of a test:
- Setup state: Arrange - Setup state (fixture) (Given...)
- Run application code: Act - Run application code (exercise System-Under-Test) (When...)
- Check expectations: Assert - Check if it worked (Then...)
- Cleanup state: Teardown
Different types of tests:
- Stubs - check how data flows in a program
- Mocks - use to avoid testing every combination of dependencies
- Characterization - test after development (TAD) - take a snapshot of the current program