public void PropertyContainer_SetValue_Collection()
        {
            var container = new TestArrayContainer();

            PropertyContainer.SetValue(ref container, nameof(TestArrayContainer.Int32Array), new [] { 4, 5, 6 });

            Assert.AreEqual(3, container.Int32Array.Length);
        }
Ejemplo n.º 2
0
        public void PropertyVisitor_Visit_StructWithArray()
        {
            var container = new TestArrayContainer
            {
                Int32Array         = new [] { 1, 2, 3 },
                TestContainerArray = new [] { new TestPrimitiveContainer(), new TestPrimitiveContainer() }
            };

            PropertyContainer.Visit(ref container, new DebugLogVisitor());
        }