af3841f12f4488fba1fff873265c6fa034eabc03
test-doubles.md
... | ... | @@ -6,6 +6,17 @@ The thing we are testing is called a "System under test" (SUT) (XTD) or "object |
6 | 6 | |
7 | 7 |  |
8 | 8 | |
9 | +### Testing messages received from others |
|
10 | + |
|
11 | +When we receive a message from another object, we want to verify a state change in our own object. |
|
12 | + |
|
13 | +Example: Suppose we have an object that converts fahrenheit to celsius. When we pass in a measurement |
|
14 | +in fahrenheit, we want to verify that the computation of the celsius value is correct. |
|
15 | + |
|
16 | +### Testing messages sent to others |
|
17 | + |
|
18 | +When we send a message to another object that results in a side effect, we want to verify the side effect. |
|
19 | + |
|
9 | 20 | * SUT - System under test |
10 | 21 | * DOC - Depended-on component |
11 | 22 | * "indirect input" - This is data that gets into the SUT from a DOC. I.e., we're not calling a method with parameters; inputs are getting into the SUT via some DOC. (126) |