Beispiel #1
0
        public void required_should_be_pulled_from_data_annotation()
        {
            _property = ReflectionHelper.GetProperty <ActionRequest>(a => a.required);

            var result = ActionCallMapper.createParameter(_property, _route);

            result.required.ShouldBeTrue();
        }
        public void for_normal_input_property_should_have_paramType_post()
        {
            var property = ReflectionHelper.GetProperty <ActionRequest>(a => a.redfish);

            var result = ActionCallMapper.createParameter(property, _route);

            result.paramType.ShouldEqual("post");
        }
        public void for_querystring_input_should_have_paramType_query()
        {
            var property = ReflectionHelper.GetProperty <ActionRequest>(a => a.query);

            var result = ActionCallMapper.createParameter(property, _route);

            result.paramType.ShouldEqual("query");
        }
Beispiel #4
0
        public void Given()
        {
            var graph = new BehaviorGraph();
            var chain = graph.AddActionFor("api/action1/{input}/", typeof(Action1));

            _route    = chain.Route;
            _property = ReflectionHelper.GetProperty <ActionRequest>(a => a.redfish);

            _result = ActionCallMapper.createParameter(_property, _route);
        }