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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.