Having covered the basics in previous chapters, we’ll now introduce the core testing and refactoring techniques that are necessary for writing tests in the real world.
In chapter 3, we’ll begin by learning about stubs and how they help us break dependencies. We’ll go over refactoring techniques that make code more testable, and we’ll learn about seams in the process.
Then, in chapter 4, we’ll move on to mock objects and interaction testing and look at how mock objects differ from stubs.
Lastly, in chapter 5, we’ll look at isolation frameworks (also known as mock object frameworks) and how they solve some of the repetitive coding involved in handwritten mocks and stubs. Chapter 5 also compares the leading isolation ...