Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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);
        }