public void IndexOf_Exception(int[] data, int number, int start) { var ll = new CrackingTheCodingInterview.DataStructures.LinkedLists.DoublyLinkedList <int>(); foreach (var item in data) { ll.Add(item); } var actual = ll.IndexOf(start, number); }
public void IndexOf(int[] data, int number, int start, int expected) { var ll = new CrackingTheCodingInterview.DataStructures.LinkedLists.DoublyLinkedList <int>(); foreach (var item in data) { ll.Add(item); } var actual = ll.IndexOf(start, number); Assert.AreEqual(actual, expected); }