Exemplo n.º 1
0
 public void then_an_error_message_should_be_displayed_instead_of_a_sequence() =>
 SequenceGenerator.GenerateFizzBuzz(30, 1).Should().Be("Invalid sequence: The start (30) is higher than the end (1).  Please make the start number of the sequence higher than the end number (e.g. (1, 30) )");
Exemplo n.º 2
0
 public void Then_the_sequence_should_be_followed_by_a_report_summarising_the_words_returned() =>
 SequenceGenerator.GenerateFizzBuzz(1, 30).Split(Environment.NewLine).Last().Should().Be("fizz: 7 buzz: 4 fizzbuzz: 1 lucky: 4 integer: 14");
Exemplo n.º 3
0
 public void then_the_sequence_should_start_with_fizzbuzz() =>
 SequenceGenerator.GenerateFizzBuzz(0, 30).Should().StartWith("fizzbuzz 1", because: "zero is divisible by everything, but does not contain a 3");
Exemplo n.º 4
0
 public void Then_the_sequence_should_be_followed_by_a_report_summarising_the_words_returned(int start, int end, string result) =>
 SequenceGenerator.GenerateFizzBuzz(start, end).Split(Environment.NewLine).Last().Should().Be(result);
Exemplo n.º 5
0
 public void then_any_multiple_of_both_5_and_3_should_be_replaced_with_the_word_fizzbuzz() =>
 SequenceGenerator.GenerateFizzBuzz(1, 30).Split(Environment.NewLine).First().Should().Be("1 2 lucky 4 buzz fizz 7 8 fizz buzz 11 fizz lucky 14 fizzbuzz 16 17 fizz 19 buzz fizz 22 lucky fizz buzz 26 fizz 28 29 lucky");
Exemplo n.º 6
0
 public void Then_the_5_is_replaced_with_the_word_buzz(int start, int end, string result) =>
 SequenceGenerator.GenerateFizzBuzz(start, end).Split(Environment.NewLine).First().Should().Be(result);
Exemplo n.º 7
0
 public void Then_numbers_with_a_3_digit_should_be_replaced_with_the_word_lucky(int start, int end, string result) =>
 SequenceGenerator.GenerateFizzBuzz(start, end).Split(Environment.NewLine).First().Should().Be(result);
Exemplo n.º 8
0
 public void then_there_should_not_be_a_report_appended() =>
 SequenceGenerator.GenerateFizzBuzz(30, 1).Split(Environment.NewLine).Count().Should().Be(1);
Exemplo n.º 9
0
 public void then_any_multiple_of_both_5_and_3_should_be_replaced_with_the_word_fizzbuzz() =>
 SequenceGenerator.GenerateFizzBuzz(1, 30).Should().Be("1 2 fizz 4 buzz fizz 7 8 fizz buzz 11 fizz 13 14 fizzbuzz 16 17 fizz 19 buzz fizz 22 23 fizz buzz 26 fizz 28 29 fizzbuzz");
Exemplo n.º 10
0
 public void Then_the_5_is_replaced_with_the_word_buzz(int start, int end, string result) =>
 SequenceGenerator.GenerateFizzBuzz(start, end).Should().Be(result);