7926d8c0c4774c44fd049f9499d1fcf74086cc8e
test-doubles.md
| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | -Page references to xUnit Test Patterns (XTD), especially Chapter 11 ("Test Doubles"), "Four-Phase Test" (pp. 358-361) and Practical Object-Oriented Design in Ruby (POODR), especially Chapter 9 ("Designing Cost-Effective Tests"). |
|
| 1 | +Page references to xUnit Test Patterns (XTP), especially Chapter 11 ("Test Doubles"), "Four-Phase Test" (pp. 358-361) and Practical Object-Oriented Design in Ruby (POODR), especially Chapter 9 ("Designing Cost-Effective Tests"). |
|
| 2 | 2 | |
| 3 | 3 | Other resources: |
| 4 | 4 | |
| ... | ... | @@ -6,7 +6,7 @@ Other resources: |
| 6 | 6 | |
| 7 | 7 | ### The thing we are testing (the SUT) |
| 8 | 8 | |
| 9 | -The thing we are testing is called a "System under test" (SUT) (XTD) or "object under test" (POODR, p. 195, Figure 9.1). We'll use SUT. It is fair to think about other things being under test, such as a class, object, method, or application, but the idea here is that the thing under test is defined by the scope of the test itself. Other objects may be involved, such as a "depended-on component" (DOC). |
|
| 9 | +The thing we are testing is called a "System under test" (SUT) (XTP) or "object under test" (POODR, p. 195, Figure 9.1). We'll use SUT. It is fair to think about other things being under test, such as a class, object, method, or application, but the idea here is that the thing under test is defined by the scope of the test itself. Other objects may be involved, such as a "depended-on component" (DOC). |
|
| 10 | 10 | |
| 11 | 11 |  |
| 12 | 12 | |
| ... | ... | @@ -49,7 +49,7 @@ It will look something like this: |
| 49 | 49 | |
| 50 | 50 | Converter.new(FToCConverter).convert(32) |
| 51 | 51 | |
| 52 | -Now our Converter class depends on a collaborator, FToCConverter. XTD calls this an |
|
| 52 | +Now our Converter class depends on a collaborator, FToCConverter. XTP calls this an |
|
| 53 | 53 | "indirect input" (p. 125), and the name it gives to this kind of collaborator is a DOC -- a "depended-on component." |
| 54 | 54 | We could test Converter with a specific Collaborator (FToCConverter) or we can try to test the SUT in isolation. |
| 55 | 55 | If we can test the SUT in isolation, then there will be fewer dependencies on other objects, |