Beispiel #1
0
        public void Push_element_is_on_top_of_the_stack()
        {
            MyStack <int> stack = new MyStack <int>();

            stack.Push(123);
            Assert.AreEqual(123, stack.Peak());
        }
Beispiel #2
0
        public void Peak_empty_stack_throw_exception()
        {
            MyStack <int> stack = new MyStack <int>();

            Assert.Catch <InvalidOperationException>(() => stack.Peak());
        }