Bas Bossink
November 2010
Thread.Sleep(...)| Pattern | Purpose | Has Behavior | Injects indirect inputs into SUT | Handles indirect outputs of SUT | Values provided by test(er) | Examples |
|---|---|---|---|---|---|---|
| Test Double | Generic name for family | |||||
| Dummy Object | Attribute or Method Parameter | no | no, never called | no, never called | no | Null, "Ignored String", new Object() |
| Test Stub | Verify indirect inputs of SUT | yes | yes | ignores them | inputs | |
| Test Spy | Verify indirect outputs of SUT | yes | optional | captures them for later verification | inputs (optional) | |
| Mock Object | Verify indirect outputs of SUT | yes | optional | verifies correctness against expectations | outputs & inputs (optional) | |
| Fake Object | Run (unrunnable) tests (faster) | yes | no | uses them | none | In-memory database emulator |
| Temporary Test Stub | Stand in for procedural code not yet written | yes | no | uses them | none | In-memory database emulator |