public void can_bind_to_request_cookies()
        {
            var model = new CookieModel{
                Color = "Green",
                Direction = "South"
            };

            Harness.Endpoints.GetByInput(model, configure: SetupCookies).ReadAsText()
                .ShouldEqual(model.ToString());
        }
Beispiel #2
0
        public void can_bind_to_request_cookies()
        {
            var model = new CookieModel
            {
                Color = "Green",
                Direction = "South"
            };

            TestHost.Scenario(_ => {
                _.Get.Input(model);

                _.Request.AppendCookie(new Cookie("Color", "Green"));
                _.Request.AppendCookie(new Cookie("Direction", "South"));

                _.ContentShouldBe(model.ToString());
            });
        }
Beispiel #3
0
        public void can_bind_to_request_cookies()
        {
            var model = new CookieModel
            {
                Color     = "Green",
                Direction = "South"
            };

            TestHost.Scenario(_ => {
                _.Get.Input(model);

                _.Request.AppendCookie(new Cookie("Color", "Green"));
                _.Request.AppendCookie(new Cookie("Direction", "South"));

                _.ContentShouldBe(model.ToString());
            });
        }
Beispiel #4
0
 public string get_cookie_data(CookieModel input)
 {
     return input.ToString();
 }
Beispiel #5
0
 public string get_cookie_data(CookieModel input)
 {
     return(input.ToString());
 }