Пример #1
0
        public void CopyTo_CopiesToDestinationArray()
        {
            PageVirtualizingList<int> list = new PageVirtualizingList<int>();
            list.UpdateCount(22, 3);
            list[2] = 8;
            list[10] = 42;

            int[] destination = new int[27];
            destination[1] = 1;
            destination[5] = 2;
            destination[24] = 3;

            list.CopyTo(destination, 2);

            CollectionAssert.AreEqual(new int[] { 0, 1, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0 }, destination);
        }