Naming test objects - mock, stub, fake?

Martin Fowler recently posted about the confusion regarding what to name test doubles, and proposes a standard from Gerard Meszaros' upcoming book. The names are as follows, with descriptions paraphrased from the using test double page at the books outline: XUnit Test Patterns : Refactoring Test Code

I'm not sure if these names jive with what I am used to, but as long as the community can agree on some sort of consistent standard and stick with it I will happily adopt it. Trying to explain the difference between an EasyMock provided mock and a canned "fake object" gets tiring.

Back to the front page