コード例 #1
0
        public void BubbleSortInterface_SortMaxElementDescendArray_Axpected_ArgumentNullException()
        {
            int[][] inputArray = null;

            var comparer = new SortMaxElementDescendArray();

            Assert.Throws <ArgumentNullException>(() => BubbleSortAcrossInterface.BubbleSortInterface(inputArray, comparer));
        }
コード例 #2
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);
        }