示例#1
0
 public void AddHeadTest()
 {
     //also a test of the DisplayList method
     //tail
     linkedList.AddHead('a');
     linkedList.AddHead('b');
     linkedList.AddHead('c');
     linkedList.AddHead('d');
     //head
     //prints backwards
     Assert.AreEqual("d c b a ", linkedList.DisplayList());
 }
示例#2
0
 public void AddHeadTest()
 {
     //also a test of the DisplayList method
     //tail
     studentList.AddHead(studentA); //tail
     studentList.AddHead(studentB);
     studentList.AddHead(studentC);
     studentList.AddHead(studentD); //head
     //head
     //prints backwards
     Assert.AreEqual("Terry Brian Jerry Sally ", studentList.DisplayList());
 }