示例#1
0
        public async Task Should_be_able_to_consume_event_and_route_to_handler()
        {
            var tokenSource = new CancellationTokenSource();

            await _eventConsumer.StartAsync(tokenSource.Token);

            await Task.Delay(100, tokenSource.Token);

            tokenSource.Cancel();

            Assert.That(MyEventHandler.HandledEvent, Is.Not.Null);
        }