public void When_Start_Is_Greater_Than_End() { var instance = new OddAscSequenceProcessor(); var result = instance.Process(15, 5); result.ToArray(); Assert.Fail("Exception"); }
public void When_Start_Is_Negative() { var instance = new OddAscSequenceProcessor(); var result = instance.Process(15, -2); result.ToArray(); Assert.Fail("Exception"); }
public void When_Starts_With_Odd() { var instance = new OddAscSequenceProcessor(); var result = instance.Process(9, 21); //Object existance assertion Assert.IsNotNull(result); Assert.IsTrue(result.Any()); //Boundry assertion Assert.AreEqual("9", result.First()); Assert.AreEqual("21", result.Last()); }
public void When_Large_Range_Is_Processed() { var instance = new OddAscSequenceProcessor(); var result = instance.Process(0, 11); //Object existance assertion Assert.IsNotNull(result); Assert.IsTrue(result.Any()); //Overall assertion Assert.AreEqual("1 3 5 7 9 11", String.Join(" ", result.ToArray())); Assert.AreEqual(6, result.Count()); //Boundry assertion Assert.AreEqual("1", result.First()); Assert.AreEqual("11", result.Last()); }