Example #1
0
        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));
        }
Example #2
0
        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);
        }
Example #3
0
        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();
        }