public void RubberStamp_Conditions_IsValidEmailFormatCondition_Valid_Email_With_Dot_After_Name_Test()
        {
            var condition = new IsValidEmailFormatCondition <TestClass, string>(p => p.Email);

            Assert.IsTrue(condition.IsValid(new TestClass {
                Email = "*****@*****.**"
            }));
        }
        public void RubberStamp_Conditions_IsValidEmailFormatCondition_Valid_Email_With_Number_Test()
        {
            var condition = new IsValidEmailFormatCondition <TestClass, string>(p => p.Email);

            Assert.IsTrue(condition.IsValid(new TestClass {
                Email = "[email protected]"
            }));
        }
        public void RubberStamp_Conditions_IsValidEmailFormatCondition_Valid_Email_With_MUlti_Dot_Test()
        {
            var condition = new IsValidEmailFormatCondition <TestClass, string>(p => p.Email);

            Assert.IsTrue(condition.IsValid(new TestClass {
                Email = "*****@*****.**"
            }));
        }
        public void RubberStamp_Conditions_IsValidEmailFormatCondition_Valid_Email_With_Special_Character_In_Name_Test()
        {
            var condition = new IsValidEmailFormatCondition <TestClass, string>(p => p.Email);

            Assert.IsTrue(condition.IsValid(new TestClass {
                Email = "*****@*****.**"
            }));
        }
        public void RubberStamp_Conditions_IsValidEmailFormatCondition_InValid_Email_Without_Sign_Test()
        {
            var condition = new IsValidEmailFormatCondition <TestClass, string>(p => p.Email);

            Assert.IsFalse(condition.IsValid(new TestClass {
                Email = "email.example.com"
            }));
        }
        public void RubberStamp_Conditions_IsValidEmailFormatCondition_InValid_Email_With_Special_Characters_Test()
        {
            var condition = new IsValidEmailFormatCondition <TestClass, string>(p => p.Email);

            Assert.IsFalse(condition.IsValid(new TestClass {
                Email = "#@%^%#$@#$@#.com"
            }));
        }
        public void RubberStamp_Conditions_IsValidEmailFormatCondition_InValid_Email_Without_Domain_Test()
        {
            var condition = new IsValidEmailFormatCondition <TestClass, string>(p => p.Email);

            Assert.IsFalse(condition.IsValid(new TestClass {
                Email = "PlainAddress"
            }));
        }
        public void RubberStamp_Conditions_IsValidEmailFormatCondition_InValid_Email_With_Domain_Without_Dot_Test()
        {
            var condition = new IsValidEmailFormatCondition <TestClass, string>(p => p.Email);

            Assert.IsFalse(condition.IsValid(new TestClass {
                Email = "JoeSmith@localhost"
            }));
        }
        public void RubberStamp_Conditions_IsValidEmailFormatCondition_Invalid_Email_With_SpecialCharacters_Test()
        {
            var condition = new IsValidEmailFormatCondition <TestClass, string>(p => p.Email);

            Assert.IsFalse(condition.IsValid(new TestClass {
                Email = "!#$%&'*+-/=?^_`{|}~\"(),:;<>@[\\]@example.org"
            }));
        }
        public void RubberStamp_Conditions_IsValidEmailFormatCondition_Valid_Email_With_Long_Name_Test()
        {
            var email = new StringBuilder();

            while (email.Length <= 255)
            {
                email.Append('x');
            }

            email.Append("@example.com");

            var condition = new IsValidEmailFormatCondition <TestClass, string>(p => p.Email);

            Assert.IsTrue(condition.IsValid(new TestClass {
                Email = email.ToString()
            }));
        }