public void AddByIndexNegativTests(int[] array, int index, int value, int[] expArray) { DoubleLinkedList expected = new DoubleLinkedList(expArray); DoubleLinkedList actual = new DoubleLinkedList(array); Assert.Throws <IndexOutOfRangeException>(() => actual.AddElementByIndex(index, value)); }
public void AddByIndexTest(int[] array, int index, int value, int[] expected) { DoubleLinkedList Expect = new DoubleLinkedList(expected); DoubleLinkedList actual = new DoubleLinkedList(array); actual.AddElementByIndex(index, value); Assert.AreEqual(Expect, actual); }