O'Reilly logo

xUnit Test Patterns: Refactoring Test Code by Gerard Meszaros

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11Using Test Doubles

About This Chapter

The last few chapters concluding with Chapter 10, Result Verification, introduced the basic mechanisms of running tests using the xUnit family of Test Automation Frameworks (page 298). For the most part we assumed that the SUT was designed such that it could be tested easily in isolation of other pieces of software. When a class does not depend on any other classes, testing it is relatively straightforward and the techniques described in this chapter are unnecessary. When a class does depend on other classes, we have two choices: We can test it together with all the other classes it depends on or we can try to isolate it from the other classes so that we can test it by itself. This chapter introduces ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required