Example #1
0
            public void should_route_any()
            {
                const string ProducerConfig =
                    @"<endpoints>
                            <endpoint name=""producer"" connectionString=""amqp://localhost/integration"" >
                                <dynamic outgoing=""true"" />
                            </endpoint>
                        </endpoints>";

                Mock <IDependencyResolver> dependencyResoverMock = new Mock <IDependencyResolver>();
                var section = new XmlEndpointsSection(ProducerConfig);
                var sut     = new AppConfigConfigurator(section, dependencyResoverMock.Object);

                using (var bus = new BusFactory().Create(cfg => sut.Configure("producer", cfg), false))
                {
                    Assert.IsTrue(bus.CanRoute(MessageLabel.Any), "Должна быть включена динамическая маршрутизация.");
                }
            }