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]); }
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); }
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]); }