Esempio n. 1
0
        public void BubbleSortInterface_SortMaxElementDescendArray_With_Valid_Data()
        {
            var inputArray = HelperSort.GetJaggedArray();

            var comparer = new SortMaxElementDescendArray();

            BubbleSortAcrossInterface.BubbleSortInterface(inputArray, comparer);

            var outputMaxElementRowArray = HelperSort.SortMaxElementDescendHelper(inputArray).Item2;

            Assert.IsTrue(HelperSort.SortMaxElementDescendHelper(inputArray).Item1);
        }
        public void BubbleSortDelegate_SortMaxElementDescendArray_With_Valid_Data()
        {
            var inputArray = HelperSort.GetJaggedArray();

            var comparer = new SortMaxElementDescendArrayWithoutInterface();

            Func <int[], int[], int> delegatInput = comparer.Compare;

            BubbleSortAcrossDelegate.BubbleSortDelegate(inputArray, delegatInput);

            var outputMaxElementRowArray = HelperSort.SortMaxElementDescendHelper(inputArray).Item2;

            Assert.IsTrue(HelperSort.SortMaxElementDescendHelper(inputArray).Item1);
        }