示例#1
0
        public void TestMethodTriple()
        {
            SingleNodeList root = new SingleNodeList(60);

            root.AddNode(300);
            root.AddNode(30);
            List <int> list = root.GetList();

            Assert.AreEqual(3, list.Count);
            Assert.AreEqual(30, list[0]);
            Assert.AreEqual(60, list[1]);
            Assert.AreEqual(300, list[2]);
        }
示例#2
0
        public void TestMethodAddFour()
        {
            SingleNodeList root = new SingleNodeList(60);

            root.AddNode(300);
            root.AddNode(30);
            root.AddNode(20);
            Assert.IsFalse(root.Contains(10));
            Assert.IsTrue(root.Contains(60));

            List <int> list = root.GetList();

            Assert.AreEqual(4, list.Count);
            Assert.AreEqual(20, list[0]);
            Assert.AreEqual(30, list[1]);
            Assert.AreEqual(60, list[2]);
            Assert.AreEqual(300, list[3]);
        }