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 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 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 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)