Commit Graph

3 Commits

Author SHA1 Message Date
3e86d4cfe2 feat(client)!: unify client API around IMessagingServiceClient
MessagingServiceClient now implements IMessagingServiceClient and takes a PublishEmailViaSmtpCommand instead of the removed Email record. Add MessagingServiceHttpClient, which posts the same command to the API via IHttpClientFactory.

Replace DependencyInjectionExtensions with a single DependencyInjection entry point that registers exactly one client implementation and throws when a second one is added. It exposes AddMessagingServiceClient for RabbitMQ and AddMessagingServiceHttpClient for the HTTP API, both with an optional license key.

Bump the package to 2.0.0 because the SendAsync signatures and the removed Email type are breaking changes, add Microsoft.Extensions.Http, and update the integration test to exercise the new contract.
2026-11-05 09:45:11 +01:00
a7d8b3412b Simplify email test verification
Updated the `SendAsync_WithDependencyInjectionAndRealBroker_PublishesExpectedMessage` test in `MessagingServiceClientTests.cs` to use manual mailbox verification. Added XML documentation to explain the change due to potential shared queue consumption by other services. Simplified the test by removing detailed assertions and replacing them with a placeholder assertion to verify manually.
2026-11-04 15:26:59 +01:00
888f01ea95 Add integration tests for MessagingServiceClient
Introduce `MessagingServiceClientTests` to test email sending
via RabbitMQ with dependency injection. Implement methods to
load configuration, manage RabbitMQ messages, and ensure
proper resource disposal. Include an in-memory email account
repository for testing purposes.
2026-11-04 15:09:51 +01:00