public void Should_Set_Cacheability() { // arrange var module = new CustomErrorsHelperModule(); // act module.OnError(_httpContext.Object); // assert _httpCachePolicyBase.Verify(cache => cache.SetCacheability(HttpCacheability.NoCache)); }
public void Should_Set_Http_Status_Code() { // arrange var module = new CustomErrorsHelperModule(); // act module.OnError(_httpContext.Object); // assert _httpResponse.VerifySet(response => response.StatusCode = (int)_statusCode); }
public void Should_Add_Content_Type_Header() { // arrange var module = new CustomErrorsHelperModule(); // act module.OnError(_httpContext.Object); // assert _httpResponse.Verify(response => response.AddHeader("Content-Type", "text/html; charset=utf-8")); }