private static void Test(int upperBound, int expected) { var fibs = new FibonacciGenerator().GenerateToLessThan(upperBound); var evens = new EvenFilter().GetValues(fibs); var result = evens.Sum(); result.Should().Be(expected); }
static void Main(string[] args) { var fibs = new FibonacciGenerator().GenerateToLessThan(4000000); var evens = new EvenFilter().GetValues(fibs); var result = evens.Sum(); Console.WriteLine("The result is: {0}", result); Console.ReadLine(); }
private static void TestSequence(int upperBound, IEnumerable<int> expected) { int[] sequence = new FibonacciGenerator().GenerateToLessThan(upperBound); sequence.ShouldAllBeEquivalentTo(expected); }
private static void TestSequence(int upperBound, IEnumerable <int> expected) { int[] sequence = new FibonacciGenerator().GenerateToLessThan(upperBound); sequence.ShouldAllBeEquivalentTo(expected); }