private void ChatMessageRecieved(string message) { AuctionEvent ev = AuctionEvent.From(message); AuctionCommand command = _auctionSniper.Process(ev); if (command != AuctionCommand.None()) { _chat.SendMessage(command.ToString()); } Notify(nameof(LastPrice)); Notify(nameof(LastBid)); Notify(nameof(State)); }
public void Bid_command_is_of_appropriate_content() { AuctionCommand command = AuctionCommand.Bid(123); command.ToString().ShouldEqual("SOLVersion: 1.1; Command: BID; Price: 123;"); }
public void Join_command_is_of_appropriate_content() { AuctionCommand command = AuctionCommand.Join(); command.ToString().ShouldEqual("SOLVersion: 1.1; Command: JOIN;"); }