Introduction

Class diagram of the dictionary.

Automating Unit Tests

The AWT test runner.
The Swing test runner.
StringBufferTest without tests.
Test runner reports a failure.

Basic Steps of the Test-First Approach

Top-down versus bottom-up approaches.
A small test class hierarchy.
Package structure with test classes.

The Inner Life of a Test Framework

JUnit class diagram.
Sequence diagram for the start of a test case.

Dummy and Mock Objects for Independence

Schematic view of the Dependency Inversion Principle.
Schematic view of the mock objects hierarchy.

Inheritance and Polymorphism

A simple inheritance hierarchy.
A parallel test hierarchy.
Interfaces.
Interface test classes.

Persistent Objects

Object model of the CRM app.
An object-centered persistence interface.

Web apps

MyServlet in the browser.
Test case running in Cactus.
ServletInvocation.

Graphical User Interfaces

The desired Product Editor layout.
A "rudimentary" layout.
The improved layout.

The Role of Unit Tests in the Software Process

Activities, intermediate results, and products in the development process.
Quality-assurance tasks.
The waterfall model [Boehm76].
An incremental process.
Comparing the costs of manual versus automated testing.
Structure of the Rational Unified Process.
Relations between the RUP's testing artifacts.

Unit Tests with Other Programming Languages

The SUnit test runner.
A graphical test runner.