Example #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);
 }
Example #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);
 }
Example #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);
        }
Example #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);
 }