public void SortStack() { StackSorter sorter = new StackSorter(); Stack <int> stack = new Stack <int>(new int[] { 2, 1, 5, 3, 7, 9, 10, 4 }); sorter.Sort(stack); }
public void TestStackSortOneItem() { Stack <int> stack = new Stack <int>(); stack.Push(10); Stack <int> result = StackSorter.Sort(stack); Assert.AreEqual(10, result.Pop()); }