public void Two_commands_are_equal_if_their_contents_match() { AuctionCommand command1 = AuctionCommand.Bid(123); AuctionCommand command2 = AuctionCommand.Bid(123); command1.ShouldEqual(command2); command1.GetHashCode().ShouldEqual(command2.GetHashCode()); }
public void Sniper_bids_when_price_event_with_a_different_bidder_arrives() { var sniper = new AuctionSniper("", 200); AuctionCommand command = sniper.Process(AuctionEvent.Price(1, 2, "some bidder")); command.ShouldEqual(AuctionCommand.Bid(3)); sniper.StateShouldBe(SniperState.Bidding, 1, 3); }
public void Bid_command_is_of_appropriate_content() { AuctionCommand command = AuctionCommand.Bid(123); command.ToString().ShouldEqual("SOLVersion: 1.1; Command: BID; Price: 123;"); }