예제 #1
0
        public void can_bind_to_form_post_data()
        {
            var model = new FormInput{
                Color = "Orange",
                Direction = "South"
            };

            Harness.Endpoints.PostAsForm(model).ReadAsText()
                .ShouldEqual(model.ToString());
        }
        public void can_bind_to_form_post_data()
        {
            var formInput = new FormInput
            {
                Color = "Orange",
                Direction = "South"
            };

            TestHost.Scenario(_ => {
                _.FormData(formInput);

                _.ContentShouldBe(formInput.ToString());
            });
        }
예제 #3
0
        public void can_bind_to_form_post_data()
        {
            var formInput = new FormInput
            {
                Color     = "Orange",
                Direction = "South"
            };

            TestHost.Scenario(_ => {
                _.FormData(formInput);

                _.ContentShouldBe(formInput.ToString());
            });
        }
        public void can_bind_to_form_post_data_defined_explicitly()
        {
            var formInput = new FormInput
            {
                Color = "Orange",
                Direction = "South"
            };

            TestHost.Scenario(_ => {
                _.Post.Input(formInput);
                _.Request.ContentType(MimeType.HttpFormMimetype);

                _.Request.Form["Color"] = "Orange";
                _.Request.Form["Direction"] = "South";

                _.ContentShouldBe(formInput.ToString());
            });
        }
예제 #5
0
        public void can_bind_to_form_post_data_defined_explicitly()
        {
            var formInput = new FormInput
            {
                Color     = "Orange",
                Direction = "South"
            };

            TestHost.Scenario(_ => {
                _.Post.Input(formInput);
                _.Request.ContentType(MimeType.HttpFormMimetype);

                _.Request.Form["Color"]     = "Orange";
                _.Request.Form["Direction"] = "South";

                _.ContentShouldBe(formInput.ToString());
            });
        }
 public string post_form_values(FormInput input)
 {
     return input.ToString();
 }
 public string post_form_values(FormInput input)
 {
     return(input.ToString());
 }