public void BubbleSortEmptyElementsShouldNotSort() { const int MaxValue = 0; Element[] elements = new Element[MaxValue]; BubbleSortingAlgorithm.BubbleSort(elements); CheckSortingOrder(elements); }
public void BubbleSortRandomElementsSholdSortCorrectly() { const int MaxValue = 100; const int TestsCount = 100; Element[] elements = new Element[MaxValue]; for (int i = 0; i < TestsCount; i++) { BubbleSortingAlgorithm.Initialize(elements); BubbleSortingAlgorithm.BubbleSort(elements); CheckSortingOrder(elements); } }
public void BubbleSortNullElementsShouldThrowException() { BubbleSortingAlgorithm.BubbleSort(null); }