protected override void ConfigureBus(IInMemoryBusFactoryConfigurator configurator)
        {
            SetupActivities();

            var factoryConfigurator = new BusFactoryConfigurator(configurator);

            foreach (ActivityTestContext activityTestContext in ActivityTestContexts.Values)
            {
                activityTestContext.Configure(factoryConfigurator);
            }
        }
Пример #2
0
        protected override void ConfigureBusHost(IRabbitMqBusFactoryConfigurator configurator, IRabbitMqHost host)
        {
            base.ConfigureBusHost(configurator, host);

            SetupActivities();

            var factoryConfigurator = new BusFactoryConfigurator(host, configurator);

            foreach (var activityTestContext in ActivityTestContexts.Values)
            {
                activityTestContext.Configure(factoryConfigurator);
            }
        }
Пример #3
0
        protected override void ConfigureInMemoryBus(IInMemoryBusFactoryConfigurator configurator)
        {
            AddCommandContext <DispatchMessageConsumer, DispatchMessage>(new DelegateConsumerFactory <DispatchMessageConsumer>(() =>
            {
                var agent = new MessageDispatchAgent();

                return(new DispatchMessageConsumer(agent));
            }));

            SetupCommands();

            var factoryConfigurator = new BusFactoryConfigurator(configurator);

            foreach (DispatchTestContext dispatchTestContext in CommandTestContexts.Values)
            {
                dispatchTestContext.Configure(factoryConfigurator);
            }
        }