public void CanThrowArgumentExceptionWhenSuppliedNumberDoesNotMeetRule(int number) { var exception = Assert.Throws <ArgumentException>(() => FizzBuzz.PrintFizzBuzz(number)); Assert.That(exception.Message, Is.EqualTo(string.Format("entered number is [{0}], which does not meet rule, entered number should be between 1 to 100.", number))); }
public void CanTestFizz() { Console.WriteLine(FizzBuzz.PrintFizzBuzz()); Assert.That(_resultFizz, Is.EqualTo(FizzBuzz.PrintFizzBuzz())); }