示例#1
0
        public void AddByIndexNegativTests(int[] array, int index, int value, int[] expArray)
        {
            DoubleLList expected = new DoubleLList(expArray);
            DoubleLList actual   = new DoubleLList(array);

            Assert.Throws <IndexOutOfRangeException>(() => actual.AddByIndex(index, value));
        }
示例#2
0
        public void AddByIndexTest(int[] array, int index, int value, int[] expected)
        {
            DoubleLList Expect = new DoubleLList(expected);
            DoubleLList actual = new DoubleLList(array);

            actual.AddByIndex(index, value);
            Assert.AreEqual(Expect, actual);
        }