Ejemplo n.º 1
0
        public async Task GivenNotifyPickMessageWhenVariousEmailThenEmailsAreSent(string testEmailAddress)
        {
            // Arrange
            var sut          = new SendGridNotifyPickIsAvalable(_sendGridApiKey);
            var content      = CreateTestEmailMessage(testEmailAddress);
            var testEnvelope = new Envelope(content);
            // Act
            var actual = await sut.Notify(testEnvelope);

            // Assert
            Assert.True(actual.IsSuccess(), $"Expected email to send but it failed. <{actual.Message}>");
        }
Ejemplo n.º 2
0
        public async Task GivenNotifyPickMessageWhenGmailIsUsedThenEmailIsSent()
        {
            // Arrange
            var sut          = new SendGridNotifyPickIsAvalable(_sendGridApiKey);
            var content      = CreateTestEmailMessage("*****@*****.**");
            var testEnvelope = new Envelope(content);
            // Act
            var actual = await sut.Notify(testEnvelope);

            // Assert
            Assert.True(actual.IsSuccess(), $"Expected email to send but it failed. <{actual.Message}>");
        }