public void Close_method_returns_a_close_event() { AuctionEvent auctionEvent = AuctionEvent.Close(); auctionEvent.Type.ShouldEqual(AuctionEventType.Close); auctionEvent.ToString().ShouldEqual("SOLVersion: 1.1; Event: CLOSE;"); }
public void Bidding_sniper_loses_when_auction_closes() { AuctionSniper sniper = CreateBiddingSniper(); AuctionCommand command = sniper.Process(AuctionEvent.Close()); command.ShouldEqual(AuctionCommand.None()); sniper.StateShouldBe(SniperState.Lost, 1, 3); }
public void Losing_sniper_loses_when_auction_closes() { AuctionSniper sniper = CreateLosingSniper(); AuctionCommand command = sniper.Process(AuctionEvent.Close()); command.ShouldEqual(AuctionCommand.None()); sniper.Snapshot.State.ShouldEqual(SniperState.Lost); }
public void Joining_sniper_loses_when_auction_closes() { var sniper = new AuctionSniper("", 200); AuctionCommand command = sniper.Process(AuctionEvent.Close()); command.ShouldEqual(AuctionCommand.None()); sniper.StateShouldBe(SniperState.Lost, 0, 0); }