public void ShoudSendEmail() { var request = new EmailRequest { ToEmail = TestToEmail, Tokens = TokenGenerator.CreateActivationEmailTokens(), MessageType = MessageTypes.SendActivationCode }; _dispatcher.SendEmail(request); _logServiceMock.Verify(l => l.Error(It.IsAny <string>(), It.IsAny <Exception>()), Times.Never); }
public void ShouldSendPasswordResetConfirmationEmail() { var request = new EmailRequest { ToEmail = TestToEmail, Tokens = TokenGenerator.CreatePasswordResetConfirmationTokens(), MessageType = MessageTypes.PasswordChanged }; _dispatcher.SendEmail(request); _logServiceMock.Verify(l => l.Error(It.IsAny <string>(), It.IsAny <Exception>()), Times.Never); }
public void ShouldSendDailyDigestEmail() { var request = new EmailRequest { ToEmail = TestToEmail, Tokens = TokenGenerator.CreateVacanciesAboutToExpireTokens(4), MessageType = MessageTypes.DailyDigest }; _dispatcher.SendEmail(request); _logServiceMock.Verify(l => l.Error(It.IsAny <string>(), It.IsAny <Exception>()), Times.Never); }
public void ShouldSendTraineeshipApplicationSubmittedEmail() { var request = new EmailRequest { ToEmail = TestToEmail, Tokens = TokenGenerator.CreateTraineeshipApplicationSubmittedTokens(), MessageType = MessageTypes.TraineeshipApplicationSubmitted }; _dispatcher.SendEmail(request); _logServiceMock.Verify(l => l.Error(It.IsAny <string>(), It.IsAny <Exception>()), Times.Never); }
public void ShoudSendEmailWithSubjectInTemplate() { // NOTE: Subject is not set and is defined in SendGrid email template. var request = new EmailRequest { ToEmail = TestToEmail, Tokens = TokenGenerator.CreateActivationEmailTokens(), MessageType = MessageTypes.SendActivationCode }; _dispatcher.SendEmail(request); _logServiceMock.Verify(l => l.Error(It.IsAny <string>(), It.IsAny <Exception>()), Times.Never); }