コード例 #1
0
        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);
        }
コード例 #2
0
        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");
        }