예제 #1
0
        public async Task Should_generate_a_graph_of_the_message_flow()
        {
            var harness = new InMemoryTestHarness
            {
                TestTimeout           = TimeSpan.FromSeconds(2),
                TestInactivityTimeout = TimeSpan.FromSeconds(2)
            };

            harness.Consumer(() => new AFooConsumer());
            harness.Consumer(() => new BFooConsumer());
            harness.Consumer(() => new CFooConsumer());
            harness.Consumer(() => new DFooConsumer());
            harness.Consumer(() => new EFooConsumer());

            EndpointConvention.Map <EFoo>(harness.InputQueueAddress);

            await harness.Start();

            await harness.Bus.Publish <AFoo>(new { InVar.CorrelationId });

            await harness.Bus.Publish <BFoo>(new { InVar.CorrelationId });

            await harness.OutputTimeline(TestContext.Out, options => options.IncludeAddress());

            await harness.Stop();
        }