Beispiel #1
0
        public HttpResponseMessage GetCookie()
        {
            object result = string.Empty;
            string token  = DNTRequest.GetString("token");

            result = TestCookie.GetCookie();
            HttpResponseMessage res = new HttpResponseMessage {
                Content = new StringContent(result.ToString(), Encoding.GetEncoding("UTF-8"), "text/plain")
            };

            return(res);
        }
Beispiel #2
0
        protected void TestForAllStylers(Func <SimulatedHttpClient, Task> action)
        {
            Test(async httpClient =>
            {
                var cookie  = new TestCookie();
                cookie.Name = "cssFramework";
                httpClient.Cookies.Add(cookie);

                foreach (CssFramework cssFramework in Enum.GetValues(typeof(CssFramework)))
                {
                    cookie.Value = cssFramework.ToString();
                    await action(httpClient);
                }
            });
        }