public void MinSortDesc_pass_tests_successfully( [ValueSource(nameof(SourceMaxMin))] int[][] initial, [ValueSource(nameof(ResultMinDesc))] int[][] result) { BubbleSort_delegate.Sort(initial, new MinSortDesc()); CollectionAssert.AreEqual(initial, result); }
public void SumSortAsc_pass_tests_successfully( [ValueSource(nameof(SourceSum))] int[][] initial, [ValueSource(nameof(ResultSumAsc))] int[][] result) { BubbleSort_delegate.Sort(initial, new SumSortAsc()); CollectionAssert.AreEqual(initial, result); }
public void ValidateComparison_Method_Throws_ArgumentNullException_If_Comparison_Is_Null() { var array = new int[1][]; Assert.That( () => BubbleSort_delegate.Sort(array, comparison: null), Throws.TypeOf <ArgumentNullException>()); }
public void ValidateArray_Method_Throws_ArgumentException_If_Array_Is_Empty() { var array = new int[0][]; Assert.That( () => BubbleSort_delegate.Sort(array, comparer: null), Throws.TypeOf <ArgumentException>()); }
public void ValidateArray_Method_Throws_ArgumentNullException_If_Array_Is_Null() { var maxAsc = new MaxSortAsc(); Assert.That( () => BubbleSort_delegate.Sort(null, new Comparison <int[]>(maxAsc.Compare)), Throws.TypeOf <ArgumentNullException>()); }