示例#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!
        }