public void AddHeadTest(int[] array, int value, int[] expected) { DoubleLinkedList Expect = new DoubleLinkedList(expected); DoubleLinkedList actual = new DoubleLinkedList(array); actual.AddHead(value); Assert.AreEqual(Expect, actual); }
public void AddHeadTest() { DoubleLinkedList <int> list = new DoubleLinkedList <int>(); Assert.AreNotEqual(null, list); Assert.AreEqual(0, list.Count); list.AddHead(10); Assert.AreEqual(1, list.Count); for (int i = 0; i < 100; ++i) { list.Add(i); } Assert.AreEqual(101, list.Count); }