public void Given1Return1() { FizzBuzzController controller = new FizzBuzzController(); ViewResult result = controller.Index(1) as ViewResult; string expected = "1 "; string actual = result?.ViewBag.Output; Assert.AreEqual(expected, actual); }
public void Given15ReturnFizzBuzz() { FizzBuzzController controller = new FizzBuzzController(); ViewResult result = controller.Index(15) as ViewResult; string expected = "1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz "; string actual = result?.ViewBag.Output; Assert.AreEqual(expected, actual); }