예제 #1
0
 def test_10回繰り返し実行ならば配列を返す(self):
     assert FizzBuzz.iterate(10) == [1, 2, 'Fizz', 4, 'Buzz', 'Fizz', 7, 8, 'Fizz', 'Buzz']
예제 #2
0
 def test_6ならばFizzを返す(self):
     assert FizzBuzz.generate(6) == 'Fizz'
예제 #3
0
 def test_101ならば101を返す(self):
     assert FizzBuzz.generate(101) == 101
예제 #4
0
 def test_5回繰り返し実行ならば配列を返す(self):
     assert FizzBuzz.iterate(5) == [1, 2, 'Fizz', 4, 'Buzz']
예제 #5
0
 def test_15ならばFizzBuzzを返す(self):
     assert FizzBuzz.generate(15) == 'FizzBuzz'
예제 #6
0
 def test_30ならばFizzBuzzを返す(self):
     assert FizzBuzz.generate(30) == 'FizzBuzz'
예제 #7
0
 def test_buzz_for_number_5(self):
     fizz_buzz = FizzBuzz()
     self.assertEqual(fizz_buzz.go(5), 'Buzz')
예제 #8
0
 def test_50ならばBuzzを返す(self):
     assert FizzBuzz.generate(50) == 'Buzz'
예제 #9
0
 def test_fizz_for_number_3(self):
     fizz_buzz = FizzBuzz()
     self.assertEqual(fizz_buzz.go(3), 'Fizz')
예제 #10
0
 def test_fizz_buzz_is_returned_for_multiples_of_15(self):
     fizz_buzz = FizzBuzz()
     self.assertEqual(fizz_buzz.go(30), 'FizzBuzz')
예제 #11
0
 def test_fizz_buzz_is_returned_for_15(self):
     fizz_buzz = FizzBuzz()
     self.assertEqual(fizz_buzz.go(15), 'FizzBuzz')
예제 #12
0
 def test_number_is_returned_for_non_multiples_of_3_or_5(self):
     fizz_buzz = FizzBuzz()
     self.assertEqual(fizz_buzz.go(2), 2)
예제 #13
0
 def test_buzz_for_multiples_of_5(self):
     fizz_buzz = FizzBuzz()
     self.assertEqual(fizz_buzz.go(10), 'Buzz')