public void IsValid_GivenInvalidEmail_ShouldReturnFalse() { // Arrange var address = new RnMailAddress("fofpoo@fdfd"); // Act var valid = address.IsValid(); // Assert Assert.IsFalse(valid, "Email address is invalid"); }
public void IsValid_GivenInvalidName_ShouldReturnFalse() { // Arrange var address = new RnMailAddress(TestEmail, ""); // Act var isValid = address.IsValid(); // Assert Assert.IsFalse(isValid, "Invalid Name"); }
public void IsValid_GivenValidEmailAndName_ShouldSucceed() { // Arrange var address = new RnMailAddress(TestEmail, TestName); // Act var isValid = address.IsValid(); // Assert Assert.IsTrue(isValid, "Valid RnMailAddress information supplied"); }