public void SetUp() { customCookie1 = new HttpCookie("foo") { Value = "foo-value", Path = "/" }; customCookie2 = new HttpCookie("bar") { Value = "bar-value", Path = "/" }; var requestCookies = new HttpCookieCollection {customCookie1, customCookie2}; httpRequest = new FakeHttpRequest("http://foo.bar", true); httpResponse = new FakeHttpResponse(); httpContext = new FakeHttpContext(httpRequest, httpResponse); cookieHandler = Substitute.For<IHttpCookieHandler>(); cookieHandler.GetRequestCookies().Returns(requestCookies); cookieInvalidator = new DomainCookieInvalidator("foo.bar", httpContext, cookieHandler); }
public void SetUp() { _customCookie1 = new HttpCookie("foo") { Value = "bar", Path = "/" }; _customCookie2 = new HttpCookie("foo") { Value = "bar2", Path = "/" }; _httpRequest = new FakeHttpRequest("http://foo.bar", true); _httpResponse = new FakeHttpResponse(); _httpContext = new FakeHttpContext(_httpRequest, _httpResponse); _cookieHandler = new HttpContextCookieHandler(_httpContext); }
public void SetUp() { _customCookie1 = new HttpCookie("foo") { Value = "foo-value", Path = "/" }; _customCookie2 = new HttpCookie("bar") { Value = "bar-value", Path = "/" }; var requestCookies = new HttpCookieCollection { _customCookie1, _customCookie2 }; _httpRequest = new FakeHttpRequest("http://foo.bar", true); _httpResponse = new FakeHttpResponse(); _httpContext = new FakeHttpContext(_httpRequest, _httpResponse); _cookieHandler = Substitute.For <IHttpCookieHandler>(); _cookieHandler.GetRequestCookies().Returns(requestCookies); _cookieInvalidator = new DomainCookieInvalidator("foo.bar", _httpContext, _cookieHandler); }
public DomainCookieInvalidator(string domainHost, HttpContextBase httpContext, IHttpCookieHandler cookieHandler) { _domainHost = domainHost; _httpContext = httpContext; _cookieHandler = cookieHandler; }
public DomainCookieInvalidator(string domainHost, HttpContext httpContext, IHttpCookieHandler cookieHandler) : this(domainHost, new HttpContextWrapper(httpContext), cookieHandler) { }
public void Constructor_ShouldSupportCustomContext() { cookieHandler = new HttpContextCookieHandler(httpContext); Assert.That(cookieHandler, Is.Not.Null); }
public void SetUp() { customCookie1 = new HttpCookie("foo") { Value = "bar", Path = "/" }; customCookie2 = new HttpCookie("foo") { Value = "bar2", Path = "/" }; httpRequest = new FakeHttpRequest("http://foo.bar", true); httpResponse = new FakeHttpResponse(); httpContext = new FakeHttpContext(httpRequest, httpResponse); cookieHandler = new HttpContextCookieHandler(httpContext); }
public DomainCookieInvalidator(string domainHost, HttpContextBase httpContext, IHttpCookieHandler cookieHandler) { _domainHost = domainHost; _httpContext = httpContext; _cookieHandler = cookieHandler; }
public DomainCookieInvalidator(string domainHost, HttpContext httpContext, IHttpCookieHandler cookieHandler) : this(domainHost, new HttpContextWrapper(httpContext), cookieHandler) { }
public void Constructor_ShouldSupportCustomContext() { _cookieHandler = new HttpContextCookieHandler(_httpContext); Assert.That(_cookieHandler, Is.Not.Null); }