示例#1
0
        public void ShouldReturn1For1Iteration()
        {
            var fizzBuzz = new FizzBuzz();
            var results  = fizzBuzz.Run(1);

            Assert.Equal("1", results);
        }
示例#2
0
        public void ShouldReturnFizzFor3Iterations()
        {
            var fizzBuzz = new FizzBuzz();
            var result   = fizzBuzz.Run(3);

            Assert.Equal("1\n2\nFizz", result);
        }
示例#3
0
        public void ShouldReturnFizzBuzzFor15Iterations()
        {
            var fizzBuzz = new FizzBuzz();
            var result   = fizzBuzz.Run(15);

            Assert.Equal("1\n2\nFizz\n4\nBuzz\nFizz\n7\n8\nFizz\nBuzz\n11\nFizz\n13\n14\nFizzBuzz", result);
        }
示例#4
0
        public void ShouldReturn2For2Iterations()
        {
            var fizzBuzz = new FizzBuzz();
            var result   = fizzBuzz.Run(2);

            Assert.Equal("1\n2", result);
        }