示例#1
0
        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);
        }
示例#2
0
        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);
        }