예제 #1
0
        public void Should_Set_Cookie()
        {
            var cookie = new Cookie("uweb", "uweb");
            response.AddCookie(cookie);

            response.Cookies.ShouldHaveCount(1);
            Assert.AreSame(cookie, response.Cookies.First());
        }
예제 #2
0
        public void AppendCookie_Adds_Cookie_To_Response()
        {
            var cookie = new Cookie("uweb", "uweb");

            outputWriter.AppendCookie(cookie);

            var response = outputWriter.CreateResponse();

            response.Cookies.ShouldHaveCount(1);

            Assert.Same(cookie, response.Cookies.First());
        }
예제 #3
0
파일: CookieTests.cs 프로젝트: UStack/UWeb
        public void Should_Create_Cookie_With_Name_Value_HttpOnly_And_Secure()
        {
            var cookie = new Cookie("uweb", "uweb", true, true);

            ValidateCookie(cookie, "uweb", "uweb", true, true);
        }
예제 #4
0
파일: CookieTests.cs 프로젝트: UStack/UWeb
        public void Should_Create_Cookie_With_Name_And_Value()
        {
            var cookie = new Cookie("uweb", "uweb");

            ValidateCookie(cookie, "uweb", "uweb", false, false);
        }