Esempio n. 1
0
        public void Get_Returns_1_For_1()
        {
            var fizzBuzz = new FizzBuzzClass();
            var result   = fizzBuzz.Get(1);

            Assert.Equal("1", result);
        }
Esempio n. 2
0
        public void Get_Returns_30_For_30()
        {
            var fizzBuzz = new FizzBuzzClass();
            var result   = fizzBuzz.Get(30);

            Assert.Equal("Fizzbuzz", result);
        }
Esempio n. 3
0
        public void Get_Returns_5_For_5()
        {
            var fizzBuzz = new FizzBuzzClass();
            var result   = fizzBuzz.Get(5);

            Assert.Equal("Buzz", result);
        }
Esempio n. 4
0
        public void Get_Returns_6_For_6()
        {
            var fizzBuzz = new FizzBuzzClass();
            var result   = fizzBuzz.Get(6);

            Assert.Equal("Fizz", result);
        }
Esempio n. 5
0
        public void Get_Returns_2_For_2()
        {
            var fizzBuzz = new FizzBuzzClass();
            var result   = fizzBuzz.Get(2);

            Assert.Equal("2", result);
        }
Esempio n. 6
0
        static void Main(string[] args)
        {
            //instantiate and create new object for class FizzBuzzClass
            FizzBuzzClass myFizz = new FizzBuzzClass();

            //Define what to count to
            for (int n = 1; n <= 100; n++)
            {
                //Create variable and pass n into the Get method
                string myVar = myFizz.Get(n);

                //output myVar if meets FizzBuzz.Get method conditions else output number
                Console.WriteLine(myVar);
            }

            //Call Get method from within FizzBuzzClass

            Console.ReadLine();
        }