コード例 #1
0
        public async Task Setup()
        {
            _harness = new RabbitMqTestHarness();
            _handler = _harness.Handler <A>();

            await _harness.Start();

            await _harness.InputQueueSendEndpoint.Send(new A());

            await _harness.InputQueueSendEndpoint.Send(new B());
        }
コード例 #2
0
        public async Task Setup()
        {
            _harness = new RabbitMqTestHarness();
            _handler = _harness.Handler <A>(async context =>
            {
                var endpoint = await context.GetSendEndpoint(context.SourceAddress);

                await endpoint.Send(new C());

                await context.Publish(new D());
            });

            await _harness.Start();

            await _harness.InputQueueSendEndpoint.Send(new A());

            await _harness.Bus.Publish(new B());
        }