示例#1
0
        public void QuickSort_ReturnsEmptyArray_WhenInputArrayIsEmpty()
        {
            long[] testArray = { };

            var result = QuickSortFunctions.QuickSort(testArray);

            Assert.AreEqual(new long[] { }, result);
        }
示例#2
0
        public void QuickSort_ThrowsNullException_WhenInputArrayIsNull()
        {
            long[] testArray = null;

            Assert.That(() => QuickSortFunctions.QuickSort(testArray), Throws.ArgumentNullException);
        }
示例#3
0
        public void QuickSort_ReturnsSortedArray_WhenInputArrayIsValid(long[] inputArray, long[] expectedResult)
        {
            var result = QuickSortFunctions.QuickSort(inputArray);

            Assert.AreEqual(expectedResult, result);
        }