Beispiel #1
0
        public void Remove_ReturnsFalseForItemNotInList()
        {
            VirtualizingList<int> list = new VirtualizingList<int>();
            list.UpdateCount(20);
            list[2] = 8;
            list[5] = 10;
            list[10] = 42;

            bool result = list.Remove(12);

            Assert.AreEqual(false, result);
        }
Beispiel #2
0
        public void Remove_RemovesItemFromList()
        {
            VirtualizingList<int> list = new VirtualizingList<int>();
            list.UpdateCount(20);
            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]);
        }