diff --git a/src/NServiceBus.Transport.SqlServer.AcceptanceTests/MultiCatalog/When_catalog_with_special_characters_configured_for_endpoint.cs b/src/NServiceBus.Transport.SqlServer.AcceptanceTests/MultiCatalog/When_catalog_with_special_characters_configured_for_endpoint.cs index d3f998500..e4c20b415 100644 --- a/src/NServiceBus.Transport.SqlServer.AcceptanceTests/MultiCatalog/When_catalog_with_special_characters_configured_for_endpoint.cs +++ b/src/NServiceBus.Transport.SqlServer.AcceptanceTests/MultiCatalog/When_catalog_with_special_characters_configured_for_endpoint.cs @@ -1,46 +1,54 @@ -namespace NServiceBus.Transport.SqlServer.AcceptanceTests.MultiCatalog; - -using System.Threading.Tasks; -using AcceptanceTesting; -using NUnit.Framework; - -public class When_catalog_with_special_characters_configured_for_endpoint : MultiCatalogAcceptanceTest +namespace NServiceBus.Transport.SqlServer.AcceptanceTests.MultiCatalog { - static string EndpointConnectionString => WithCustomCatalog(GetDefaultConnectionString(), "n service.bus&#"); + using System.Threading.Tasks; + using AcceptanceTesting; + using NUnit.Framework; - [Test] - public async Task Should_be_able_to_send_messages_to_the_endpoint() + public class When_catalog_with_special_characters_configured_for_endpoint : MultiCatalogAcceptanceTest { - await Scenario.Define() - .WithEndpoint(c => c.When(s => s.SendLocal(new Message()))) - .Done(c => c.MessageReceived) - .Run(); + static string EndpointConnectionString => WithCustomCatalog(GetDefaultConnectionString(), "n service.bus&#"); - Assert.Pass(); - } + [Test] + public async Task Should_be_able_to_send_messages_to_the_endpoint() + { + await Scenario.Define() + .WithEndpoint(c => c.When(s => s.SendLocal(new Message()))) + .Done(c => c.MessageReceived) + .Run(); - public class AnEndpoint : EndpointConfigurationBuilder - { - public AnEndpoint() => - EndpointSetup(new CustomizedServer(EndpointConnectionString), (_, _) => { }); + Assert.Pass(); + } - class Handler(Context scenarioContext) : IHandleMessages + public class AnEndpoint : EndpointConfigurationBuilder { - public Task Handle(Message message, IMessageHandlerContext context) + public AnEndpoint() => + EndpointSetup(new CustomizedServer(EndpointConnectionString), (_, __) => { }); + + class Handler : IHandleMessages { - scenarioContext.MessageReceived = true; + public Handler(Context scenarioContext) + { + ScenarioContext = scenarioContext; + } + + public Task Handle(Message message, IMessageHandlerContext context) + { + ScenarioContext.MessageReceived = true; + + return Task.FromResult(0); + } - return Task.FromResult(0); + Context ScenarioContext; } } - } - public class Message : ICommand - { - } + public class Message : ICommand + { + } - class Context : ScenarioContext - { - public bool MessageReceived { get; set; } + class Context : ScenarioContext + { + public bool MessageReceived { get; set; } + } } } \ No newline at end of file