public void SetXRobotsTagHeader_NoOverride_DoesNothing() { var contextConfig = new XRobotsTagConfiguration(); _contextHelper.Setup(h => h.GetXRobotsTagConfiguration(It.IsAny <HttpContextBase>())).Returns(contextConfig); _configurationOverrideHelper.Setup(h => h.GetXRobotsTagWithOverride(It.IsAny <HttpContextBase>())).Returns((XRobotsTagConfiguration)null); _overrideHelper.SetXRobotsTagHeader(_mockContext); _headerGenerator.Verify(g => g.CreateXRobotsTagResult(It.IsAny <XRobotsTagConfiguration>(), It.IsAny <XRobotsTagConfiguration>()), Times.Never); _headerResultHandler.Verify(h => h.HandleHeaderResult(It.IsAny <HttpResponseBase>(), It.IsAny <HeaderResult>()), Times.Never); }
public override void SetHttpHeadersOnActionExecuted(ActionExecutedContext filterContext) { _headerOverrideHelper.SetXRobotsTagHeader(filterContext.HttpContext); }