public async Task ShouldNotCallProviderAlertEmailServiceToSendEmailsWhenConfigSendEmailIsFalse() { _sur = new NotificationJob( _mockEmailService.Object, _providerEmailService.Object, _sendingEmployerTransferRequestEmailService.Object, _mockNotificationApi.Object, Mock.Of <ILog>(), new CommitmentNotificationConfiguration { SendEmail = false }); await _sur.RunProviderAlertSummaryNotification("JobId"); _providerEmailService.Verify(m => m.SendAlertSummaryEmails(It.IsAny <string>()), Times.Never); }
public async Task ShouldCallProviderAlertEmailServiceToSendEmails() { await _sur.RunProviderAlertSummaryNotification("JobId"); _providerEmailService.Verify(m => m.SendAlertSummaryEmails("JobId"), Times.Once); }