February 2018
Intermediate to advanced
406 pages
9h 52m
English
One complicating factor in dealing with test doubles is that pretty much everybody who creates a tool feels perfectly free to use slightly different naming conventions than everybody else. Here are the names I use, which are—of course—also the correct ones. (This naming structure is the creation of Gerard Meszaros in xUnit Test Patterns [Mes07].)
The generic term for any object used as a stand-in for another object is test double, by analogy to “stunt double” and with the same connotation of a cheaper or more specialized replacement for a more expensive real object. Colloquially, mock object is also sometimes used as a generic term but, confusingly, is also the name of a specific type of test double.
A fake is typically ...