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 19xUnit Basics Patterns

Patterns in This Chapter

Test Definition

      Test Method 348

            Four-Phase Test 358

      Assertion Method 362

            Assertion Message 370

      Testcase Class 373

Test Execution

      Test Runner 377

      Testcase Object 382

      Test Suite Object 387

      Test Discovery 393

      Test Enumeration 399

      Test Selection 403

Test Method

Where do we put our test code?

We encode each test as a single Test Method on some class.

image

Fully Automated Tests (see page 26) consist of test logic. That logic has to live somewhere before we can compile and execute it.

How It Works

We define each test as a ...

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