예제 #1
0
        public void BubbleJaggedSortMaxEl(int[] array0, int[] array1, int[] array2, int[] array3)
        {
            int[][] actual = new int[4][];
            actual[0] = array0;
            actual[1] = array1;
            actual[2] = array2;
            actual[3] = array3;

            int[][] expected = new int[4][];
            expected[0] = array2;
            expected[1] = array0;
            expected[2] = array3;
            expected[3] = array1;

            BubbleJaggedSort.BubbleSort(actual, new Conditions.Max().Compare);
            CollectionAssert.AreEqual(expected, actual);
        }
예제 #2
0
 public void BubbleJaggedSortExceptionDelegate()
 => Assert.Throws <ArgumentNullException>(()
                                          => BubbleJaggedSort.BubbleSort(new int[][] { new int[] { 26, 12, 2 } }, null));
예제 #3
0
 public void BubbleJaggedSortExceptionArray()
 => Assert.Throws <ArgumentNullException>(()
                                          => BubbleJaggedSort.BubbleSort(null, new Conditions.Sum().Compare));