public void CheckArraySorted_SortedArrayNoDuplicates_ReturnsTrue() { int[] testArray = new int[] { 0, 1, 2, 3, 4, 5 }; bool result = ArraySortingAlgorithms.CheckArraySorted(testArray); Assert.IsTrue(result); }
public void CheckArraySorted_UnsortedArrayWithDuplicates_ReturnsFalse() { int[] testArray = new int[] { 0, 1, 3, 3, 2, 4 }; bool result = ArraySortingAlgorithms.CheckArraySorted(testArray); Assert.IsFalse(result); }
public void QuickSort_ReturnsSortedArray() { int[] testArray = new int[] { 0, 5, 1, 4, 3, 2 }; ArraySortingAlgorithms.QuickSort(testArray); bool result = ArraySortingAlgorithms.CheckArraySorted(testArray); Assert.IsTrue(result); }