public void Sort_TakesBySumComparatorAndZeroStringArray_ReturnsTheSameArray(params int[][] matrix) { int[][] expected = new int[0][]; int[][] actual = new int[0][]; BubbleSortForMatrix.Sort(actual, new BySumComparator()); CollectionAssert.AreEqual(expected, actual); }
public void Sort_TakesBySumComparator_PositiveTest(params int[][] matrix) { int[][] expected = CopyMatrix(matrix, matrix.Length / 2, matrix.Length - 1); int[][] actual = CopyMatrix(matrix, 0, (matrix.Length / 2) - 1); BubbleSortForMatrix.Sort(actual, new BySumComparator()); CollectionAssert.AreEqual(expected, actual); }
public void Sort_TakesBySumComparatorAndStringsHasNotElements_ReturnsTheSameArray(params int[][] matrix) { int[][] expected = CopyMatrix(matrix, matrix.Length / 2, matrix.Length - 1); int[][] actual = CopyMatrix(matrix, 0, (matrix.Length / 2) - 1); BubbleSortForMatrix.Sort(actual, new BySumComparator()); CollectionAssert.AreEqual(expected, actual); }
public void Sort_TakesBySumComparatorAndStringsHasMaxValues_throwsOverflowException(params int[][] matrix) { int[][] actual = CopyMatrix(matrix, 0, (matrix.Length / 2) - 1); Assert.Throws <OverflowException>(() => BubbleSortForMatrix.Sort(actual, new BySumComparator())); }