示例#1
0
        static void Main(string[] args)
        {
            var result = Fibonacci.Calc(1000);

            Console.WriteLine(result.ToString());
            Console.ReadKey();
        }
示例#2
0
        public void Null_FibonacciTest(int fibNumbers)
        {
            //act
            IEnumerable <int> result = Fibonacci.Calc(fibNumbers);

            //assert
            Assert.ThrowsException <ArgumentOutOfRangeException>(() => result.Sum());
        }
 public int TestFibonacci(int x)
 {
     //// 1
     //Assert.AreEqual(0, Fibonacci.Calc(0));
     //// 2
     //Assert.AreEqual(1, Fibonacci.Calc(1));
     // 3
     return(Fibonacci.Calc(x));
 }
示例#4
0
        public void Norm_FibonacciTest(int fibNumbers, int expected)
        {
            //arrange
            //act
            IEnumerable <int> result = Fibonacci.Calc(fibNumbers);

            //assert
            Assert.AreEqual(result.Sum(x => x), expected);
        }
 public int TestFibonacci(int x)
 {
     return(Fibonacci.Calc(x));
 }
示例#6
0
        public void Test1000()
        {
            var result = Fibonacci.Calc(1000);

            Assert.IsNotNull(result);
        }
示例#7
0
        public void Test300()
        {
            var result = Fibonacci.Calc(300);

            Assert.AreEqual(result.ToString(), "222232244629420445529739893461909967206666939096499764990979600");
        }
示例#8
0
        public void Test200()
        {
            var result = Fibonacci.Calc(200);

            Assert.AreEqual(result.ToString(), "280571172992510140037611932413038677189525");
        }
示例#9
0
        public void Test100()
        {
            var result = Fibonacci.Calc(100);

            Assert.AreEqual(result.ToString(), "354224848179261915075");
        }
示例#10
0
        public void Test50()
        {
            var result = Fibonacci.Calc(50);

            Assert.AreEqual(result.ToString(), "12586269025");
        }