public void Remove_ReturnsFalseForItemNotInList() { PageVirtualizingList<int> list = new PageVirtualizingList<int>(); list.UpdateCount(20, 6); list[2] = 8; list[5] = 10; list[10] = 42; bool result = list.Remove(12); Assert.AreEqual(false, result); }
public void Remove_RemovesItemFromList() { PageVirtualizingList<int> list = new PageVirtualizingList<int>(); list.UpdateCount(20, 6); list[2] = 8; list[5] = 10; list[10] = 42; list.Remove(10); Assert.AreEqual(19, list.Count); Assert.AreEqual(8, list[2]); Assert.AreEqual(42, list[9]); }