Beispiel #1
0
        public void TestSumSort(double[,] arrUnSort, bool isDesc, int row, double[,] expected)
        {
            ArraySorter sorter = new ArraySorter();
            SortBySum   sum    = new SortBySum();

            sorter.SelectMethod(sum);
            Assert.AreEqual(sorter.Sort(isDesc, arrUnSort, row), expected);
        }
Beispiel #2
0
        public void TestMaxSort(double[,] arrUnSort, bool isDesc, int row, double[,] expected)
        {
            ArraySorter sorter = new ArraySorter();
            SortByMax   max    = new SortByMax();

            sorter.SelectMethod(max);
            Assert.AreEqual(sorter.Sort(isDesc, arrUnSort, row), expected);
        }