Exemple #1
0
        public void ListSourceCopyTo()
        {
            tlog.Debug(tag, $"ListSourceCopyTo START");

            var para          = new TestEnumerable();
            var testingTarget = new ListSource(para);

            Assert.IsNotNull(testingTarget, "should be not null");
            Assert.IsInstanceOf <ListSource>(testingTarget, "should be an instance of testing target class!");

            Array intArray = Array.CreateInstance(typeof(int), 10);

            intArray.SetValue(4, 0);
            testingTarget.CopyTo(intArray, 2);
            tlog.Debug(tag, "Count : " + testingTarget.Count);

            testingTarget.Dispose();
            tlog.Debug(tag, $"ListSourceCopyTo END (OK)");
        }