Exemplo n.º 1
0
        public void getTopTest()
        {
            SeqStack <string> seqStack = new SeqStack <string>(10);

            seqStack.push("A");
            seqStack.push("B");
            seqStack.push("C");
            Assert.AreEqual(seqStack.getTop(), "C");
        }
Exemplo n.º 2
0
        public void clearTest()
        {
            SeqStack <string> seqStack = new SeqStack <string>(10);

            seqStack.push("A");
            seqStack.push("B");
            seqStack.push("C");
            seqStack.clear();
            Assert.AreEqual(seqStack.isEmpty, true);
        }
Exemplo n.º 3
0
        public void pushTest()
        {
            SeqStack <string> seqStack = new SeqStack <string>(10);

            seqStack.push("A");
            seqStack.push("B");
            seqStack.push("C");
            List <string> result = new List <string>()
            {
                "C", "B", "A"
            };

            CollectionAssert.AreEqual(seqStack.display(), result);
        }