public void MergeSort_InputCorrectValues_ReturnSortedArray() { //arrange int[] arrayExcpected = new int[] { 1, 2, 3, 4, 5 }; int[] arrayInput = new int[] { 2, 3, 1, 4, 5 }; //act arrayInput = TwoSorts.MergeSort(arrayInput); //assert Assert.IsTrue(arrayExcpected.SequenceEqual(arrayInput)); }
public void MergeSort_Check_ArgumentException() { int[] arrayZero = new int[0]; Assert.ThrowsException <ArgumentException>(() => TwoSorts.MergeSort(arrayZero)); }
public void MergeSort_Check_ArgumentNullException() { Assert.ThrowsException <ArgumentNullException>(() => TwoSorts.MergeSort(null)); }