Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
        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);
        }
Ejemplo n.º 7
0
        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);
        }