Summary

In this chapter, we've seen how collaborating components have an impact on our ability to write tests that run units shielded from the influences of other parts of a software system. We've learned how to use test doubles to isolate the components from real-world DOCs and hence, keep our tests fast, reliable, and maintainable.

To do so, you've been pointed first to the significance of indirect inputs and outputs. Once you understood this basic interaction principle between SUT and DOC, we went on with an in-depth discussion of the various double patterns available. In this context, you've been told about the intended use of dummy-, fake-, stub, spy, and mock stand-in types. After looking at the possibilities of mock frameworks and questioning ...

Get Testing with JUnit now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.