Part 2 Core techniques
Having covered the basics in part 1, I’ll now introduce the core testing and refactoring techniques necessary for writing tests in the real world.
In chapter 3, we’ll examine stubs and how they help break dependencies. We’ll go over refactoring techniques that make code more testable, and you’ll learn about seams in the process.
In chapter 4, we’ll move on to mock objects and interaction testing, we’ll look at how mock objects differ from stubs, and we’ll explore the concept of fakes.
In chapter 5, we’ll look at isolation frameworks, also known as mocking frameworks, and at how they solve some of the repetitive coding involved in handwritten mocks and stubs. Chapter 6 deals with asynchronous code, such as promises, timers, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access