Unit Testing Design Patterns
function(args) -> value
- Test "happy path"
- Out-of-range
- Missing required arg
- Boolean arg toggle
- Useful exceptions
Log and Move On Exception Handling
- Check that exception isn't bubbled up.
- Check log message creation.
External Interfaces
- Mock for unit testing context.
- Test happy path and failure cases from services.
- Mock test cases where remote program things its sending the right thing, but the input is flawed.
- Check client library for "hidden" service calls.