public void RemoveCookie_ShouldResetCookieValue() { _cookieHandler.SetCookieValue("foo", "bar"); _cookieHandler.InvalidateCookie("foo"); var value = _cookieHandler.GetCookieValue("foo"); Assert.That(value, Is.EqualTo(string.Empty)); }
public void InvalidateCookie(string cookieName) { if (_httpContext == null || _httpContext.Request == null || _httpContext.Request.Url == null) { return; } if (_domainHost != _httpContext.Request.Url.Host) { return; } _cookieHandler.InvalidateCookie(cookieName); }