public void SelectionSort_ReturnsNull_WhenArrayIsEmpty() { int[] testArray = { }; var result = SelectionSortFunctions.SelectionSort(testArray); Assert.IsNull(result); }
public void SelectionSort_ReturnsOrderedArray_WhenArrayIsValid() { int[] testArray = { 9, -10, 2, -5, 11, 23 }; int[] expectedResult = { -10, -5, 2, 9, 11, 23 }; var result = SelectionSortFunctions.SelectionSort(testArray); Assert.That(result, Is.EqualTo(expectedResult)); }
public void SelectionSort_ReturnsException_WhenArrayIsNull() { int[] testArray = null; Assert.That(() => SelectionSortFunctions.SelectionSort(testArray), Throws.ArgumentNullException); }