Testing with Fakes: Why This Pays Off
Because the checkout service is handed its clock and its loan repository, a test can hand it a clock set to any day and loans kept in memory, so every late-fee rule and the five-book limit are checked in a few milliseconds, with no database and no waiting; this lesson writes those tests, names the kinds of stand-in (fakes, stubs and mocks), and says what they can't catch.
Updated

- Category
- Data Structures
- Level
- Journeyman
- Tags
- Flaky Test, OOP, software-development, Stub and Fake, Test Double, Test Isolation