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

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

            // Assert
            Assert.IsFalse(isValid, "Invalid Name");
        }
Esempio n. 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");
        }