Example #1
0
        public void Sort_AscMin_Test()
        {
            SortMatrix testSort = new SortMatrix(OrderType.Asc, ComparisonType.MinElement);

            int[,] testArray = (int[, ])_testArray.Clone();
            testSort.Sort(testArray);
            CollectionAssert.AreEqual(testArray, _expectedArrayAfterAscMin);
        }
Example #2
0
        public void Sort_DescSum_Test()
        {
            SortMatrix testSort = new SortMatrix(OrderType.Desc, ComparisonType.SumRows);

            int[,] testArray = (int[, ])_testArray.Clone();
            testSort.Sort(testArray);
            CollectionAssert.AreEqual(testArray, _expectedArrayAfterDescSum);
        }
Example #3
0
        public void Sort_NullReferenceException_Test()
        {
            SortMatrix sort = new SortMatrix(OrderType.Asc, ComparisonType.MaxElement);

            Assert.Throws <NullReferenceException>(() => sort.Sort(null));
        }