Ejemplo n.º 1
0
        public void RemoveStringAtIndex()
        {
            //Arrange
            ListCustom <string> testListOne = new ListCustom <string>()
            {
                "0", "1", "2"
            };

            //Act
            testListOne.RemoveAt(1);
            //Assert
            Assert.AreEqual("0", testListOne[0]);
            Assert.AreEqual("2", testListOne[1]);
        }
Ejemplo n.º 2
0
        public void RemoveObjectAtIndex()
        {
            //Arrange
            ListCustom <Person> testListOne = new ListCustom <Person>()
            {
                new Person("1"), new Person("3"), new Person("2")
            };

            //Act
            testListOne.RemoveAt(1);
            //Assert
            Assert.AreEqual("1", testListOne[0].name);
            Assert.AreEqual("2", testListOne[1].name);
        }
Ejemplo n.º 3
0
        public void RemoveIntAtIndex()
        {
            //Arrange
            ListCustom <int> testListOne = new ListCustom <int>()
            {
                0, 1, 2
            };

            //Act
            testListOne.RemoveAt(1);
            //Assert
            Assert.AreEqual(0, testListOne[0]);
            Assert.AreEqual(2, testListOne[1]);
        }