mock
mock object http://www.c2.com/cgi/wiki?MockObject
mock aren't stubs http://martinfowler.com/articles/mocksArentStubs.htmlmock roles, not object http://www.jmock.org/oopsla2004.pdf
mock vs stub
http://weblogs.asp.net/rosherove/archive/2007/09/16/mocks-and-stubs-the-difference-is-in-the-flow-of-information.aspx
- Stubs provide input for the application under test so that the test can be performed on something else.
- Mocks provide input to the test to decide on pass\fail. the opposite direction.
xunit patterns http://xunitpatterns.com/Mocks,%20Fakes,%20Stubs%20and%20Dummies.html
Terminology Cross-Reference
I'm listing some sources of conflicting definitions just to make it clear what the mapping is to my pattern names:
| Sources and Names Used in them | |||||||||
| Pattern | Astels | Beck | Feathers | Fowler | jMock | UTWJ | OMG | Pragmatic | Recipes |
| Test Double | Double or stand-in | ||||||||
| Dummy Object | Stub | Dummy | Stub | ||||||
| Test Stub | Fake | Fake | Stub | Stub | Dummy | Mock | Fake | ||
| Test Spy | Dummy | Spy | |||||||
| Mock Object | Mock | Mock | Mock | Mock | Mock | Mock | Mock | ||
| Fake Object | Dummy | ||||||||
| Temporary Test Stub | Stub | ||||||||
| OMG's CORBA Stub | Stub | ||||||||


