public void IndexOfStringThatDoesntExist()
 {
     SinglyLinkedList list = new SinglyLinkedList("foo", "bar", "grille");
     Assert.AreEqual(-1, list.IndexOf("cat"));
 }
 public void IndexOfNodeInMiddlePosition()
 {
     SinglyLinkedList list = new SinglyLinkedList("foo", "bar", "grille");
     Assert.AreEqual(1, list.IndexOf("bar"));
 }
 public void IndexOfOnEmptyList()
 {
     SinglyLinkedList list = new SinglyLinkedList();
     Assert.AreEqual(-1, list.IndexOf("bar"));
 }
 public void IndexOfDuplicateNode()
 {
     SinglyLinkedList list = new SinglyLinkedList("foo", "bar", "bar", "grille");
     Assert.AreEqual(1, list.IndexOf("bar"));
 }
 public void IndexOfRemovedElement()
 {
     SinglyLinkedList list = new SinglyLinkedList();
     list.AddLast("foo");
     list.AddLast("bar");
     list.AddLast("grille");
     list.Remove("foo");
     Assert.AreEqual(-1, list.IndexOf("foo"));
 }
 public void IndexOfNodeInLastPosition()
 {
     SinglyLinkedList<string> list = new SinglyLinkedList<string>("foo", "bar", "grille");
     Assert.AreEqual(2, list.IndexOf("grille"));
 }
 public void testIndexOfNodeInFirst()
 {
     SinglyLinkedList list = new SinglyLinkedList();
     list.AddFirst("node1");
     Assert.AreEqual(0, list.IndexOf("node1"));
 }
 public void testIndexOfNodeForMultipleItems()
 {
     SinglyLinkedList list = new SinglyLinkedList();
     list.AddFirst("node1");
     list.AddLast("node2");
     Assert.AreEqual(1, list.IndexOf("node2"));
 }