def testRightJack(self): hc = HandCalculator() score = hc.calculateScore([ Card("Hearts", "4"), Card("Spade", "J"), Card("Club", "6"), Card("Club", "7") ], Card("Spade", "3"), False) self.assertEqual(1, score)
def testFlushKittyZero(self): hc = HandCalculator() score = hc.calculateScore([ Card("Hearts", "2"), Card("Club", "4"), Card("Hearts", "6"), Card("Hearts", "8") ], Card("Hearts", "10"), True) self.assertEqual(0, score)
def testCalculateScore2(self): hc = HandCalculator() score = hc.calculateScore([ Card("Hearts", "4"), Card("Hearts", "5"), Card("Hearts", "6"), Card("Hearts", "6") ], Card("Hearts", "6"), True) self.assertEqual(26, score)
def testFlushHandWithOutCut(self): hc = HandCalculator() score = hc.calculateScore([ Card("Hearts", "2"), Card("Hearts", "4"), Card("Hearts", "6"), Card("Hearts", "8") ], Card("Club", "10"), False) self.assertEqual(4, score)
def testCalculateScore29Hand(self): hc = HandCalculator() score = hc.calculateScore([ Card("Hearts", "J"), Card("Club", "5"), Card("Diamond", "5"), Card("Spade", "5") ], Card("Hearts", "5"), True) self.assertEqual(29, score)
def testCalculateScore1(self): hc = HandCalculator() score = hc.calculateScore([ Card("Hearts", "7"), Card("Club", "8"), Card("Diamond", "8"), Card("Spade", "9") ], Card("Hearts", "6"), True) self.assertEqual(16, score)
def testFindRunsZeroTwoAdjacent(self): hcr = HandCalculator() score = hcr.calculateRunScore([ Card("Hearts", "2"), Card("Club", "A"), Card("Hearts", "Q"), Card("Spade", "8"), Card("Hearts", "10") ]) self.assertEqual(0, score)
def testFifteensAllFive(self): hc = HandCalculator() score = hc.calculateFifteensScore([ Card("Hearts", "A"), Card("Club", "2"), Card("Spade", "3"), Card("Diamond", "4"), Card("Club", "5") ]) self.assertEqual(2, score)
def testFifteensZero(self): hc = HandCalculator() score = hc.calculateFifteensScore([ Card("Hearts", "2"), Card("Club", "2"), Card("Spade", "Q"), Card("Diamond", "4"), Card("Club", "Q") ]) self.assertEqual(0, score)
def testZeroPair(self): hc = HandCalculator() score = hc.calculatePairScore([ Card("Hearts", "A"), Card("Club", "2"), Card("Spade", "3"), Card("Diamond", "4"), Card("Club", "5") ]) self.assertEqual(0, score)
def testFourOfAKind(self): hc = HandCalculator() score = hc.calculatePairScore([ Card("Hearts", "A"), Card("Club", "2"), Card("Spade", "A"), Card("Diamond", "A"), Card("Club", "A") ]) self.assertEqual(12, score)
def testDoubleDoubleRun(self): hcr = HandCalculator() score = hcr.calculateRunScore([ Card("Hearts", "A"), Card("Club", "2"), Card("Spade", "A"), Card("Diamond", "3"), Card("Club", "3") ]) self.assertEqual(12, score)
def testRunofFive(self): hcr = HandCalculator() score = hcr.calculateRunScore([ Card("Hearts", "A"), Card("Club", "2"), Card("Spade", "5"), Card("Diamond", "3"), Card("Club", "4") ]) self.assertEqual(5, score)
def testFindRunsThree(self): hcr = HandCalculator() score = hcr.calculateRunScore([ Card("Hearts", "2"), Card("Club", "4"), Card("Hearts", "3"), Card("Spade", "8"), Card("Hearts", "10") ]) self.assertEqual(3, score)