public void CanEvaluateChallenge() { Hashtable props = new Hashtable(); ISaslClient client = new PlainSaslClient(AUTHID, props, this); Assert.IsFalse(client.IsComplete); byte[] response = client.EvaluateChallenge(new byte[0]); string[] parts = Encoding.UTF8.GetString(response).Split('\0'); Assert.AreEqual(3, parts.Length); Assert.AreEqual(AUTHID, parts[0]); Assert.AreEqual(USERNAME, parts[1]); Assert.AreEqual(PASSWORD, parts[2]); Assert.IsTrue(client.IsComplete); }
public void HasInitialResponseReturnsTrue() { ISaslClient client = new PlainSaslClient(AUTHID, new Hashtable(), this); Assert.IsTrue(client.HasInitialResponse); }
public void ReturnsRightMechanismName() { ISaslClient client = new PlainSaslClient(AUTHID, new Hashtable(), this); Assert.AreEqual("PLAIN", client.MechanismName); }