public void Bootstrap_throws_when_two_handlers_for_same_command_registered() { // given var builder = new BusRegistryBuilder(typeof(InvalidCommandHandler1), typeof(InvalidCommandHandler2)); // when/then Assert.Throws <InvalidOperationException>(() => builder.Bootstrap()); }
public void Bootstrap_throws_when_query_handler_returns_task_of_wrong_type() { // given var builder = new BusRegistryBuilder(typeof(InvalidQueryHandler1)); // when/then Assert.Throws <Exception>(() => builder.Bootstrap()); }
public void Bootstrap_throws_when_multi_event_handler_has_wrong_type_as_an_argument() { // given var builder = new BusRegistryBuilder(typeof(InvalidMultiEventHandler)); // when/then Assert.Throws <Exception>(() => builder.Bootstrap()); }
public void Bootstrap_throws_when_query_handler_has_not_generic_task_as_return_type() { // given var builder = new BusRegistryBuilder(typeof(InvalidQueryHandler2)); // when/then Assert.Throws <Exception>(() => builder.Bootstrap()); }
public void Bootstrap_throws_when_command_handler_has_wrong_return_type() { // given var builder = new BusRegistryBuilder(typeof(InvalidCommandHandler3)); // when/then Assert.Throws <Exception>(() => builder.Bootstrap()); }