public void GetFailureHandler_ReturnsCorrectlyTypedInstance() { var config = new HttpAuthenticationConfigurationSection() { FailureHandlerFactoryName = typeof(MockConfigFactory).AssemblyQualifiedName }; Assert.IsType <MockFailureHandler>(HttpContextInspectorsLocator.GetFailureHandler(config)); }
public void GetFailureHandler_ThrowsOnInvalidConfigurationTypeName() { var config = new HttpAuthenticationConfigurationSection() { FailureHandlerFactoryName = "GobbledyGook" }; Assert.Throws <ArgumentNullException>(() => HttpContextInspectorsLocator.GetFailureHandler(config)); }
public void GetFailureHandler_ReturnsNullOnNullConfiguration() { var config = new HttpAuthenticationConfigurationSection(); Assert.Null(HttpContextInspectorsLocator.GetFailureHandler(config)); }
public void GetFailureHandler_ThrowsOnNullConfiguration() { Assert.Throws <ArgumentNullException>(() => HttpContextInspectorsLocator.GetFailureHandler(null)); }