コード例 #1
0
 public void Have_Ability_To_Remove_Head_Or_Tail_Node()
 {
     LinkedList<int> list = new LinkedList<int>();
     Node<int> node100 = new Node<int>(100);
     Node<int> node200 = new Node<int>(200);
     Node<int> node300 = new Node<int>(300);
     list.AddToTail(node100);
     list.AddToTail(node200);
     list.AddToTail(node300);
     Assert.AreSame(node100, list.Head);
     list.RemoveFromHead();
     Assert.AreSame(node200, list.Head);
     Assert.AreSame(node300, list.Tail);
     list.RemoveFromTail();
     Assert.AreSame(node200, list.Tail);
 }