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")); }
public void REmailAttributeNegative() { var result = new REmailAddressAttribute().Validate(() => new { Email = "bademail.com" }, "Email"); Assert.IsNotNull(result); }
public void REmailAttributePositive() { var result = new REmailAddressAttribute().Validate(() => new { Email = "*****@*****.**" }, "Email"); Assert.IsNull(result); }