public void TestInsertionSortIntegers() { int[] unsortedIntegers = { 5, 3, 1, 9, 12 }; int[] sortedIntegers = { 1, 3, 5, 9, 12 }; Assert.Equal(sortedIntegers, InsertionSort.Execute(unsortedIntegers)); }
public void TestInsertionSortStringDuplicate() { string[] unsortedIntegers = { "Xray", "Alpha", "Charlie", "Beta", "Beta", "India" }; string[] sortedIntegers = { "Alpha", "Beta", "Beta", "Charlie", "India", "Xray" }; Assert.Equal(sortedIntegers, InsertionSort.Execute(unsortedIntegers)); }
public void TestInsertionSortIntegerEmpty() { int[] unsortedIntegers = { }; int[] sortedIntegers = { }; Assert.Equal(sortedIntegers, InsertionSort.Execute(unsortedIntegers)); }
public void TestInsertionSortStringEmpty() { string[] unsortedIntegers = { }; string[] sortedIntegers = { }; Assert.Equal(sortedIntegers, InsertionSort.Execute(unsortedIntegers)); }
static void Main(string[] args) { MergeSort mergeSort = new MergeSort(); SelectionSort selectionSort = new SelectionSort(); InsertionSort insertionSort = new InsertionSort(); BubbleSort bubbleSort = new BubbleSort(); CountingSort countingSort = new CountingSort(); QuickSort quickSort = new QuickSort(); mergeSort.Execute(); selectionSort.Execute(); insertionSort.Execute(); bubbleSort.Execute(); countingSort.Execute(); quickSort.Execute(); Console.ReadLine(); }