public void When_The_Start_Less_Than_Zero() { var instance = new FibonacciSequence(); var result = instance.Generate(-1, 10); result.ToArray(); Assert.Fail("Should fail..."); }
public void When_The_Start_Is_Greater_Than_The_End() { var instance = new FibonacciSequence(); var result = instance.Generate(11, 10); result.ToArray(); Assert.Fail("Should Fail..."); }
public void When_Generate_Normal_Sequence() { var instance = new FibonacciSequence(); var result = instance.Generate(0, 15); Assert.IsNotNull(result); Assert.AreEqual(8, result.Count()); Assert.AreEqual("0,1,1,2,3,5,8,13", String.Join(",", result.ToArray())); }
public void When_Generate_Large_Sequence() { var instance = new FibonacciSequence(); var result = instance.Generate(0, 100); Assert.IsNotNull(result); Assert.AreEqual(12, result.Count()); Assert.AreEqual("0,1,1,2,3,5,8,13,21,34,55,89", String.Join(",", result.ToArray())); }