public void ChangeByIndexTest(int[] array, int index, int value, int[] expArray) { DLinkedList expected = new DLinkedList(expArray); DLinkedList actual = new DLinkedList(array); actual.ChangeByIndex(index, value); Assert.AreEqual(expected, actual); }
public void ChangeByIndexNegative(int[] arr, int index, int value) { DLinkedList ll = new DLinkedList(arr); Assert.Throws <IndexOutOfRangeException>(() => ll.ChangeByIndex(index, value)); }