public void TestAuctionsQueens(string testName, string northHand, string southHand, string expectedBidsNorth, string expectedBidsSouth) { // This test can fail because it relies on the sampling and dds. if (testName is null) { throw new ArgumentNullException(nameof(testName)); } logger.Info($"Executing testcase {testName}"); _ = Pinvoke.Setup("Tosr.db3"); var bidManager = new BidManager(new BidGenerator(), fasesWithOffset, reverseDictionaries, true, false); var auction = bidManager.GetAuction(northHand, southHand); var actualBidsSouth = auction.GetBidsAsString(Player.South); Assert.Equal(expectedBidsSouth, actualBidsSouth); var actualBidsNorth = auction.GetBidsAsString(Player.North); Assert.Equal(expectedBidsNorth, actualBidsNorth); var constructedSouthHand = bidManager.biddingInformation.ConstructSouthHand(northHand); Assert.Equal(Util.HandWithx(southHand), constructedSouthHand.First()); var queens = bidManager.biddingInformation.GetQueensFromAuction(auction, reverseDictionaries); Assert.True(BiddingInformation.CheckQueens(queens, southHand)); }
public static void AssertHand(BiddingInformation bidManager, Auction auction, string northHand, string southHand, ReverseDictionaries reverseDictionaries) { var constructedSouthHand = bidManager.ConstructSouthHand(northHand); Assert.Equal(Util.HandWithx(southHand), constructedSouthHand.First()); var queens = bidManager.GetQueensFromAuction(auction, reverseDictionaries); Assert.True(BiddingInformation.CheckQueens(queens, southHand)); }