();
+
+ var subject = $"MessagingServiceHttpClient Integration Test {Guid.NewGuid():N}";
+ var command = CreateCommand(subject);
+
+ await Record.ExceptionAsync(() => client.SendAsync(command));
+
+ Assert.True(true, "Verify in mailbox.");
+ }
+
+ private static PublishEmailViaSmtpCommand CreateCommand(string subject)
+ {
+ return new PublishEmailViaSmtpCommand
{
- Sender = new GetEmailAccountQuery
- {
- Username = SenderAddress
- },
+ Sender = SenderAddress.ToSender(),
Recipients = [RecipientAddress],
Subject = subject,
Body = "Realistic test mail via MessagingServiceClient.
",
IsHtml = true
};
-
- await _client.SendAsync(command);
-
- Assert.True(true, "Verify in mailbox.");
}
private async Task FindMessageBySubjectAsync(string subject, int maxMessages = 100)