();
}
///
- /// Sends an email through using the real RabbitMQ setup.
+ /// Sends an email through using the real RabbitMQ setup.
/// This test intentionally uses manual mailbox verification because the shared queue can be
/// consumed by other services during test execution.
///
@@ -57,16 +59,19 @@ public sealed class MessagingServiceClientTests : IAsyncDisposable
{
var subject = $"MessagingServiceClient Integration Test {Guid.NewGuid():N}";
- var email = new Email
+ var command = new PublishEmailViaSmtpCommand
{
- From = SenderAddress,
- To = [RecipientAddress],
+ Sender = new GetEmailAccountQuery
+ {
+ Username = SenderAddress
+ },
+ Recipients = [RecipientAddress],
Subject = subject,
Body = "Realistic test mail via MessagingServiceClient.
",
IsHtml = true
};
- await _client.SendAsync(email);
+ await _client.SendAsync(command);
Assert.True(true, "Verify in mailbox.");
}