Chapter 21Result Verification Patterns

Patterns in This Chapter

Verification Strategy

      State Verification 462

      Behavior Verification 468

Assertion Method Styles

      Custom Assertion 474

      Delta Assertion 485

      Guard Assertion 490

      Unfinished Test Assertion 494

State Verification

Also known as

State-Based Testing

How do we make tests self-checking when there is state to be verified?

We inspect the state of the system under test after it has been exercised and compare it to the expected state.

image

A Self-Checking Test (see page 26) must verify that the expected outcome has occurred without manual intervention by whoever is running ...

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.