public void DoesDisplayElementsPrintsCorrectly()
        {
            ArrayTypedStack stack = new ArrayTypedStack(3);

            stack.Push(1);
            stack.Push(2);
            stack.Push(3);

            string expected = "3 2 1 ";
            string actual   = stack.DisplayElements();

            Assert.AreEqual(expected, actual);
        }
        public void DoesPushAddElementWhenStackIsEmpty()
        {
            ArrayTypedStack stack = new ArrayTypedStack(1);

            stack.Push(3);

            string actual   = stack.DisplayElements();
            string expected = "3 ";

            Assert.AreEqual(expected, actual);

            int actualSize   = stack.Size;
            int expectedSize = 1;

            Assert.AreEqual(expectedSize, actualSize);
        }
 public void DoesDisplayElementsThrowExceptionWhenStackIsEmpty()
 {
     ArrayTypedStack stack = new ArrayTypedStack(5);
     string          s     = stack.DisplayElements();
 }