예제 #1
0
        public void AddNewNodeTest()
        {
            SingleLinkedList target = new SingleLinkedList();
            string           n      = "Arthur";

            target.AddNewNode(n);
            Assert.AreEqual(n, target.head.next.Name);
        }
예제 #2
0
        public void RemoveNodeTest()
        {
            SingleLinkedList target = new SingleLinkedList();
            string           n      = "Arthur";

            target.AddNewNode(n);
            target.RemoveNode(n);
            Assert.IsNull(target.head.next);
        }
예제 #3
0
        public void FindNodeTest()
        {
            SingleLinkedList target   = new SingleLinkedList();
            string           n        = "Arthur";
            bool             expected = true;
            bool             actual;

            target.AddNewNode(n);
            actual = target.FindNode(n);
            Assert.AreEqual(expected, actual);
        }