There are 5 questions every unit test must answer. I’ve described them in detail before, so we’ll just skim them this time:
- What is the unit under test (module, function, class, whatever)?
- What should it do? (Prose description)
- What was the actual output?
- What was the expected output?
- How do you reproduce the failure?