示例#1
0
 def testFirstCall(self):
     "1st call"
     fizzbuzzer = FizzBuzzer()
     eq_('1', fizzbuzzer.call())
示例#2
0
 def testSecondCall(self):
     "2nd call"
     fizzbuzzer = FizzBuzzer()
     fizzbuzzer.call()
     eq_('2', fizzbuzzer.call())
示例#3
0
 def testThirdCall(self):
     "3rd call"
     fizzbuzzer = FizzBuzzer()
     fizzbuzzer.call()
     fizzbuzzer.call()
     eq_('fizz', fizzbuzzer.call())
示例#4
0
	def testFirstCall(self):
		"1st call"
		fizzbuzzer = FizzBuzzer()
		eq_('1', fizzbuzzer.call())
示例#5
0
	def testSecondCall(self):
		"2nd call"
		fizzbuzzer = FizzBuzzer()
		fizzbuzzer.call()
		eq_('2', fizzbuzzer.call())
示例#6
0
	def testThirdCall(self):
		"3rd call"
		fizzbuzzer = FizzBuzzer()
		fizzbuzzer.call()
		fizzbuzzer.call()
		eq_('fizz', fizzbuzzer.call())
 def test_fizzbuzz_when_2_next_next(self):
     x=FizzBuzzer(2)
     x.next()
     self.assertEqual('4', x.next()['result'],"starting at 2 followed by next 2 times returns 4 as string")
 def test_fizzbuzz_when_2_next(self):
     x=FizzBuzzer(2)
     self.assertEqual('fizz', x.next()['result'],"starting at 2 followed by next results in 3 which is fizz")
 def test_fizzbuzz_when_0_next(self):
     x=FizzBuzzer(0)
     self.assertEqual("1", x.next()['result'], "starting at 0 followed by next returns 1 as string")
 def test_fizzbuzz_when_0(self):
     x=FizzBuzzer()
     self.assertEqual(x.number, 0, "starting at 0 initializes number as 0")