Appendix BxUnit Terminology

Mocks, Fakes, Stubs, and Dummies

Are you confused about what someone means when that individual says "test stub" or "mock object"? Do you sometimes feel that the person you are talking to is using a very different definition? Well, you are not alone!

The terminology for the various kinds of Test Doubles (page 522) is confusing and inconsistent. Different authors use different terms to mean the same thing. And sometimes they mean different things even when they use the same term! Ouch! (See the sidebar "What's in a (Pattern) Name?" on page 576 for why I think names are important.)

Part of my reason for writing this book was to try to establish some consistency in the terminology, thereby giving people a set of names ...

Get xUnit Test Patterns: Refactoring Test Code now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.