示例#1
0
        public void If_Parameter_Is_Less_1_Then_Return_Less_1()
        {
            // Arrange
            int negativeNumber = -5;

            // Act
            int fibonnaciResult = Mathematic.Fibonnaci(negativeNumber);

            // Assert
            Assert.AreEqual(fibonnaciResult, -1);
        }
示例#2
0
        public void If_Parameter_Is_More_Than_100_Then_Return_Less_1()
        {
            // Arrange
            int numberMoreThan100 = 101;

            // Act
            int fibonnaciResult = Mathematic.Fibonnaci(numberMoreThan100);

            // Assert
            Assert.AreEqual(fibonnaciResult, -1);
        }
示例#3
0
        public void If_Parameter_Between_1_And_100_Then_Return_Fibonnaci_Result()
        {
            // Arrange
            int number = 8;

            // Act
            int fibonnaciResult = Mathematic.Fibonnaci(number);

            // Assert
            Assert.AreEqual(fibonnaciResult, 21);
        }
示例#4
0
 public int Fibonacci(int n)
 {
     return(Mathematic.Fibonnaci(n));
 }