Now that you’re armed with the knowledge of what unit testing is for, you’re ready to dive into the very crux of what makes a good test and learn how to refactor your tests toward being more valuable. In chapter 4, you’ll learn about the four pillars that make up a good unit test. These four pillars set a foundation, a common frame of reference, which we’ll use to analyze unit tests and testing approaches moving forward.
Chapter 5 takes the frame of reference established in chapter 4 and builds the case for mocks and their relation to test fragility.
Chapter 6 uses the same the frame of reference to examine the three styles of unit testing. It shows which of those styles tends to produce tests of the best quality, and why.
Chapter 7 puts the knowledge from chapters 4 to 6 into practice and teaches you how to refactor away from bloated, overcomplicated tests to tests that provide as much value with as little maintenance cost as possible.