示例#1
0
        public void TestNodeDataLinkedListValue()
        {
            MyLL <int>         llinner = new MyLL <int>(1);
            MyLL <MyLL <int> > llouter = new MyLL <MyLL <int> >(llinner);
            var actual = llouter.GetHeadData();

            Assert.IsInstanceOfType(actual, llinner.GetType());
        }
示例#2
0
        public void TestGetSizeOneNodeList()
        {
            // Doubles as test of Single Data Constructor
            MyLL <int> ll     = new MyLL <int>(3);
            var        expect = (int)1;
            var        actual = ll.GetSize();

            Assert.AreEqual(expect, actual);
            // CAUTION: Head and Tail of 1 node list should be the same node, not just equivalent value
            Assert.AreEqual(ll.GetHeadData(), ll.GetTailData());
        }
示例#3
0
 public void TestGetHeadDataNullValue()
 {
     MyLL <string> ll     = new MyLL <string>();
     var           errata = ll.GetHeadData();
 }