Пример #1
0
        public void TearDown()
        {
            runtime.SafeDispose();

            // TODO - HAVE TO DISPOSE THE RUNTIME!!!!!!!
            FubuTransport.Reset();
        }
Пример #2
0
        public void SetUp()
        {
            FubuTransport.Reset();

            // Need to do something about this.  Little ridiculous
            var settings = new BusSettings
            {
                Downstream = "lq.tcp://localhost:2050/downstream".ToUri()
            };


            var container = new Container();

            container.Inject(settings);
            theClock = new SettableClock();
            container.Inject <ISystemTime>(theClock);

            _runtime = FubuTransport.For <DelayedRegistry>().StructureMap(container)
                       .Bootstrap();

            theServiceBus = _runtime.Factory.Get <IServiceBus>();
            //_runtime.Factory.Get<IPersistentQueues>().ClearAll();

            message1 = new OneMessage();
            message2 = new OneMessage();
            message3 = new OneMessage();
            message4 = new OneMessage();

            Debug.WriteLine("The current Utc time is " + theClock.UtcNow());

            theServiceBus.DelaySend(message1, theClock.UtcNow().AddHours(1));
            theServiceBus.DelaySend(message2, theClock.UtcNow().AddHours(1));
            theServiceBus.DelaySend(message3, theClock.UtcNow().AddHours(2));
            theServiceBus.DelaySend(message4, theClock.UtcNow().AddHours(2));
        }
        public void SetUp()
        {
            TestMessageRecorder.Clear();
            FubuTransport.Reset();

            // Need to do something about this.  Little ridiculous
            var settings = new BusSettings
            {
                Downstream = "lq.tcp://localhost:2040/downstream".ToUri()
            };
            var lightningUri = settings.Downstream.ToLightningUri();

            var container = new Container();

            container.Inject(settings);



            _runtime = FubuTransport.For <ErrorRegistry>().StructureMap(container)
                       .Bootstrap();
            //_runtime.Factory.Get<IPersistentQueues>().ClearAll();

            theServiceBus = _runtime.Factory.Get <IServiceBus>();

            _queueManager = _runtime.Factory.Get <IPersistentQueues>().ManagerFor(lightningUri.Port, true);

            message1 = new OneMessage();

            theServiceBus.Send(message1);
        }
Пример #4
0
        public void message_watching_is_defaulted_to_false()
        {
            FubuTransport.ApplyMessageHistoryWatching = true;
            FubuTransport.Reset();

            FubuTransport.ApplyMessageHistoryWatching.ShouldBeFalse();
        }
Пример #5
0
        public void use_in_memory_queues_is_defaulted_to_false()
        {
            FubuTransport.AllQueuesInMemory = true;
            FubuTransport.Reset();

            FubuTransport.AllQueuesInMemory.ShouldBeFalse();
        }
Пример #6
0
        public void synchronous_event_aggregation_is_defaulted_to_false()
        {
            FubuTransport.UseSynchronousLogging = true;
            FubuTransport.Reset();

            FubuTransport.UseSynchronousLogging.ShouldBeFalse();
        }
Пример #7
0
        public void run_all_in_memory()
        {
            // SAMPLE: FubuTransportInMemory
            FubuTransport.AllQueuesInMemory = true;
            // ENDSAMPLE

            // SAMPLE: FubuTransportClearInMemory
            FubuTransport.Reset();
            // ENDSAMPLE
        }
Пример #8
0
        public void is_not_registered_normally()
        {
            FubuTransport.Reset();

            var graph = FubuTransportRegistry.BehaviorGraphFor(x => { });

            graph.Services.ServicesFor <ITransport>()
            .Any(x => x.Type == typeof(InMemoryTransport))
            .ShouldBeFalse();
        }
Пример #9
0
        public void is_registered_if_user_opted_into_in_memory_transport()
        {
            FubuTransport.Reset();

            var graph = FubuTransportRegistry.BehaviorGraphFor(x => {
                x.AlterSettings <TransportSettings>(o => o.EnableInMemoryTransport = true);
            });

            graph.Services.ServicesFor <ITransport>()
            .Any(x => x.Type == typeof(InMemoryTransport))
            .ShouldBeTrue();
        }
Пример #10
0
        public void SetUp()
        {
            InMemoryQueueManager.ClearAll();
            FubuTransport.Reset();

            theSettings = new ConfiguredSettings
            {
                Upstream = "memory://foo".ToUri(),
                Outbound = "memory://bar".ToUri()
            };

            theContainer = new Container(x => {
                x.For <ConfiguredSettings>().Use(theSettings);
            });

            theRuntime = FubuTransport.For <ConfiguredFubuRegistry>().StructureMap(theContainer)
                         .Bootstrap();

            theGraph = theContainer.GetInstance <ChannelGraph>();
        }
Пример #11
0
 public void TearDown()
 {
     _runtime.Dispose();
     FubuTransport.Reset();
 }
 public void TearDown()
 {
     FubuTransport.Reset();
 }
 public void TearDown()
 {
     InMemoryQueueManager.ClearAll();
     FubuTransport.Reset();
     theRuntime.Dispose();
 }