public void FibShouldPrintSequenceOfNumbers() { FibNumbers fib = new FibNumbers(); int[] expected = new int[] { 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 }; int[] actual = fib.GetSequence(); CollectionAssert.AreEqual(expected, actual); }
public void FibShouldPrintAVariableSequenceOfNumbers() { FibNumbers fib = new FibNumbers(); int input = 12; int[] expected = new int[] {1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144 }; int[] actual = fib.GetSequence(input); CollectionAssert.AreEqual(expected, actual); }
public void FibPrintSequenceOfNumbers() { FibNumbers fib = new FibNumbers(); int length = 7; string expected = "1 1 2 3 5 8 13"; string actual = fib.ToString(fib.GetSequence(length)); Assert.AreEqual(expected, actual); }