public void QuickSortMaxAbsIncreasingDelegateTest()
        {
            int[][] expected = new int[][]
            {
                null,
                null,
                null,
                null,
                array[2],
                array[6],
                array[5],
                array[4],
                array[1],
                array[0],
                array[8]
            };

            QuickSorter qs = new QuickSorter();
            MaxAbsElementsIncreasing st = new MaxAbsElementsIncreasing();
            array.Sort(qs, ((IComparer)st).Compare);
            int[][] actual = array;

            CollectionAssert.AreEqual(expected, actual);
        }
        public void MaxAbsElementsIncreasingBothArraysAbsEqualTest()
        {
            int[] arr1 = new int[] { 1, 2, 3, -50 };
            int[] arr2 = new int[] { 1, 2, 3, 50 };
            MaxAbsElementsIncreasing st = new MaxAbsElementsIncreasing();
            int expected = ((IComparer)st).Compare(arr1, arr2);

            Assert.AreEqual(expected, 0);
        }
        public void MaxAbsElementsIncreasingSecondArrayAbsLowerTest()
        {
            int[] arr1 = new int[] { 4, 5, 6, -20 };
            int[] arr2 = new int[] { 1, 2, 3, -10 };
            MaxAbsElementsIncreasing st = new MaxAbsElementsIncreasing();
            int expected = ((IComparer)st).Compare(arr1, arr2);

            Assert.AreEqual(expected, 1);
        }
        public void MaxAbsElementsIncreasingFirstArrayEmptyTest()
        {
            int[] arr1 = new int[] { };
            int[] arr2 = new int[] { 1, 2, 3 };
            MaxAbsElementsIncreasing st = new MaxAbsElementsIncreasing();
            int expected = ((IComparer)st).Compare(arr1, arr2);

            Assert.AreEqual(expected, -1);
        }
        public void MaxAbsElementsIncreasingSecondArrayNullTest()
        {
            int[] arr1 = new int[] { 1, 2, 3 };
            int[] arr2 = null;
            MaxAbsElementsIncreasing st = new MaxAbsElementsIncreasing();
            int expected = ((IComparer)st).Compare(arr1, arr2);

            Assert.AreEqual(expected, 1);
        }