static void AssertPropertyIsOfType <TContainer, TValue>(IPropertyBag <TContainer> propertyBag, string propertyName)
        {
            var container     = TypeConstruction.Construct <TContainer>(typeof(TContainer));
            var changeTracker = default(ChangeTracker);
            var action        = new AssertThatPropertyIsOfType <TContainer, TValue>();

            Assert.That(propertyBag.FindProperty(propertyName, ref container, ref changeTracker, ref action), Is.True);
        }
Example #2
0
        public void ReflectedPropertyBagGenerator_UnmanagedProperty_Char()
        {
            var propertyBag   = new ReflectedPropertyBagProvider().Generate <ContainerWithCharField>();
            var container     = default(ContainerWithCharField);
            var changeTracker = default(ChangeTracker);
            var action        = new AssertThatPropertyIsOfType <ContainerWithCharField, UnmanagedProperty <ContainerWithCharField, char> >();

            propertyBag.FindProperty("c", ref container, ref changeTracker, ref action);
        }