Page145 - SniperAcquires some state

When the auction closes, we want the Sniper to announce whether it has won
or lost, which means that it must know whether it was bidding or winning
at the time. This implies that the Sniper will have to maintain some
state, which it hasnÎéÎ÷t had to so far. To get to the functionality we
want, we'll start with the simpler cases where the Sniper loses. As
Figure 14.2 shows, we're starting with one- and two-step transitions,
before adding the additional step that takes the Sniper to the Won state:
We start by revisiting an existing unit test and adding a new one. These
tests will pass with the current implementation; they're there to
ensure that we don't break the behavior when we add further
transitions. This introduces some new jMock syntax, states. The idea is to
allow us to make assertions about the internal state of the object under
test