Exemple #1
0
        public void HasFromAddress_ReturnsFalse_WhenFromRecipientIsNull()
        {
            //Arrange
            var message = new BasicMessage {
                From = null
            };
            var validator = new SendValidator();

            //Act
            var actual = validator.HasFromAddress(message);

            //Assert
            Assert.IsFalse(actual);
        }
Exemple #2
0
        public void HasFromAddress_ReturnsTrue_WhenFromRecipientIsNotEmpty()
        {
            //Arrange
            var message = new BasicMessage
            {
                From = new EmailAddress(RandomHelper.RandomEmail())
            };
            var validator = new SendValidator();

            //Act
            var actual = validator.HasFromAddress(message);

            //Assert
            Assert.IsTrue(actual);
        }