示例#1
0
        public void CopyBig()
        {
            VirtualList <int> list     = new VirtualList <int>();
            List <int>        numbers1 = new List <int> {
                0, 1, 2
            };
            List <int> numbers2 = new List <int> {
                3, 4, 5
            };
            List <int> numbers3 = new List <int> {
                6, 7, 8, 9
            };

            list.AddSuppliers(numbers1, numbers2, numbers3);

            int[] ints = new int[20];
            list.CopyTo(ints, 2);
            for (int i = 2; i < 12; i++)
            {
                Assert.AreEqual(ints[i], i - 2);
            }
        }