Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        public async Task ShouldCallProviderAlertEmailServiceToSendEmails()
        {
            await _sur.RunProviderAlertSummaryNotification("JobId");

            _providerEmailService.Verify(m => m.SendAlertSummaryEmails("JobId"), Times.Once);
        }