Пример #1
0
        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)));
        }
Пример #2
0
 public void CanTestFizz()
 {
     Console.WriteLine(FizzBuzz.PrintFizzBuzz());
     Assert.That(_resultFizz, Is.EqualTo(FizzBuzz.PrintFizzBuzz()));
 }