public void BubbleSortTest(int[,] matrix, int[,] expectedResult, SortType sortType, SortDirection sortDirection) { int[,] result = BubbleSortClass.Sort(matrix, sortType, sortDirection); Assert.IsTrue(BubbleSortClass.Compare(result, expectedResult)); }
public void BubbleSortTest_ArgumentExeption(int[,] matrix, int[,] expectedResult, SortType sortType, SortDirection sortDirection) { Assert.That(() => BubbleSortClass.Sort(matrix, sortType, sortDirection), Throws.TypeOf <ArgumentException>()); }
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)); }