Franck Arrecot & Kevin Ottens
In automated unit testing, it may be necessary to use objects or procedures that look and behave like their release-intended counterparts, but are actually simplified versions that reduce the complexity and facilitate testing.
In fiction and folklore, a doppelgänger is a look-alike or double of a living person, sometimes portrayed as a paranormal phenomenon […]
Dummies are used when a parameter is needed for the tested method but without actually needing to use the parameter
Stubs are used for providing the tested code with indirect input
Mocks are used for verifying indirect output of the tested code
Fakes are used as a simpler implementation of a system (e.g. in-memory database)