Example #1
0
        public void RemoveAt_Element_RemoveMultipleElementsFromList()
        {
            CustomList.ListMethod <int> listMethods = new CustomList.ListMethod <int>();
            //Arrange
            listMethods.Add(10);
            listMethods.Add(11);
            listMethods.Add(12);
            listMethods.Add(13);
            listMethods.Add(14);
            listMethods.Add(15);
            int expectedValue = 15;

            //Act
            listMethods.RemoveAt(3);
            listMethods.RemoveAt(3);
            int actualValue = listMethods[3];

            //Assert
            Assert.AreEqual(expectedValue, actualValue);
        }
Example #2
0
        public void RemoveAt_Element_RemoveASingleElementFromList()
        {
            CustomList.ListMethod <int> listMethods = new CustomList.ListMethod <int>();
            //Arrange
            listMethods.Add(10);
            listMethods.Add(11);
            listMethods.Add(12);
            int expectedValue = 12;

            //Act
            listMethods.RemoveAt(1);
            int actualValue = listMethods[1];

            //Assert
            Assert.AreEqual(expectedValue, actualValue);
        }