Пример #1
0
        public void AddToTest(int[] array, int idx, int value, int[] expectedArray)
        {
            DLinkedList actual   = new DLinkedList(array);
            DLinkedList expected = new DLinkedList(expectedArray);

            actual.AddTo(idx, value);
            Assert.AreEqual(expected, actual);
        }
Пример #2
0
        public void AddToNegativeTest(int[] array, int idx, int value)
        {
            DLinkedList actual = new DLinkedList(array);

            Assert.Throws <IndexOutOfRangeException>(() => actual.AddTo(idx, value));
        }