Example #1
0
        public void REmailAttributeDisplayValueCorrect()
        {
            var result = new REmailAddressAttribute().Validate(() => new { Email = "bademail.com" }, "Email", "E-mail");

            Assert.IsNotNull(result);
            Assert.IsTrue(result.ErrorMessage.Contains("E-mail"));
        }
Example #2
0
        public void REmailAttributeNegative()
        {
            var result = new REmailAddressAttribute().Validate(() => new { Email = "bademail.com" }, "Email");

            Assert.IsNotNull(result);
        }
Example #3
0
        public void REmailAttributePositive()
        {
            var result = new REmailAddressAttribute().Validate(() => new { Email = "*****@*****.**" }, "Email");

            Assert.IsNull(result);
        }