public void RemoveAt_Exception_IndexIsEqualToCount() { VirtualizingList<int> list = new VirtualizingList<int>(); list.UpdateCount(20); Assert.ThrowsException<ArgumentOutOfRangeException>(() => list.RemoveAt(20)); }
public void RemoveAt_RemovesItemFromList() { VirtualizingList<int> list = new VirtualizingList<int>(); list.UpdateCount(20); list[2] = 8; list[5] = 10; list[10] = 42; list.RemoveAt(5); Assert.AreEqual(19, list.Count); Assert.AreEqual(8, list[2]); Assert.AreEqual(42, list[9]); }