public void Insert_Exception_IndexIsGreaterThanCount() { VirtualizingList<int> list = new VirtualizingList<int>(); list.UpdateCount(20); Assert.ThrowsException<ArgumentOutOfRangeException>(() => list.Insert(21, 123)); }
public void Insert_InsertsItemIntoList() { VirtualizingList<int> list = new VirtualizingList<int>(); list.UpdateCount(20); list[2] = 8; list[10] = 42; list.Insert(5, 123); Assert.AreEqual(21, list.Count); Assert.AreEqual(8, list[2]); Assert.AreEqual(123, list[5]); Assert.AreEqual(42, list[11]); }