예제 #1
0
        public void TestBestUndoubledContractIsComputed()
        {
            //Arrange
            const string pbnDeal = "W:752.854.Q3.A8732 AT83.T.AK9752.K9 KJ6.AKQJ732..J54 Q94.96.JT864.QT6";
            const SysVulnerabilityEnum vulnerability = SysVulnerabilityEnum.None;

            var module            = new ContractScoreCalculatorModule();
            var makeableContracts = DoubleDummyModule.CalculateMakeableContracts(pbnDeal);
            //Act
            var result = module.GetBestUndoubledContract(makeableContracts.AsQueryable(), vulnerability);

            //Assert
            Assert.AreEqual(3, result.Level);
            Assert.AreEqual(Trump.Spades, result.Trump);
        }