Beispiel #1
0
        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);
        }
Beispiel #2
0
        public void ChangeByIndexNegative(int[] arr, int index, int value)
        {
            DLinkedList ll = new DLinkedList(arr);

            Assert.Throws <IndexOutOfRangeException>(() => ll.ChangeByIndex(index, value));
        }