Exemplo n.º 1
0
        public void RowSumDescendingSort()
        {
            JaggedArraySortingClass.BubbleSortByRowSum(actualArray1, false);
            Assert.AreEqual(expectedArray1, actualArray1);

            JaggedArraySortingClass.BubbleSortByRowSum(actualArray2, false);
            Assert.AreEqual(expectedArrayForSumDescendingSort, actualArray2);
        }
Exemplo n.º 2
0
 public void EmptyArrayNegativeTest()
 {
     Assert.Throws <ArgumentException>(() => JaggedArraySortingClass.BubbleSortByRowSum(new int[][] { }, ascending: true));
     Assert.Throws <ArgumentException>(() => JaggedArraySortingClass.BubbleSortByRowSum(new int[][] { }, ascending: false));
 }
Exemplo n.º 3
0
 public void NullParameterNegativeTest()
 {
     Assert.Throws <ArgumentNullException>(() => JaggedArraySortingClass.BubbleSortByRowSum(null, ascending: true));
     Assert.Throws <ArgumentNullException>(() => JaggedArraySortingClass.BubbleSortByRowSum(null, ascending: false));
 }