public void Should_be_able_to_set_whether_send_via_receive_queue_should_be_used()
        {
            var settings   = new SettingsHolder();
            var extensions = new TransportExtensions <AzureServiceBusTransport>(settings);

            extensions.SendViaReceiveQueue(false);

            Assert.AreEqual(false, settings.Get <bool>(WellKnownConfigurationKeys.Connectivity.SendViaReceiveQueue));
        }
Пример #2
0
        public void SetUp()
        {
            tokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(60));
            completed   = new AsyncManualResetEvent(false);
            container   = new TransportPartsContainer();
            var settings = new SettingsHolder();

            settings.Set("NServiceBus.SharedQueue", SourceQueueName);
            criticalError = new CriticalError(ctx => TaskEx.Completed);

            var extensions = new TransportExtensions <AzureServiceBusTransport>(settings);

            extensions.SendViaReceiveQueue(true);

            SetupAsync(container, settings).GetAwaiter().GetResult();

            dispatcher = (IDispatchMessages)container.Resolve(typeof(IDispatchMessages));

            timeToWaitBeforeTriggeringTheCircuitBreaker = TimeSpan.FromSeconds(5);
            pump = new MessagePump(topology, container, settings, timeToWaitBeforeTriggeringTheCircuitBreaker);
        }