public void Ex2MaxValueTest() { ExercisesPart1 exercises = new ExercisesPart1(); int[] inputArray = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; int[] expectedResult = { 1, 2, 3, 4, 5 }; int[] actualResult = exercises.Ex2(inputArray, 5); Assert.IsTrue(expectedResult.SequenceEqual(actualResult)); }
public void Ex2Test2() { ExercisesPart1 exercises = new ExercisesPart1(); int[] inputArray = { 0, -1, -2, -3, -4, -5, -6, -7, -8, -9 }; int[] expectedResult = { }; int[] actualResult = exercises.Ex2(inputArray); Assert.IsTrue(expectedResult.SequenceEqual(actualResult)); }