Пример #1
0
 public void Auction_FourPassesEndsAuction()
 {
     Auction auction = new Auction(CardinalDirection.North, Vurnability.None);
     auction.PlaceBid(_simplePass);
     auction.PlaceBid(_simplePass);
     auction.PlaceBid(_simplePass);
     auction.PlaceBid(_simplePass);
     Assert.IsTrue(auction.IsAuctionOver);
 }
Пример #2
0
 public void Auction_BidAfterAuctionOverThrows()
 {
     Auction auction = new Auction(CardinalDirection.North, Vurnability.None);
     auction.PlaceBid(_simplePass);
     auction.PlaceBid(_simplePass);
     auction.PlaceBid(_simplePass);
     auction.PlaceBid(_simplePass);
     auction.PlaceBid(_simplePass);
 }
Пример #3
0
        public void Auction_InvalidBidThrows()
        {
            Auction auction = new Auction(CardinalDirection.North, Vurnability.None);

            var heartBid = new BidTrumph(TrumphSuite.Hearts, 1);
            PlacedBid heartPlacedBid = new PlacedBid(heartBid,
                new List<BidMeaning>()
                {
                    new BidMeaning(13, 21, new List<SuiteTells>() {new SuiteTells(SuiteColor.Hearts, 4, 11)})
                });

            var clubBid = new BidTrumph(TrumphSuite.Clubs, 1);
            PlacedBid clubPlacedBid = new PlacedBid(heartBid,
                new List<BidMeaning>()
                {
                    new BidMeaning(13, 21, new List<SuiteTells>() {new SuiteTells(SuiteColor.Clubs, 4, 11)})
                });

            auction.PlaceBid(heartPlacedBid);
            auction.PlaceBid(clubPlacedBid);
        }
Пример #4
0
 public void Auction_ThreePassesAuctionStillOpen()
 {
     Auction auction = new Auction(CardinalDirection.North, Vurnability.None);
     auction.PlaceBid(_simplePass);
     auction.PlaceBid(_simplePass);
     auction.PlaceBid(_simplePass);
     Assert.IsFalse(auction.IsAuctionOver);
 }