Exemple #1
0
        public void ValidationTest()
        {
            var pop3Settings = new Pop3Settings();

            Assert.AreEqual("The POP3 Server field is required.", pop3Settings.Validate("Pop3ServerPath"));
            Assert.AreEqual("The SMTP Server field is required.", pop3Settings.Validate("SmtpServerPath"));

            pop3Settings.Pop3ServerPath = "pop3.example.com";
            pop3Settings.SmtpServerPath = "smtp.example.com";

            Assert.AreEqual("", pop3Settings.Validate("Pop3ServerPath"));
            Assert.AreEqual("", pop3Settings.Validate("SmtpServerPath"));
        }
Exemple #2
0
        public override EmailAccountSettings Clone()
        {
            var clone = new Pop3Settings()
            {
                pop3UserCredits = pop3UserCredits.Clone(),
                smtpUserCredits = smtpUserCredits.Clone(),
                pop3ServerPath  = pop3ServerPath,
                smtpServerPath  = smtpServerPath
            };

            clone.Validate();
            return(clone);
        }