public void DeleteElemNegativTests(int[] array, int[] expArray, int index, int size = 1) { ArrayMyList expected = new ArrayMyList(expArray); ArrayMyList actual = new ArrayMyList(array); Assert.Throws <IndexOutOfRangeException>(() => actual.DeleteElem(index, size)); }
public void DeleteElemTests(int[] array, int[] expArray, int index, int number = 1) { ArrayMyList expected = new ArrayMyList(expArray); ArrayMyList actual = new ArrayMyList(array); actual.DeleteElem(index, number); Assert.AreEqual(expected, actual); }
static void Main(string[] args) { ArrayMyList A = new ArrayMyList(); A.Push_Back(2); A.Push_Back(2); A.Push_Back(2); A.Push_Back(3); Console.WriteLine(); A.ConsoleArr(); A.DeleteElem(1); A.DeletePerv(); Console.WriteLine(); A.ConsoleArr(); }