public void MethodSort_MinElemComparerAscending_ReturnSortedArray() { int[][] array = { new int[] { 5, 3, 1, 7, 9 }, new int[] { 4, 0, 2,6 }, new int[] { 22, 33, 11 } }; int[][] expected = { new int[] { 4, 0, 2, 6 }, new int[] { 5, 3, 1,7, 9 }, new int[] { 22, 33, 11 } }; InterfaceDelegate.Sort(array, new MinElemAscendingComparer()); CollectionAssert.AreEqual(expected, array); }
public void MethodSort_OneOfArrayLengthZero_ArgumentExcepton() { Assert.Throws <ArgumentException>(() => InterfaceDelegate.Sort(new int[][] { new int[] { } }, new SumAscendingComparer())); }
public void MethodSort_NullArray_ArgumentNullExcepton() { Assert.Throws <ArgumentNullException>(() => InterfaceDelegate.Sort(null, new SumAscendingComparer())); }