예제 #1
0
 public void BubbleSortTest(int[,] matrix, int[,] expectedResult, SortType sortType, SortDirection sortDirection)
 {
     int[,] result = BubbleSortClass.Sort(matrix, sortType, sortDirection);
     Assert.IsTrue(BubbleSortClass.Compare(result, expectedResult));
 }
예제 #2
0
 public void BubbleSortTest_ArgumentExeption(int[,] matrix, int[,] expectedResult, SortType sortType, SortDirection sortDirection)
 {
     Assert.That(() => BubbleSortClass.Sort(matrix, sortType, sortDirection), Throws.TypeOf <ArgumentException>());
 }
예제 #3
0
 public void BubbleSort_Delegate_Descending_Test(int[,] matrix, int[,] expectedResult, SortType sortType)
 {
     int[,] result = BubbleSortClass.Sort(matrix, sortType, (x, y) => x < y);
     Assert.IsTrue(BubbleSortClass.Compare(result, expectedResult));
 }