A mock object is a fake object in the system that decides whether the unit test has passed or failed
Mocks are objects that register calls they receive.
objects pre-programmed with expectations which form a specification of the calls they are expected to receive
an object on which you set expectations
a class that implements an interface and allows the ability to dynamically set the values to return/exceptions to throw from particular methods and provides the ability to check if particular methods have been called/not called
Stub
unit test
A stub can replace an object in the unit testing world
Stub is an object that holds predefined data and uses it to answer calls during tests
provide canned answers to calls made during the test, usually not responding at all to anything outside what's programmed in for the test
an object that provides predefined answers to method calls
like a mock class, except that it doesn't provide the ability to verify that methods have been called/not called
Fake
unit test
fake is, not real
fakes are objects that have working implementations, but not same as production one
objects actually have working implementations, but usually take some shortcut which makes them not suitable for production
an object with limited capabilities
a class that implements an interface but contains fixed data and no logic