Beispiel #1
0
 public void SelectTest()
 {
     int[] myList = { 8, 9, 6, 7, 4, 5, 3, 2, 1 };
     SelectSort.Select(myList);
     Assert.IsTrue(AssertSorted.IsSorted(myList));
 }
 public void InsertTest()
 {
     int[] myList = { 8, 9, 6, 7, 4, 5, 3, 2, 1 };
     InsertionSort.Insert(myList);
     Assert.IsTrue(AssertSorted.IsSorted(myList));
 }
 public void IsSortedTrueTest()
 {
     int[] input = { 5, 4, 3, 2, 1 };
     Assert.IsTrue(AssertSorted.IsSorted(input));
 }
 public void IsSortedFalseTest()
 {
     int[] input = { 1, 4, 3, 2, 5 };
     Assert.IsFalse(AssertSorted.IsSorted(input));
 }
 public void MergeSortListTest()
 {
     int[] myList = { 8, 9, 6, 7, 4, 5, 3, 2, 1 };
     myList = MergeSort.MergeSortList(myList);
     Assert.IsTrue(AssertSorted.IsSorted(myList));
 }