Beispiel #1
0
        public void HasMessageBody_ReturnsTrue_WhenApiTemplateIsNotEmptyAndPlainTextBodyAndHtmlBodyIsEmpty()
        {
            //Arrange
            var message = new BasicMessage
            {
                HtmlBody      = string.Empty,
                PlainTextBody = string.Empty,
                ApiTemplate   = RandomHelper.RandomInt()
            };
            var validator = new SendValidator();

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

            //Assert
            Assert.IsTrue(actual);
        }
Beispiel #2
0
        public void HasMessageBody_ReturnsFalse_WhenHtmlBodyAndPlainTextBodyAndApiTemplateIsEmpty()
        {
            //Arrange
            var message = new BasicMessage
            {
                HtmlBody      = string.Empty,
                PlainTextBody = string.Empty,
                ApiTemplate   = null
            };
            var validator = new SendValidator();

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

            //Assert
            Assert.IsFalse(actual);
        }