Beispiel #1
0
        public void TestCopyTo()
        {
            ActiveCollection <object> test = new ActiveCollection <object>();

            test.Add("a");
            test.Add("b");
            object[] array1 = new object[2];
            test.CopyTo(array1, 0);
            Assert.AreEqual(array1, new object[] { "a", "b" });
            object[] array2 = new object[3];
            test.CopyTo(array2, 1);
            Assert.AreEqual(array2, new object[] { null, "a", "b" });
        }
Beispiel #2
0
 public void TestCopyTo()
 {
     ActiveCollection<object> test = new ActiveCollection<object>();
     test.Add("a");
     test.Add("b");
     object[] array1 = new object[2];
     test.CopyTo(array1, 0);
     Assert.AreEqual(array1, new object[] { "a", "b" });
     object[] array2 = new object[3];
     test.CopyTo(array2, 1);
     Assert.AreEqual(array2, new object[] { null, "a", "b" });
 }