コード例 #1
0
ファイル: AuctionCommandTests.cs プロジェクト: powerdude/Goos
        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());
        }
コード例 #2
0
ファイル: AuctionSniperTests.cs プロジェクト: powerdude/Goos
        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);
        }
コード例 #3
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;");
        }