Esempio n. 1
0
        public void CheckPrintMethodForCodeCoverage()
        {
            LListSingle ll = new LListSingle();

            ll.AddNode(new Node("a"))
            .AddNode(new Node("b"))
            .AddNode(new Node("c"));
            ll.Print();
        }
Esempio n. 2
0
        public void ChainAddNodeMethodUpdatesHead()
        {
            LListSingle ll     = new LListSingle();
            Node        first  = new Node("first");
            Node        second = new Node("second");
            Node        third  = new Node("third");
            Node        fourth = new Node("fourth");

            ll.AddNode(first)
            .AddNode(second)
            .AddNode(third)
            .AddNode(fourth);

            Assert.Equal(fourth.Value, ll.Head.Value);
        }