Пример #1
0
        public void TestActionOneParamInt32()
        {
            Action <Object, String> func = ExpressionTreeReflection.ReflectAction <String>(suType, "VMethod");
            SimpleUnknown           su   = new SimpleUnknown();

            func(su, "test");
            Assert.That(su.Val, Is.EqualTo(4));
        }
Пример #2
0
        public void TestActionNoParams()
        {
            Action <Object> func = ExpressionTreeReflection.ReflectAction(suType, "VMethod");
            SimpleUnknown   su   = new SimpleUnknown();

            func(su);
            Assert.That(su.Val, Is.EqualTo(10));
        }