Part 2. Core techniques

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 ...

Get The Art of Unit Testing 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.