public void Outlier_FizzBuzzTest()
        {
            // Arrange
            KataFizzBuzz sum = new KataFizzBuzz();
            // Add
            string result = sum.fizzBuzz(22);

            // Arrange
            Assert.AreEqual("22", result);
        }
        public void FizzBuzz_FizzBuzzTest()
        {
            // Arrange
            KataFizzBuzz sum = new KataFizzBuzz();
            // Add
            string result = sum.fizzBuzz(15);

            // Arrange
            Assert.AreEqual("FizzBuzz", result);
        }
        public void OneHundred_FizzBuzzTest()
        {
            // Arrange
            KataFizzBuzz sum = new KataFizzBuzz();

            // Act
            string result = sum.fizzBuzz(100);

            // Assert
            Assert.AreEqual("Buzz", result);
        }
        public void FiftyThree_FizzBuzzTest()
        {
            // Arrange
            KataFizzBuzz sum = new KataFizzBuzz();

            // Act
            string result = sum.fizzBuzz(53);

            // Assert
            Assert.AreEqual("FizzBuzz", result);
        }
        public void ThirtyFive_FizzBuzzTest()
        {
            // Arrange
            KataFizzBuzz sum = new KataFizzBuzz();

            // Act
            string result = sum.fizzBuzz(35);

            // Assert
            Assert.AreEqual("FizzBuzz", result);
        }
예제 #6
0
        public void FizzBuzz_Non_Fizzy_Buzzy_Numbers_Test()
        {
            KataFizzBuzz kfb = new KataFizzBuzz();

            Assert.AreEqual("2", kfb.fizzBuzz(2));
            Assert.AreEqual("7", kfb.fizzBuzz(7));
            Assert.AreEqual("17", kfb.fizzBuzz(17));
            Assert.AreEqual("Fizz", kfb.fizzBuzz(34)); //Step 2: 34 contains a 3, so is now Fizz, not 34
            Assert.AreEqual("Buzz", kfb.fizzBuzz(53)); //Step 2: 53 contains a 5 and 3, but 5 is checked first, so Buzz
            Assert.AreEqual("86", kfb.fizzBuzz(86));
        }
예제 #7
0
        public void FizzBuzz_Obvious_Cases_Test()
        {
            KataFizzBuzz kfb = new KataFizzBuzz();

            Assert.AreEqual("Fizz", kfb.fizzBuzz(3));
            Assert.AreEqual("Buzz", kfb.fizzBuzz(5));
            Assert.AreEqual("Fizz", kfb.fizzBuzz(6));
            Assert.AreEqual("Fizz", kfb.fizzBuzz(9));
            Assert.AreEqual("FizzBuzz", kfb.fizzBuzz(15));
            Assert.AreEqual("FizzBuzz", kfb.fizzBuzz(45));
        }
예제 #8
0
        public void FizzBuzz_101_Test()
        {
            KataFizzBuzz kfb = new KataFizzBuzz();

            Assert.AreEqual("", kfb.fizzBuzz(101));
        }