public void CanCreateExternal() { Hashtable props = new Hashtable(); string[] mechanisms = new string[] { "EXTERNAL", "OTHER" }; ISaslClient client = Sasl.CreateClient(mechanisms, "", "", "", props, this); Assert.IsNotNull(client); Assert.IsInstanceOfType(typeof(ExternalSaslClient), client); }
public void ReturnsNullIfNoFactoryFound() { Hashtable props = new Hashtable(); props.Add(SaslProperties.PolicyNoPlainText, true); string[] mechanisms = new string[] { "PLAIN", "OTHER" }; ISaslClient client = Sasl.CreateClient(mechanisms, "", "", "", props, this); Assert.IsNull(client); }
public void CanCreateDigest() { Hashtable props = new Hashtable(); string[] mechanisms = new string[] { "DIGEST-MD5", "OTHER" }; ISaslClient client = Sasl.CreateClient(mechanisms, "", "", "", props, this); Assert.IsNotNull(client); Assert.IsInstanceOfType(typeof(DigestSaslClient), client); }
public void CanCreateAnonymous() { Hashtable props = new Hashtable(); string[] mechanisms = new string[] { "ANONYMOUS", "OTHER" }; ISaslClient client = Sasl.CreateClient(mechanisms, "", "", "", props, this); Assert.IsNotNull(client); Assert.IsInstanceOfType(typeof(AnonymousSaslClient), client); }
public void CanCreatePlain() { Hashtable props = new Hashtable(); string[] mechanisms = new string[] { "PLAIN", "OTHER" }; ISaslClient client = Sasl.CreateClient(mechanisms, "", "", "", props, this); Assert.IsNotNull(client); Assert.IsInstanceOfType(typeof(PlainSaslClient), client); }
public void ChoosesStrongerMechanism() { Hashtable props = new Hashtable(); string[] mechanisms = new string[] { "PLAIN", "OTHER", "CRAM-MD5" }; ISaslClient client = Sasl.CreateClient(mechanisms, "", "", "", props, this); Assert.IsNotNull(client); Assert.IsInstanceOfType(typeof(CramMD5SaslClient), client); }
public void ParsesConfigurationSection() { // if the TEST mechanism is available, then we know // the configuration section worked! Hashtable props = new Hashtable(); string[] mechanisms = new string[] { "TEST" }; ISaslClient client = Sasl.CreateClient(mechanisms, "", "", "", props, this); Assert.IsNotNull(client); Assert.IsInstanceOfType(typeof(TestSaslClient), client); }