Пример #1
0
        public async Task ItPassesTheEmailsToTheNotifyApi(string email)
        {
            UploadProcessedNotification notification = new UploadProcessedNotification
            {
                Email = email
            };

            await _classUnderTest.SendUploadProcessedNotification(notification, CancellationToken.None);

            NotifyRequest notifyRequest = _simulator.ReceivedRequests[0].BodyAs <NotifyRequest>();

            notifyRequest.email_address.Should().Be(email);
        }
Пример #2
0
        public async Task GivenNotSuccessful_SendsUploadFailureEmail(string email)
        {
            UploadProcessedNotification notification = new UploadProcessedNotification
            {
                Email = email,
                UploadSuccessfullyProcessed = false
            };

            await _classUnderTest.SendUploadProcessedNotification(notification, CancellationToken.None);

            NotifyRequest notifyRequest = _simulator.ReceivedRequests[0].BodyAs <NotifyRequest>();

            notifyRequest.template_id.Should().Be("3e4d2aea-4305-461f-84f8-584361169c36");
        }
Пример #3
0
        public async Task GivenSuccessful_SendsUploadSuccessfulEmail(string email)
        {
            UploadProcessedNotification notification = new UploadProcessedNotification
            {
                Email = email,
                UploadSuccessfullyProcessed = true
            };

            await _classUnderTest.SendUploadProcessedNotification(notification, CancellationToken.None);

            NotifyRequest notifyRequest = _simulator.ReceivedRequests[0].BodyAs <NotifyRequest>();

            notifyRequest.template_id.Should().Be("434e8133-b995-4363-a177-2bad0ea70773");
        }