Esempio n. 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());
        }
Esempio n. 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());
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        public void Should_Create_Cookie_With_Name_And_Value()
        {
            var cookie = new Cookie("uweb", "uweb");

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