Exemplo n.º 1
0
        private void MakeSureOneTaskSchedulerIsActive()
        {
            _messageDispatcher.LoadMessageHandlerInvokers();
            var handler = new SyncCommandHandlerWithOtherQueueName();

            _containerMock.Setup(x => x.GetInstance(typeof(SyncCommandHandlerWithOtherQueueName))).Returns(handler);
            Dispatch(new DispatchCommand());

            _taskSchedulerFactory.TaskSchedulers.Count.ShouldBeGreaterOrEqualThan(1);
        }
Exemplo n.º 2
0
        public void should_use_queue_name_from_namespace()
        {
            _messageDispatcher.LoadMessageHandlerInvokers();

            var handler = new SyncCommandHandlerWithOtherQueueName();

            _containerMock.Setup(x => x.GetInstance(typeof(SyncCommandHandlerWithOtherQueueName))).Returns(handler);

            Dispatch(new DispatchCommand());

            Wait.Until(() => handler.DispatchQueueName != null, 150.Milliseconds());

            var queueSource = new UseOtherQueue();

            handler.DispatchQueueName.ShouldEqual(queueSource.QueueName);
        }
        private void MakeSureOneTaskSchedulerIsActive()
        {
            _messageDispatcher.LoadMessageHandlerInvokers();
            var handler = new SyncCommandHandlerWithOtherQueueName();
            _containerMock.Setup(x => x.GetInstance(typeof(SyncCommandHandlerWithOtherQueueName))).Returns(handler);
            Dispatch(new DispatchCommand());

            _taskSchedulerFactory.TaskSchedulers.Count.ShouldBeGreaterOrEqualThan(1);
        }
        public void should_use_queue_name_from_namespace()
        {
            _messageDispatcher.LoadMessageHandlerInvokers();

            var handler = new SyncCommandHandlerWithOtherQueueName();
            _containerMock.Setup(x => x.GetInstance(typeof(SyncCommandHandlerWithOtherQueueName))).Returns(handler);

            Dispatch(new DispatchCommand());

            Wait.Until(() => handler.DispatchQueueName != null, 150.Milliseconds());

            var queueSource = new UseOtherQueue();
            handler.DispatchQueueName.ShouldEqual(queueSource.QueueName);
        }