public void CanEvaluateChallenge()
        {
            Hashtable props = new Hashtable();

            ISaslClient client = new CramMD5SaslClient(AUTHID, props, this);

            Assert.IsFalse(client.IsComplete);

            byte[] challenge =
                Encoding.UTF8.GetBytes("<*****@*****.**>");
            byte[]   response = client.EvaluateChallenge(challenge);
            string[] parts    = Encoding.UTF8.GetString(response).Split(' ');

            Assert.AreEqual(2, parts.Length);
            Assert.AreEqual(USERNAME, parts[0]);
            Assert.AreEqual("b913a602c7eda7a495b4e6e7334d3890", parts[1]);
            Assert.IsTrue(client.IsComplete);
        }
        public void HasInitialResponseReturnsFalse()
        {
            ISaslClient client = new CramMD5SaslClient(AUTHID, new Hashtable(), this);

            Assert.IsFalse(client.HasInitialResponse);
        }
        public void ReturnsRightMechanismName()
        {
            ISaslClient client = new CramMD5SaslClient(AUTHID, new Hashtable(), this);

            Assert.AreEqual("CRAM-MD5", client.MechanismName);
        }