public void RemoveString() { //Arrange ListCustom <string> testListOne = new ListCustom <string>() { "Hello", "fail", "world" }; //Act testListOne.Remove("fail"); //Assert Assert.AreEqual("Hello", testListOne[0]); Assert.AreEqual("world", testListOne[1]); }
public void RemoveObject() { //Arrange ListCustom <Person> testListOne = new ListCustom <Person>() { new Person("1"), new Person("3"), new Person("2") }; //Act testListOne.Remove(testListOne[1]); //Assert Assert.AreEqual("1", testListOne[0].name); Assert.AreEqual("2", testListOne[1].name); }
public void RemoveInt() { //Arrange ListCustom <int> testListOne = new ListCustom <int>() { 0, 1, 2 }; //Act testListOne.Remove(1); //Assert Assert.AreEqual(0, testListOne[0]); Assert.AreEqual(2, testListOne[1]); }