예제 #1
0
        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"));
        }
예제 #2
0
        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);
        }
예제 #3
0
 public PopIncapableException(string message, PopCapability requiredCapability)
     : base(message)
 {
     this.requiredCapability = requiredCapability;
 }
예제 #4
0
 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;
        }