public void Remove_CheckCount_AfterRemoveAtIndexZeroandOne() { //Arrange NewCustomList <int> mylist = new NewCustomList <int>(); int expected = 1; int actual; //Act mylist.Add(6); mylist.Add(5); mylist.Add(4); mylist.Remove(6); mylist.Remove(5); actual = mylist.Count; //Assert Assert.AreEqual(expected, actual); }
public void Remove_RemoveAtIndexZeroAndOne() { //Arrange NewCustomList <int> mylist = new NewCustomList <int>(); int expected = 4; int actual; //Act mylist.Add(6); mylist.Add(5); mylist.Add(4); mylist.Remove(6); mylist.Remove(5); actual = mylist[0]; //Assert Assert.AreEqual(expected, actual); }
public void RemoveStringTest() { //arrange NewCustomList <string> newlist1 = new NewCustomList <string>() { "Dog", "Bird", "Lizard", "Frog", "Cat" }; int expected = 2; //act newlist1.Remove("Lizard"); newlist1.Remove("Dog"); newlist1.Remove("Frog"); int actual = newlist1.Count; //assert Assert.AreEqual(expected, actual); }
public void Remove_TestEndOfString() { //Arrange NewCustomList <string> newlist = new NewCustomList <string>(); newlist.Add("Hi"); newlist.Add("Hello"); newlist.Add("Baby"); newlist.Add("Hey"); newlist.Add("Son"); //Act newlist.Remove("Son"); //Assert Assert.AreEqual("Son", newlist.LastElementRemoved); }
public void Remove_TestFirstInt() { //Arrange NewCustomList <int> newlist = new NewCustomList <int>(); newlist.Add(1); newlist.Add(2); newlist.Add(3); newlist.Add(4); newlist.Add(5); //Act newlist.Remove(3); //Assert Assert.AreEqual(4, newlist[2]); }