public void TestFizzBuzzNumbers()
        {
            HomeController controller = new HomeController();

            var result = controller.GetFizzBuzzNumbers(-1);
            Assert.IsTrue(!result.Any());

            result = controller.GetFizzBuzzNumbers(0);
            Assert.AreEqual("0", result.Last());
            Assert.AreEqual(1, result.Count());

            result = controller.GetFizzBuzzNumbers(15);
            Assert.AreEqual("Z", result.Last());
            Assert.AreEqual("E", result.ElementAt(10));
            Assert.AreEqual("C", result.ElementAt(9));
            Assert.AreEqual("11", result.ElementAt(11));
        }
        public void TestEvenNumbers()
        {
            HomeController controller = new HomeController();

            var result = controller.GetEvenNumbers(-1);
            Assert.IsTrue(!result.Any());

            result = controller.GetEvenNumbers(0);
            Assert.AreEqual(0, result.Last());
            Assert.AreEqual(1, result.Count());

            result = controller.GetEvenNumbers(23);
            Assert.AreEqual(12, result.Count());
            Assert.AreEqual(22, result.Last());
            Assert.AreEqual(0, result.First());
            Assert.AreEqual(18, result.ElementAt(9));
        }
        public void TestAllNumbers()
        {
            HomeController controller = new HomeController();

            var result = controller.GetAllNumbers(-1);
            Assert.IsTrue(!result.Any());

            result = controller.GetAllNumbers(0);
            Assert.AreEqual(0, result.Last());
            Assert.AreEqual(1, result.Count());

            result = controller.GetAllNumbers(100);
            Assert.AreEqual(101, result.Count());
            Assert.AreEqual(100, result.Last());
            Assert.AreEqual(0, result.First());
            Assert.AreEqual(84, result.ElementAt(84));
        }
        public void TestFibonacciNumbers()
        {
            HomeController controller = new HomeController();

            var result = controller.GetFibonacciNumbers(-1);
            Assert.IsTrue(!result.Any());

            result = controller.GetFibonacciNumbers(0);
            Assert.AreEqual(0, result.Last());
            Assert.AreEqual(1, result.Count());

            result = controller.GetFibonacciNumbers(1);
            Assert.AreEqual(0, result.First());
            Assert.AreEqual(1, result.Last());
            Assert.AreEqual(2, result.Count());

            //0, 1, 1, 2, 3, 5, 8, 13
            result = controller.GetFibonacciNumbers(13);
            Assert.AreEqual(8, result.Count());
            Assert.AreEqual(13, result.Last());
            Assert.AreEqual(3, result.ElementAt(4));
            Assert.AreEqual(8, result.ElementAt(6));
        }