@Test public void willLimitBidToMaximum() throws Exception { sniper.bidAccepted(maximumBid.subtract(new Money(1))); new Verifications() { { auction.bid(maximumBid); } }; }
@Test public void willLimitBidToMaximum() throws Exception { context.checking( new Expectations() { { exactly(1).of(auction).bid(maximumBid); } }); sniper.bidAccepted(maximumBid.subtract(new Money(1))); }