Exemple #1
0
        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;");
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
        }