Annotations
Earlier JUnit libraries relied on Inheritance and specific design patterns to integrate the unit tests into runnable test suites. Modern JUnit relies on Java Annotations - which simplify test structure and enable more flexible structuring of tests classes.
Pragmatic Testing Stack Example
One way of becoming familiar with TDD is to explore some simple examples of various strategies that might be employed in some simple examples. Here we look the evolution of a simple Stack class.
Pragmatic Testing Video Player Example
Another worked example, this time a simple video player manager class. These examples give us a feel for simple strategies in evolving unit tests.
Pacemaker Tests
We try to apply some of these practices to the Pacemaker app we are building the labs. In general many of the tests are straightforward, however there are some subtleties in the serializer tests.
Lab-05 Refactoring
Refactor pacemaker to employ uuid instead of long ids. Unsure the tests as still passing as we make this transition. Make a start command line formatting features.
RefCardz: JUnit and EasyMock
This ref card gives tips on JUnit's lifecycle and annotations. It also covers EasyMock, which we will look at in later lectures.