Exemplo n.º 1
0
        public void TestPush()
        {
            stack S1 = new stack(15);

            S1.Push(1);
            S1.Push(2);
            S1.Push(3);
            Assert.AreEqual(3, S1.Count());
        }
Exemplo n.º 2
0
        public void TestCount()
        {
            stack S4 = new stack(7);

            S4.Push(1);
            S4.Push(2);
            S4.Push(3);
            S4.Push(4);
            S4.Push(5);
            S4.Push(6);
            Assert.AreEqual(6, S4.Count());
        }
Exemplo n.º 3
0
        public void TestClear()
        {
            stack S5 = new stack(10);

            S5.Push(1);
            S5.Push(2);
            S5.Push(3);
            S5.Push(4);
            S5.Push(5);
            S5.Push(6);
            S5.Push(7);
            S5.Clear();
            Assert.AreEqual(0, S5.Count());
        }