public void Remove_MultiInts_IndexChange() { // Arrange ListProperties <int> list = new ListProperties <int>() { 0, 1, 2, 3, 4, 5, 6, 7 }; int expected = 7; // Act list.Remove(0); list.Remove(3); // Assert Assert.AreEqual(expected, list[5]); }
public void Remove_Objects_ThrowException() { // Arrange ListProperties <object> list = new ListProperties <object>(); object notExpected = list; // Act list.Add(list); list.Add(list); list.Add(list); list.Remove(list); list.Remove(list); list.Remove(list); // Assert Assert.AreNotEqual(notExpected, list[0]); }
public void Remove_Nothing_ResultEqualsFalse() { // Arrange ListProperties <object> list = new ListProperties <object>(); // Act bool expected = false; bool remove = list.Remove(list); // Assert Assert.AreEqual(expected, remove); }
public void Remove_EveryInts_ThrowException() { // Arrange ListProperties <int> list = new ListProperties <int>(); list.Add(1); int notExpected = 1; // Act list.Remove(1); // Assert Assert.AreNotEqual(notExpected, list[0]); }
public void Remove_Object_ResultEqualsTrue() { // Arrange ListProperties <object> list = new ListProperties <object>(); list.Add(list); list.Add(list); // Act bool expected = true; bool remove = list.Remove(list); // Assert Assert.AreEqual(expected, remove); }
public void Remove_SingleObject_CountGoesDown() { // Arrange ListProperties <object> list = new ListProperties <object>(); list.Add(list); list.Add(list); // Act int expected = 1; list.Remove(list); // Assert Assert.AreEqual(expected, list.Count); }
public void Remove_SingleInt_CountGoesDown() { // Arrange ListProperties <int> list = new ListProperties <int>(); list.Add(1); list.Add(1); list.Add(1); list.Add(1); // Act int notExpected = list.Count; list.Remove(1); // Assert Assert.AreNotEqual(notExpected, list.Count); }
public void Remove_SingleString_IndexChange() { // Arrange ListProperties <string> list = new ListProperties <string>() { "One", "Two", "Three" }; string one = "One"; // Act list.Remove(one); string expected = "Three"; // Assert Assert.AreEqual(expected, list[1]); }