public void Sort_EmptyArray_Success() { var sorter = new InsertionSorter <int>(); var array = new int[0]; sorter.Sort(array); Assert.IsTrue(sorter.Ensure(array)); }
public void Sort_SingleElementArray_Success() { var sorter = new InsertionSorter <int>(); var array = new int[1] { 0 }; sorter.Sort(array); Assert.IsTrue(sorter.Ensure(array)); }
public void Sort_ValidArray_Success() { var sorter = new InsertionSorter <int>(); var array = new int[10] { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }; sorter.Sort(array); Assert.IsTrue(sorter.Ensure(array)); }