Ejemplo n.º 1
0
 def testTwoElementsGivesOkWithExistingNumber(self):
     chopper = KarateChopper()
     actual = chopper.chop(1, [1, 3])
     expected = 0
     self.assertEquals(actual, expected, "Not correctly chopped. {0} != {1}".format(actual, expected))
     
     actual = chopper.chop(3, [1, 3])
     expected = 1
     self.assertEquals(actual, expected, "Not correctly chopped. {0} != {1}".format(actual, expected))
Ejemplo n.º 2
0
 def testOneElementGivesOkIfNumberIsEquals(self):
     chopper = KarateChopper()
     actual = chopper.chop(1, [1])
     expected = 0
     self.assertEquals(actual, expected, "Not correctly chopped. {0} != {1}".format(actual, expected))
Ejemplo n.º 3
0
 def testNoElementsGivesError(self):
     chopper = KarateChopper()
     actual = chopper.chop(3, [])
     expected = -1
     self.assertEquals(actual, expected, "Not correctly chopped. {0} != {1}".format(actual, expected))