O'Reilly logo

xUnit Test Patterns: Refactoring Test Code by Gerard Meszaros

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required