Esempio n. 1
0
        public void SetUp()
        {
            var json = "{Name:'Max', Age:8, Nested:{Order:5}, Array:[{Order:0}, {Order:1}, {Order:2}]}".Replace("'", "\"");

            JsonTargetEndpoint.LastTarget = null;

            using (var server = FubuRuntime.Basic())
            {
                server.Scenario(_ => {
                    _.Post.Input <JsonTarget>();
                    _.Request.Body.JsonInputIs(json);
                    _.Request.ContentType("text/json");
                });
            }

            theResult = JsonTargetEndpoint.LastTarget;
        }
        public void SetUp()
        {
            var json = "{Name:'Max', Age:8, Nested:{Order:5}, Array:[{Order:0}, {Order:1}, {Order:2}]}".Replace("'", "\"");

            JsonTargetEndpoint.LastTarget = null;

            using (var server = FubuRuntime.Basic())
            {
                server.Scenario(_ => {
                    _.Post.Input<JsonTarget>();
                    _.Request.Body.JsonInputIs(json);
                    _.Request.ContentType("text/json");

                });
            }

            theResult = JsonTargetEndpoint.LastTarget;
        }
Esempio n. 3
0
        public string post_json_target(JsonTarget target)
        {
            LastTarget = target;

            return("ok");
        }
        public string post_json_target(JsonTarget target)
        {
            LastTarget = target;

            return "ok";
        }