Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public void TestStackSortOneItem()
        {
            Stack <int> stack = new Stack <int>();

            stack.Push(10);

            Stack <int> result = StackSorter.Sort(stack);

            Assert.AreEqual(10, result.Pop());
        }