Definitions
Stub
|
Minimal implementations of interfaces or base classes
|
Spy
|
A Spy will record which members were invoked
|
Fake
|
More complex, a fake may resemble a production implementation
|
Mock
|
It is usually dynamically created by a mock library and depending in its configuration a mock can behave like a dummy, a stub, or a spy.
|
Comments
All
|
They all relate to functions, objects and other types.
|
Stub
|
Stubbing is a way to provide dummy data/info instead of making the calling to the actual DB
|
Fake
|
It is for example a function which you create inside the test file to mimic the real function or be a simplified version of the actual function.
|