BDD & TDD / Quiz
Know Your Doubles
Dummy, stub, spy, mock, fake. Five words, five different tools, and a suite that rots when you can't tell them apart.
- Difficulty
- Hard
- Format
- Quiz
- Points
- 200
- Estimate
- 12 min
// MISSION BRIEF
Your Mission
Every "mock" in your codebase is actually one of five distinct test doubles, and each solves a different problem. This quiz drills the Meszaros/Fowler taxonomy, state vs behavior verification, and the smell of mock overuse.
Scoring: timed quiz; accuracy first, speed bonus for fast clean runs.
// FIRST CONTACT
Battle teaser
A constructor requires a logger, but the test never exercises logging. You pass a placeholder object that is never called. That double is a:
- ADummy: passed to satisfy a signature, never used
- BMock
- CFake
- DStub
Answers, scoring, hints, and the full battle stay sealed.
// SKILL TAGS
test-doublesmockingunit-testingtdd