Skip to content

Instantly share code, notes, and snippets.

@ClausPolanka
Created August 28, 2010 20:29
Show Gist options
  • Save ClausPolanka/555539 to your computer and use it in GitHub Desktop.
Save ClausPolanka/555539 to your computer and use it in GitHub Desktop.
@Test
public void reportsLostIfAuctionClosesWhenBidding() {
context.checking(new Expectations() {{
ignoring(auction);
allowing
(sniperListener).sniperBidding(); then(sniperState.is("bidding"));
atLeast(1).of
(sniperListener).sniperLost(); when(sniperState.is("bidding"));
}});
sniper.currentPrice(123, 45, PriceSource.FromOtherBidder);
sniper.auctionClosed();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment