public void TestThatIsMailAddressReturnsFalseForInvalidMailAddress(string validMailAddress) { IDomainObjectValidations sut = new DomainObjectValidations(); Assert.That(sut, Is.Not.Null); bool result = sut.IsMailAddress(validMailAddress); Assert.That(result, Is.False); }
public void TestThatIsMailAddressThrowsArgumentNullExceptionWhenMailAddressIsNullEmptyOrWhiteSpace(string validMailAddress) { IDomainObjectValidations sut = new DomainObjectValidations(); Assert.That(sut, Is.Not.Null); ArgumentNullException result = Assert.Throws <ArgumentNullException>(() => sut.IsMailAddress(validMailAddress)); TestHelper.AssertArgumentNullExceptionIsValid(result, "value"); }