From bf06533851ac678cacabcbeb5dffebe3f6c16b4f Mon Sep 17 00:00:00 2001 From: Tomek Masternak Date: Thu, 31 Oct 2024 11:47:25 +0100 Subject: [PATCH] repro --- ...cial_characters_configured_for_endpoint.cs | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/NServiceBus.Transport.SqlServer.AcceptanceTests/MultiCatalog/When_catalog_with_special_characters_configured_for_endpoint.cs 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 new file mode 100644 index 000000000..22d3bae4d --- /dev/null +++ b/src/NServiceBus.Transport.SqlServer.AcceptanceTests/MultiCatalog/When_catalog_with_special_characters_configured_for_endpoint.cs @@ -0,0 +1,50 @@ +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 + { + static string EndpointConnectionString => WithCustomCatalog(GetDefaultConnectionString(), "n service.bus&*#"); + + [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(); + + Assert.Pass(); + } + + public class AnEndpoint : EndpointConfigurationBuilder + { + public AnEndpoint() => + EndpointSetup(new CustomizedServer(EndpointConnectionString), (c, sd) => + { + }); + + + class Handler(Context scenarioContext) : IHandleMessages + { + public Task Handle(Message message, IMessageHandlerContext context) + { + scenarioContext.MessageReceived = true; + + return Task.FromResult(0); + } + } + } + + public class Message : ICommand + { + } + + class Context : ScenarioContext + { + public bool MessageReceived { get; set; } + } + } +} \ No newline at end of file