public void WhenPushedTwoValuesLatestIsReturnedByPop()
        {
            LargestElementInStack stack = new LargestElementInStack();
            int firstValue = 10;
            int secondValue = 15;

            stack.Push(firstValue);
            stack.Push(secondValue);

            int returnedValue = stack.Pop();

            Assert.AreEqual(secondValue, returnedValue);
        }
        public void WhenPushedTwoValuesLatestIsReturnedByPop()
        {
            LargestElementInStack stack = new LargestElementInStack();
            int firstValue  = 10;
            int secondValue = 15;

            stack.Push(firstValue);
            stack.Push(secondValue);

            int returnedValue = stack.Pop();

            Assert.AreEqual(secondValue, returnedValue);
        }
        public void PoppedValueIsRemovedFromStack()
        {
            LargestElementInStack stack = new LargestElementInStack();
            int firstValue = 10;
            int secondValue = 15;

            stack.Push(firstValue);
            stack.Push(secondValue);

            stack.Pop();
            int returnedValue = stack.Pop();

            Assert.AreEqual(firstValue, returnedValue);
        }
        public void PeekDoesNotRemoveValueFromStack()
        {
            LargestElementInStack stack = new LargestElementInStack();
            int firstValue  = 10;
            int secondValue = 15;

            stack.Push(firstValue);
            stack.Push(secondValue);

            stack.Peek();
            int returnedValue = stack.Pop();

            Assert.AreEqual(secondValue, returnedValue);
        }
        public void GetMaxReturnsMaxValue()
        {
            LargestElementInStack stack = new LargestElementInStack();
            int firstValue = 10;
            int secondValue = 25;
            int thirdValue = 15;

            stack.Push(firstValue);
            stack.Push(secondValue);
            stack.Push(thirdValue);

            int returnedValue = stack.GetMax();

            Assert.AreEqual(secondValue, returnedValue);
        }
        public void GetMaxReturnsMaxValue()
        {
            LargestElementInStack stack = new LargestElementInStack();
            int firstValue  = 10;
            int secondValue = 25;
            int thirdValue  = 15;

            stack.Push(firstValue);
            stack.Push(secondValue);
            stack.Push(thirdValue);


            int returnedValue = stack.GetMax();

            Assert.AreEqual(secondValue, returnedValue);
        }
        public void ThrowsInvalidOperationExceptionWhilePopOnEmptyStack()
        {
            LargestElementInStack stack = new LargestElementInStack();

            Assert.Throws(typeof(InvalidOperationException), () => stack.Pop());
        }
        public void ThrowsInvalidOperationExceptionWhilePopOnEmptyStack()
        {
            LargestElementInStack stack = new LargestElementInStack();

            Assert.Throws(typeof(InvalidOperationException), () => stack.Pop());
        }