コード例 #1
0
  @Test
  public void willLimitBidToMaximum() throws Exception {
    sniper.bidAccepted(maximumBid.subtract(new Money(1)));

    new Verifications() {
      {
        auction.bid(maximumBid);
      }
    };
  }
コード例 #2
0
  @Test
  public void willLimitBidToMaximum() throws Exception {
    context.checking(
        new Expectations() {
          {
            exactly(1).of(auction).bid(maximumBid);
          }
        });

    sniper.bidAccepted(maximumBid.subtract(new Money(1)));
  }