public void TestContainsAllArguments() { var capa = new PopCapability("sasl", "cram-md5", "plain"); Assert.IsTrue(capa.ContainsAllArguments()); Assert.IsTrue(capa.ContainsAllArguments("cram-md5")); Assert.IsTrue(capa.ContainsAllArguments("plain")); Assert.IsTrue(capa.ContainsAllArguments("cram-md5", "plain")); Assert.IsTrue(capa.ContainsAllArguments("plain", "cram-md5")); Assert.IsFalse(capa.ContainsAllArguments("digest-md5")); }
public void TestOpExplicit() { var capa = new PopCapability("TOP"); Assert.AreEqual("TOP", (string)capa); Assert.AreEqual(capa.ToString(), (string)capa); capa = null; Assert.IsNull((string)capa); }
public PopIncapableException(string message, PopCapability requiredCapability) : base(message) { this.requiredCapability = requiredCapability; }
public PopIncapableException(PopCapability requiredCapability) : this(string.Format("{0} is incapable", requiredCapability), requiredCapability) { }
public PopAuthenticationMechanism(string mechanismName, PopCapability requiredCapability) : base(mechanismName) { if (mechanismName.Length == 0) throw new ArgumentException("invalid name", "mechanismName"); this.RequiredCapability = requiredCapability; }