示例#1
0
        public async Task TypeBasedRoutingAndExtensionMethodsAndEverythingWorksAsItShouldAlsoWhenTypeIsNotInferred()
        {
            await _client1.Bus.Subscribe<SomeKindOfEvent>();

            await Task.Delay(500);

            object someKindOfEvent = new SomeKindOfEvent();

            await _publisher.Bus.Publish(someKindOfEvent);

            _client1GotTheEvent.WaitOrDie(TimeSpan.FromSeconds(2), "Looks like the publish topic was not correctly inferred!");
        }
示例#2
0
        public async Task TypeBasedRoutingAndExtensionMethodsAndEverythingWorksAsItShouldAlsoWhenTypeIsNotInferred()
        {
            await _client1.Bus.Subscribe <SomeKindOfEvent>();

            await Task.Delay(500);

            object someKindOfEvent = new SomeKindOfEvent();

            await _publisher.Bus.Publish(someKindOfEvent);

            _client1GotTheEvent.WaitOrDie(TimeSpan.FromSeconds(2), "Looks like the publish topic was not correctly inferred!");
        }