public void NonDecreasingTest() { Assert.AreEqual(true, MonotoneTravel.IsMonotone(new int[] { 1, 2, 3, 3, 4, 5 })); }
public void DecreasingTest() { Assert.AreEqual(false, MonotoneTravel.IsMonotone(Enumerable.Range(1, 5).Reverse().ToArray())); }
public void ConstantTest() { Assert.AreEqual(true, MonotoneTravel.IsMonotone(new int[] { 5, 5, 5, 5, 5 })); }
public void EmptyTest() { Assert.AreEqual(true, MonotoneTravel.IsMonotone(new int[] { })); }
public void IncreasingTest() { Assert.AreEqual(true, MonotoneTravel.IsMonotone(Enumerable.Range(1, 10).ToArray())); Assert.AreEqual(true, MonotoneTravel.IsMonotone(Enumerable.Range(4, 9).ToArray())); }