refactor(rabbitmq)!: rename RabbitMqConfiguration to RabbitMqConnectionConfiguration
Rename the RabbitMQ options type to make its purpose explicit and update all consumers in the RabbitMQ, Infrastructure, Publisher, Client and test projects. Inline the connection factory registration in the DI extensions instead of the private AddDefaultServices helper. BREAKING CHANGE: RabbitMqConfiguration is now RabbitMqConnectionConfiguration.
This commit is contained in:
@@ -11,12 +11,12 @@ public sealed class EmailSenderUrlParsingTests
|
||||
{
|
||||
/// <summary>
|
||||
/// Applies the same URL-parsing logic used by the URL overload to a fresh
|
||||
/// <see cref="RabbitMqConfiguration"/> and returns it for assertion.
|
||||
/// <see cref="RabbitMqConnectionConfiguration"/> and returns it for assertion.
|
||||
/// </summary>
|
||||
private static RabbitMqConfiguration ParseUrl(string url, string username, string password)
|
||||
private static RabbitMqConnectionConfiguration ParseUrl(string url, string username, string password)
|
||||
{
|
||||
var uri = new Uri(url);
|
||||
var cfg = new RabbitMqConfiguration();
|
||||
var cfg = new RabbitMqConnectionConfiguration();
|
||||
|
||||
cfg.HostName = uri.Host;
|
||||
cfg.Port = uri.IsDefaultPort ? 5672 : uri.Port;
|
||||
@@ -95,7 +95,7 @@ public sealed class EmailSenderUrlParsingTests
|
||||
[Fact]
|
||||
public void ParseUrl_WithRootPath_DoesNotOverrideVirtualHost()
|
||||
{
|
||||
var defaultVHost = new RabbitMqConfiguration().VirtualHost;
|
||||
var defaultVHost = new RabbitMqConnectionConfiguration().VirtualHost;
|
||||
var cfg = ParseUrl("amqp://broker:5672/", "user", "pass");
|
||||
|
||||
Assert.Equal(defaultVHost, cfg.VirtualHost);
|
||||
@@ -104,7 +104,7 @@ public sealed class EmailSenderUrlParsingTests
|
||||
[Fact]
|
||||
public void ParseUrl_WithoutPath_DoesNotOverrideVirtualHost()
|
||||
{
|
||||
var defaultVHost = new RabbitMqConfiguration().VirtualHost;
|
||||
var defaultVHost = new RabbitMqConnectionConfiguration().VirtualHost;
|
||||
var cfg = ParseUrl("amqp://broker:5672", "user", "pass");
|
||||
|
||||
Assert.Equal(defaultVHost, cfg.VirtualHost);
|
||||
|
||||
Reference in New Issue
Block a user