Exemple #1
0
        public void TestMethodDouble()
        {
            SingleNodeList root = new SingleNodeList(60);

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

            Assert.AreEqual(2, list.Count);
            Assert.AreEqual(60, list[0]);
        }
Exemple #2
0
        public void TestMethodSingle()
        {
            SingleNodeList root = new SingleNodeList(60);

            Assert.IsFalse(root.Contains(10));
            Assert.IsTrue(root.Contains(60));
            List <int> list = root.GetList();

            Assert.AreEqual(1, list.Count);
            Assert.AreEqual(60, list[0]);
        }
Exemple #3
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]);
        }