public void Should_be_able_to_set_sender() { var configurator = new TransportMessageConfigurator(this); var configuration = new ServiceBusConfiguration { Inbox = new InboxQueueConfiguration { WorkQueue = new NullQueue("null-queue://./work-queue") } }; Assert.AreEqual("null-queue://./work-queue", configurator.TransportMessage(configuration).SenderInboxWorkQueueUri); configurator.WithSender("null-queue://./another-queue"); Assert.AreEqual("null-queue://./another-queue", configurator.TransportMessage(configuration).SenderInboxWorkQueueUri); }
public void Should_be_able_to_set_sender() { var identityProvider = new Mock <IIdentityProvider>(); var configurator = new TransportMessageConfigurator(this); var configuration = new ServiceBusConfiguration { Inbox = new InboxQueueConfiguration { WorkQueue = new NullQueue("null-queue://./work-queue") } }; identityProvider.Setup(m => m.Get()).Returns(WindowsIdentity.GetCurrent()); Assert.AreEqual("null-queue://./work-queue", configurator.TransportMessage(configuration, identityProvider.Object).SenderInboxWorkQueueUri); configurator.WithSender("null-queue://./another-queue"); Assert.AreEqual("null-queue://./another-queue", configurator.TransportMessage(configuration, identityProvider.Object).SenderInboxWorkQueueUri); }
public void Should_be_able_to_set_sender() { var identityProvider = new Mock <IIdentityProvider>(); var configurator = new TransportMessageConfigurator(this); var configuration = new ServiceBusConfiguration { Inbox = new InboxQueueConfiguration { WorkQueue = new NullQueue("null-queue://./work-queue") } }; identityProvider.Setup(m => m.Get()).Returns(new GenericIdentity(Environment.UserDomainName + "\\" + Environment.UserName, "Anonymous")); Assert.AreEqual("null-queue://./work-queue", configurator.TransportMessage(configuration, identityProvider.Object).SenderInboxWorkQueueUri); configurator.WithSender("null-queue://./another-queue"); Assert.AreEqual("null-queue://./another-queue", configurator.TransportMessage(configuration, identityProvider.Object).SenderInboxWorkQueueUri); }