Exemplo n.º 1
0
        public void TestsubTop2()
        {
            StackOfInt SOI = new StackOfInt();

            SOI.Push(1);
            SOI.Push(11);
            SOI.Push(21);
            SOI.SubTop2();
            Assert.AreEqual(21 - 11, SOI.StackInt.Peek());
        }
Exemplo n.º 2
0
        public void TestsubTop2Exception()
        {
            StackOfInt SOI = new StackOfInt();

            SOI.Push(1);
            try
            {
                SOI.SubTop2();
                Assert.Fail();
            }
            catch (Exception)
            {
            }
        }