Пример #1
0
        public void RowSumDescendingSort()
        {
            JaggedArraySortingClass.BubbleSortByRowSum(actualArray1, false);
            Assert.AreEqual(expectedArray1, actualArray1);

            JaggedArraySortingClass.BubbleSortByRowSum(actualArray2, false);
            Assert.AreEqual(expectedArrayForSumDescendingSort, actualArray2);
        }
Пример #2
0
 public void EmptyArrayNegativeTest()
 {
     Assert.Throws <ArgumentException>(() => JaggedArraySortingClass.BubbleSortByRowSum(new int[][] { }, ascending: true));
     Assert.Throws <ArgumentException>(() => JaggedArraySortingClass.BubbleSortByRowSum(new int[][] { }, ascending: false));
 }
Пример #3
0
 public void NullParameterNegativeTest()
 {
     Assert.Throws <ArgumentNullException>(() => JaggedArraySortingClass.BubbleSortByRowSum(null, ascending: true));
     Assert.Throws <ArgumentNullException>(() => JaggedArraySortingClass.BubbleSortByRowSum(null, ascending: false));
 }