O'Reilly logo

The Art of Unit Testing: with Examples in .NET by Roy Osherove

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

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

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