|
|
# Definitions
|
|
|
|
|
|
- Stubs: provide canned answers to calls made during the test, usually not responding at all to anything outside what's programmed in for the test;
|
|
|
- Mocks: are pre-programmed with expectations which form a specification of the calls they are expected to receive. They can throw an exception if they receive a call they don't expect and are checked during verification to ensure they got all the calls they were expecting.
|
|
|
- **Stubs**: provide canned answers to calls made during the test, usually not responding at all to anything outside what's programmed in for the test;
|
|
|
- **Mocks**: are pre-programmed with expectations which form a specification of the calls they are expected to receive. They can throw an exception if they receive a call they don't expect and are checked during verification to ensure they got all the calls they were expecting.
|
|
|
|
|
|
# Stub examples
|
|
|
|
... | ... | |