コード例 #1
0
        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));
        }
コード例 #2
0
ファイル: AuctionCommandTests.cs プロジェクト: powerdude/Goos
        public void Bid_command_is_of_appropriate_content()
        {
            AuctionCommand command = AuctionCommand.Bid(123);

            command.ToString().ShouldEqual("SOLVersion: 1.1; Command: BID; Price: 123;");
        }
コード例 #3
0
ファイル: AuctionCommandTests.cs プロジェクト: powerdude/Goos
        public void Join_command_is_of_appropriate_content()
        {
            AuctionCommand command = AuctionCommand.Join();

            command.ToString().ShouldEqual("SOLVersion: 1.1; Command: JOIN;");
        }