public void GetFizzBuzzStringTest() { //Arrange FizzBuzz fizzBuzz = new FizzBuzz(); //Act for (int i = 1; i <= 300; i++) { var text = fizzBuzz.GetFizzBuzzString(i); //Assert if (i == 42) { Assert.AreEqual("Answer to the Ultimate Question of Life, the Universe, and Everything", text); } else if (i % 3 == 0 && i % 5 == 0) { Assert.AreEqual("Fizzbuzz", text); } else if (i % 5 == 0) { Assert.AreEqual("Buzz", text); } else if (i % 3 == 0) { Assert.AreEqual("Fizz", text); } else { Assert.AreEqual(i.ToString(), text); } } }