Inheritance: Waf.InformationManager.Common.Domain.ValidationModel
Exemplo n.º 1
0
 public Pop3Settings()
 {
     pop3UserCredits = new UserCredits();
     smtpUserCredits = new UserCredits();
     pop3UserCredits.Validate();
     smtpUserCredits.Validate();
 }
Exemplo n.º 2
0
        public void ValidationTest()
        {
            UserCredits userCredits = new UserCredits();
            Assert.AreEqual("The Username field is required.", userCredits.Validate("UserName"));

            userCredits.UserName = "******";
            Assert.AreEqual("", userCredits.Validate("UserName"));
        }
Exemplo n.º 3
0
        public void CloneTest()
        {
            UserCredits userCredits = new UserCredits() { UserName = "******", Password = "******" };
            UserCredits clone = userCredits.Clone();

            Assert.AreNotEqual(userCredits, clone);
            Assert.AreEqual(userCredits.UserName, clone.UserName);
            Assert.AreEqual(userCredits.Password, clone.Password);
        }
Exemplo n.º 4
0
        public void PropertiesTest()
        {
            UserCredits userCredits = new UserCredits();

            AssertHelper.PropertyChangedEvent(userCredits, x => x.UserName, () => userCredits.UserName = "******");
            Assert.AreEqual("bill", userCredits.UserName);

            AssertHelper.PropertyChangedEvent(userCredits, x => x.Password, () => userCredits.Password = "******");
            Assert.AreEqual("secret", userCredits.Password);
        }
Exemplo n.º 5
0
        public virtual UserCredits Clone()
        {
            var clone = new UserCredits()
            {
                userName = userName, password = password
            };

            clone.Validate();
            return(clone);
        }
Exemplo n.º 6
0
 public Pop3Settings()
 {
     pop3UserCredits = new UserCredits();
     smtpUserCredits = new UserCredits();
 }
Exemplo n.º 7
0
 public Pop3Settings()
 {
     pop3UserCredits = new UserCredits();
     smtpUserCredits = new UserCredits();
 }