Exemple #1
0
        public void Construct_ReturnsCorrectlyTypedInstance()
        {
            var config = new AuthenticatorConfigurationElement()
            {
                Factory = typeof(MockAuthConfigFactory).AssemblyQualifiedName
            };

            Assert.IsType <MockAuthenticator>(HttpContextInspectorsLocator.Construct(config));
        }
Exemple #2
0
        public void Construct_ThrowsOnInvalidConfigurationTypeName()
        {
            var config = new AuthenticatorConfigurationElement()
            {
                Factory = "GobbledyGook"
            };

            Assert.Throws <ArgumentNullException>(() => HttpContextInspectorsLocator.Construct(config));
        }
Exemple #3
0
 public void Construct_ThrowsOnNullInspectors()
 {
     Assert.Throws <ArgumentNullException>(() => HttpContextInspectorsLocator.Construct(null as IDictionary <string, AuthenticatorConfigurationElement>));
 }
Exemple #4
0
 public void Construct_ThrowsOnNullConfiguration()
 {
     Assert.Throws <ArgumentNullException>(() => HttpContextInspectorsLocator.Construct(null as AuthenticatorConfigurationElement));
 }