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

            int result = list.IndexOf(15);

            Assert.AreEqual(-1, result);
        }
예제 #2
0
        public void IndexOf_ReturnsIndexOfItemInList()
        {
            VirtualizingList<int> list = new VirtualizingList<int>();
            list.UpdateCount(20);
            list[2] = 8;
            list[10] = 42;

            int result = list.IndexOf(42);

            Assert.AreEqual(10, result);
        }