def play(n): results = [] if not number_util.is_positive_integer(n): results.append("the value of n must be a positive, non-zero integer") for i in range(1, n + 1): results.append(fizz_buzz.process(i)) return results
def test_when_processing_a_number_divisible_by_three_then_fizz_should_be_returned( self): self.assertEqual('Fizz', fizz_buzz.process(3))
def test_when_processing_a_number_not_divisible_by_three_or_five_then_the_original_number_should_be_returned( self): self.assertEqual('2', fizz_buzz.process(2))