예제 #1
0
        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");
        }
예제 #2
0
        public void IsValid_GivenInvalidName_ShouldReturnFalse()
        {
            // Arrange
            var address = new RnMailAddress(TestEmail, "");

            // Act
            var isValid = address.IsValid();

            // Assert
            Assert.IsFalse(isValid, "Invalid Name");
        }
예제 #3
0
        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");
        }