public int SumOfTheEvenNumbersBelow4Million() { var fibonacciCalculator = new FibonacciCalculator(); var mathOperations = new MathOperationsForProblem002(); var fibonacciNumbersBelow4Million = fibonacciCalculator.FibonacciNumbersBelow(4000000); return(mathOperations.SumEvenNumbersFromAListOfNumbers(fibonacciNumbersBelow4Million)); }
public void ShouldReturnSumOfGivenEvenNumbers() { var numbers = new List <int> { 1, 2, 3, 5, 8 }; const int evenNumbersSumFromList = 10; var mathOperations = new MathOperationsForProblem002(); var evenNumbersSum = mathOperations.SumEvenNumbersFromAListOfNumbers(numbers); evenNumbersSum.Should().Be(evenNumbersSumFromList); }