Beispiel #1
0
        public void sumEvenFibonacciLimit145()
        {
            long expected   = 188;
            long upperLimit = 145;
            long actual     = Problem2Class.sumEvenFibonacci(upperLimit);

            Assert.AreEqual(expected, actual, "Results not correct for upper limit of 145");
        }
Beispiel #2
0
        public void sumEvenFibonacciEdgeCaseLimit2()
        {
            long expected   = 0;
            long upperLimit = 2;
            long actual     = Problem2Class.sumEvenFibonacci(upperLimit);

            Assert.AreEqual(expected, actual, "Results not correct for upper limit of 2");
        }
Beispiel #3
0
        public void sumEvenFibonacciFullResult()
        {
            //Test result for 4,000,000 ie the final solution
            // Arrange
            long expected   = 4613732;
            long upperLimit = 4000000;
            // Act
            long actual = Problem2Class.sumEvenFibonacci(upperLimit);

            // Assert
            Assert.AreEqual(expected, actual, "Results not correct for upper limit of 4,000,000");
        }