Chapter 10Result Verification

About This Chapter

Chapter 8, Transient Fixture Management, and Chapter 9, Persistent Fixture Management, described how to set up the test fixture and how to tear it down after exercising the SUT. This chapter introduces a variety of options for verifying that the SUT has behaved correctly, including exercising the SUT and comparing the actual outcome with the expected outcome.

Making Tests Self-Checking

One of the key characteristics of tests automated using xUnit is that they can be (and should be) Self-Checking Tests (see Goals of Test Automation on page 21). This characteristic makes them cost-effective enough to be run very frequently. Most members of the xUnit family come with a collection of built-in Assertion ...

Get xUnit Test Patterns: Refactoring Test Code now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.