public void ConfigurationTest()
        {
            var cfg = new RoutingConfigurator();

            cfg.Route<PingMessage>().To(_address);
            cfg.Route<PongMessage>().To(_address);


            IBusService c = cfg.Create(_bus, _builder);

            PipelineViewer.Trace(_pipeline);

            c.Start(_bus);

            PipelineViewer.Trace(_pipeline);

            c.Stop();

            PipelineViewer.Trace(_pipeline);
        }
Exemple #2
0
        public void ConfigurationTest()
        {
            var cfg = new RoutingConfigurator();

            cfg.Route <PingMessage>().To(_address);
            cfg.Route <PongMessage>().To(_address);


            IBusService c = cfg.Create(_bus, _builder);

            PipelineViewer.Trace(_pipeline);

            c.Start(_bus);

            PipelineViewer.Trace(_pipeline);

            c.Stop();

            PipelineViewer.Trace(_pipeline);
        }
		public void Should_create_outbound_sink_for_route()
		{
			Uri address = new Uri("loopback://localhost/test_target");

			var configurator = new RoutingConfigurator();

			configurator.Route<PingMessage>().To(address);
			configurator.Route<PongMessage>().To(address);

			IBusService busService = configurator.Create(LocalBus);
			busService.Start(LocalBus);

			LocalBus.ShouldHaveRemoteSubscriptionFor<PingMessage>();
			LocalBus.ShouldHaveRemoteSubscriptionFor<PongMessage>();

			busService.Stop();

			LocalBus.ShouldNotHaveSubscriptionFor<PingMessage>();

			busService.Dispose();
		}
        public void Should_create_outbound_sink_for_route()
        {
            var address = new Uri("loopback://localhost/test_target");

            var configurator = new RoutingConfigurator();

            configurator.Route <PingMessage>().To(address);
            configurator.Route <PongMessage>().To(address);

            IBusService busService = configurator.Create(LocalBus);

            busService.Start(LocalBus);

            LocalBus.ShouldHaveRemoteSubscriptionFor <PingMessage>();
            LocalBus.ShouldHaveRemoteSubscriptionFor <PongMessage>();

            busService.Stop();

            LocalBus.ShouldNotHaveSubscriptionFor <PingMessage>();

            busService.Dispose();
        }