Exemplo n.º 1
0
        public void Should_bind_parameter_property()
        {
            var action          = ActionMethod.From <PropertyBinderHandler>(x => x.Action(null));
            var parameter       = action.MethodDescriptor.Parameters.First();
            var property        = parameter.ParameterType.Properties.First();
            var actionParameter = new ActionParameter(action, parameter, property);
            var model           = new PropertyBinderHandler.Model();

            actionParameter.BindProperty(model, "fark");

            model.Value.ShouldEqual("fark");
        }