コード例 #1
0
        public void GetRequestHeaderValueReturnsCorrectValue()
        {
            var cookieJar = new CookieJar();

            cookieJar.Add(new Uri("http://bar.ext"), new Cookie {
                Name = "a", Value = "x", Domain = "bar.ext"
            });
            cookieJar.Add(new Uri("http://foo.bar.ext"), new Cookie {
                Name = "b", Value = "y", Domain = "bar.ext"
            });

            var header = cookieJar.GetRequestHeaderValue(new Uri("http://bar.ext"));

            Assert.Equal("a=x; b=y", header);
        }