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}>"); }
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}>"); }