public void SetXDownloadOptionsHeader_NoOverride_DoesNothing() { var contextConfig = new SimpleBooleanConfiguration(); _contextHelper.Setup(h => h.GetXDownloadOptionsConfiguration(It.IsAny <HttpContextBase>())).Returns(contextConfig); _configurationOverrideHelper.Setup(h => h.GetXDownloadOptionsWithOverride(It.IsAny <HttpContextBase>())).Returns((SimpleBooleanConfiguration)null); _overrideHelper.SetXDownloadOptionsHeader(_mockContext); _headerGenerator.Verify(g => g.CreateXDownloadOptionsResult(It.IsAny <SimpleBooleanConfiguration>(), It.IsAny <SimpleBooleanConfiguration>()), Times.Never); _headerResultHandler.Verify(h => h.HandleHeaderResult(It.IsAny <HttpResponseBase>(), It.IsAny <HeaderResult>()), Times.Never); }
public override void SetHttpHeadersOnActionExecuted(ActionExecutedContext filterContext) { _headerOverrideHelper.SetXDownloadOptionsHeader(filterContext.HttpContext); }