Пример #1
0
        public static void TestDefaultValue <TValue>(this Type type, string propertyPath, TValue value)
        {
            var    func = type.AccessPropertyDefaultIfNull(propertyPath, value).ToDelegate();
            var    obj  = Activator.CreateInstance(type);
            TValue res  = (TValue)func.DynamicInvoke(obj);

            Assert.Equal(value, res);
        }