static void Main(string[] args) { FizzBuzzer fb = new FizzBuzzer(); //Can be further customized for more FizzBuzz Results! //fb.Length = 200; //fb.FizzMultiple = 4; //fb.BuzzMultiple = 10; for (int i = 1; i <= fb.Length; i++) { if (fb.IsFizzBuzz(i)) { Console.WriteLine("FizzBuzz"); } else if (fb.IsBuzz(i)) { Console.WriteLine("Buzz"); } else if (fb.IsFizz(i)) { Console.WriteLine("Fizz"); } else { Console.WriteLine(i); } } Console.WriteLine("Finished. Press any key to exit..."); Console.ReadKey(); }
public void should_return_fizzbuzz(int val) { _fizzBuzzer.IsFizzBuzz(val).Should().BeTrue(); _fizzBuzzer.GetFizzBuzzValue(val).Should().Be("FizzBuzz"); }