예제 #1
0
        public void TestAsserLinkQueue()
        {
            LinkQueue <int> A = new LinkQueue <int>();

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

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

            Assert.AreEqual(1, testnum1);
            Assert.AreEqual(2, testnum2);
            //Edge
            A.Take(); //3-st
            A.Take(); //4-st
            A.Take(); //5-st!
        }
예제 #2
0
파일: Test.cs 프로젝트: Laetar/Epam
        public void TestAsserLinkQueue()
        {
            LinkQueue<int> A = new LinkQueue<int>();

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

            //Take
            //Normal
            int testnum1 = A.Take(); //1-st
            int testnum2 = A.Take(); //2-st
            Assert.AreEqual(1, testnum1);
            Assert.AreEqual(2, testnum2);
            //Edge
            A.Take(); //3-st
            A.Take(); //4-st
            A.Take(); //5-st!
        }