示例#1
0
        public void GetFibonacciSequence_RangeOfSequenceLengths_FibonacciSequence(int length,
                                                                                  long[] expectedSequence)
        {
            BigInteger[] expected = new BigInteger[length];
            for (var i = 0; i < length; i++)
            {
                expected[i] = new BigInteger(expectedSequence[i]);
            }

            var actualSequence = FibonacciGenerator.GetFibonacciSequence(length);

            Assert.AreEqual(expected, actualSequence);
        }
示例#2
0
 public void FibonacciGeneratorTest_InvalidData_ResultException(int value)
 {
     Assert.Throws <ArgumentException>(() => FibonacciGenerator.GetFibonacciSequence(value));
 }