コード例 #1
0
        public void First10ElementsCorrect()
        {
            var sequence = new FibonacciSequence().Sequence.Take(10);

            sequence.SequenceEqual(new BigInteger[] { 0, 1, 1, 2, 3, 5, 8, 13, 21, 34 })
            .Should().BeTrue();
        }
コード例 #2
0
        public void contain_expected_elements(int[] expectedFibonacci, int numberOfElements)
        {
            var fibonacciSequence = new FibonacciSequence().Generate(numberOfElements);

            Assert.True(fibonacciSequence.SequenceEqual(expectedFibonacci));
        }