コード例 #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());
        }
コード例 #2
0
        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());
            });
        }
コード例 #4
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());
            });
        }
コード例 #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());
            });
        }
コード例 #6
0
 public string post_form_values(FormInput input)
 {
     return input.ToString();
 }
コード例 #7
0
 public string post_form_values(FormInput input)
 {
     return(input.ToString());
 }