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); }
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); }
public void Sort_NullReferenceException_Test() { SortMatrix sort = new SortMatrix(OrderType.Asc, ComparisonType.MaxElement); Assert.Throws <NullReferenceException>(() => sort.Sort(null)); }