Exemplo n.º 1
0
        public void Fibonacci_When100_ShouldReturn354224848179261915075()
        {
            var expected = BigInteger.Parse("354224848179261915075");
            FibonacciCalculator Calculator = new FibonacciCalculator();
            var result = Calculator.CalculateValue(100);

            Assert.AreEqual(expected.ToString(), result);
        }
Exemplo n.º 2
0
        public void Fibonacci_WhenGreatherThan100_ShouldReturnAStringStatingTheRangeOfTheApplication()
        {
            FibonacciCalculator Calculator = new FibonacciCalculator();

            Assert.AreEqual("Use a value between 0 and 100", Calculator.CalculateValue(102));
        }
Exemplo n.º 3
0
        public void Fibonacci_When6_ShouldReturn8()
        {
            FibonacciCalculator Calculator = new FibonacciCalculator();

            Assert.AreEqual(8.ToString(), Calculator.CalculateValue(6));
        }
Exemplo n.º 4
0
        public void Fibonacci_When20_ShouldReturn6765()
        {
            FibonacciCalculator Calculator = new FibonacciCalculator();

            Assert.AreEqual(6765.ToString(), Calculator.CalculateValue(20));
        }
Exemplo n.º 5
0
        public string Get(int root)
        {
            FibonacciCalculator Calculator = new FibonacciCalculator();

            return(Calculator.CalculateValue(root).ToString());
        }