public void Ascending_Comparable_OutOfRange() { Assert.ThrowsException <ArgumentOutOfRangeException>(() => { GenerateArraysAscending(SNBoseNelson.MinLength - 1, out int[] expected, out int[] actual); SNBoseNelson.SortAscending(ref actual[0], actual.Length); }); }
public void Ascending_Comparison_ComparisonNull() { Assert.ThrowsException <ArgumentNullException>(() => { GenerateArraysAscending(SNBoseNelson.MinLength - 1, out int[] expected, out int[] actual); SNBoseNelson.SortAscending(ref actual[0], actual.Length, comparison: null); }); }
public void Ascending_Comparable() { for (int length = SNBoseNelson.MinLength; length <= SNBoseNelson.MaxLength; length++) { GenerateArraysAscending(length, out int[] expected, out int[] actual); SNBoseNelson.SortAscending(ref actual[0], length); CollectionAssert.AreEqual(expected, actual, $"Collections differs for length `{length}`."); } }