public void AddArrayListByIndex_WhenInvalidValuePassed_ShouldReturnIndexOutOfRangeException_NegativeTests( ArrayList list, int index, int[] actualArray) { ArrayList actual = ArrayList.Create(actualArray); Assert.Throws <IndexOutOfRangeException>(() => actual.AddArrayListByIndex(list, index)); }
public void Add_ArrayListByIndex(int index, int[] actualArray, int[] expectedArray) { ArrayList actual = ArrayList.Create(actualArray); ArrayList expected = ArrayList.Create(expectedArray); ArrayList addList = ArrayList.Create(new int[] { 77, 77, 77 }); actual.AddArrayListByIndex(addList, index); Assert.AreEqual(expected, actual); }
public void AddArrayListByIndexTest(int index, int[] array, int[] insertArray, int[] expectedArray) { ArrayList actual = new ArrayList(array); ArrayList expected = new ArrayList(expectedArray); ArrayList insert = new ArrayList(insertArray); actual.AddArrayListByIndex(index, insert); Assert.AreEqual(expected, actual); }
public void AddArrayListByIndex_WhenValidValuePassed_ShouldAddArrayListByIndexToOtherList_Tests( int index, int[] actualArray, int[] expectedArray) { ArrayList actual = ArrayList.Create(actualArray); ArrayList expected = ArrayList.Create(expectedArray); ArrayList addedList = ArrayList.Create(new int[] { 0, 0, 0 }); actual.AddArrayListByIndex(addedList, index); Assert.AreEqual(expected, actual); }
public void AddArrayListByIndexTest(int[] inputArray, int[] additionalArray, int index, int[] expectedArray) { SetUp(inputArray, expectedArray, additionalArray); actual.AddArrayListByIndex(additional, index); Assert.AreEqual(expected, actual); }