public async Task Send_ReceivedInvoiceEmail_SuccessfullyAsync() { // Arrange var settings = new ReceivedInvoiceEmailSettings { DocumentId = 165292, ReportLanguage = Language.De, EmailBody = "Test ReceivedInvoice email.", EmailSubject = "ReceivedInvoice", SendToSelf = true, OtherRecipients = new List <string> { OtherEmail } }; // Act var response = await MailClient.ReceivedInvoiceEmail.SendAsync(settings); var result = response.AssertResult(); // Assert Assert.IsTrue(result.Sent.Contains(MyEmail)); Assert.IsTrue(!result.NotSent.Any()); }
public void Send_ReceivedInvoiceEmailWithoutRecipient_ThrowsValidationException(ReceivedInvoiceEmailSettings setting) { var exception = Assert.ThrowsAsync <ValidationException>(() => DokladApi.MailClient.ReceivedInvoiceEmail.SendAsync(setting)); AssertExceptionMessage(exception); }
/// <inheritdoc/> public Task <ApiResult <EmailSendResult> > SendAsync(ReceivedInvoiceEmailSettings settings, CancellationToken cancellationToken = default) { return(SendAsync <ReceivedInvoiceEmailSettings>(settings, cancellationToken)); }