@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))); }
public void makePayment(Payment paymentAmount) { this.payment = paymentAmount; Money payment = this.payment.getAmount(); this.cashBack = payment.subtract(this.total); }