Esempio n. 1
0
        public void TestExceptionLinkStack()
        {
            ArrStack <int> A = new ArrStack <int>();

            A.Push(1);
            A.Push(2);
            A.Push(3);
            A.Push(4);
            A.Push(5);

            //Take
            int testnum1 = A.Pop(); //1-st
            int testnum2 = A.Pop(); //2-st

            A.Pop();                //3-st
            A.Pop();                //4-st
            A.Pop();                //5-st!
            A.Pop();                //Несуществующий
        }
Esempio n. 2
0
        public void TestAsserArrStack()
        {
            ArrStack <int> A = new ArrStack <int>();

            A.Push(1);
            A.Push(2);
            A.Push(3);
            A.Push(4);
            A.Push(5);

            //Pop
            //Normal
            int testnum1 = A.Pop(); //1
            int testnum2 = A.Pop(); //2

            Assert.AreEqual(5, testnum1);
            Assert.AreEqual(4, testnum2);
            //Edge
            A.Pop(); //3
            A.Pop(); //4
            A.Pop(); //5
        }
Esempio n. 3
0
File: Test.cs Progetto: Laetar/Epam
        public void TestAsserArrStack()
        {
            ArrStack<int> A = new ArrStack<int>();

            A.Push(1);
            A.Push(2);
            A.Push(3);
            A.Push(4);
            A.Push(5);

            //Pop
            //Normal
            int testnum1 = A.Pop(); //1
            int testnum2 = A.Pop(); //2
            Assert.AreEqual(5, testnum1);
            Assert.AreEqual(4, testnum2);
            //Edge
            A.Pop(); //3
            A.Pop(); //4
            A.Pop(); //5
        }
Esempio n. 4
0
File: Test.cs Progetto: Laetar/Epam
        public void TestExceptionrArrStack()
        {
            ArrStack<int> A = new ArrStack<int>();

            A.Push(1);
            A.Push(2);
            A.Push(3);
            A.Push(4);
            A.Push(5);

            //Take
            int testnum1 = A.Pop(); //1-st
            int testnum2 = A.Pop(); //2-st
            A.Pop(); //3-st
            A.Pop(); //4-st
            A.Pop(); //5-st!
            A.Pop(); //Несуществующий
        }