Пример #1
0
        public void TestMultilesOfFivePrintsBuzz()
        {
            var printerTest = new PrinterServiceTest();
            var fizzBuzz = new FizzBuzzService(printerTest);

            Assert.That(fizzBuzz.Output(5), Is.StringMatching("Buzz"));
            Assert.That(fizzBuzz.Output(65), Is.StringMatching("Buzz"));
        }
Пример #2
0
        public void TestMultiplesOfThreePrintsFizz()
        {
            var printerTest = new PrinterServiceTest();
            var fizzBuzz = new FizzBuzzService(printerTest);

            Assert.That(fizzBuzz.Output(3), Is.StringMatching("Fizz"));
            Assert.That(fizzBuzz.Output(96), Is.StringMatching("Fizz"));
        }
Пример #3
0
        public void TestIsNotMultipleOfThreeOrFive()
        {
            var printerTest = new PrinterServiceTest();
            var fizzBuzz = new FizzBuzzService(printerTest);

            Assert.That(fizzBuzz.Output(7), Is.StringMatching("7"));
            Assert.That(fizzBuzz.Output(19), Is.StringMatching("19"));
        }