public void Remove_ValueNotInList_ListCountRemainsUnchanged() { // Arrange JList <int> j = new JList <int>(); j.Add(0); j.Add(1); j.Add(2); j.Add(3); j.Add(4); int expected = j.Count; // Act j.Remove(5); // Assert int actual = j.Count; Assert.AreEqual(expected, actual); }
public void Remove_ValueInList_ValueIsRemoved() { // Arrange JList <int> j = new JList <int>(); j.Add(0); j.Add(1); j.Add(2); j.Add(3); j.Add(4); // Act j.Remove(2); // Assert int expected = -1; int actual = j.Find(2); Assert.AreEqual(expected, actual); }