public void message_of_grand_child_type_then_all_subscribed_handlers_of_parent_types_including_grand_child_handler_should_handle_message() { var parentHandler = new ParentTestHandler(); var childHandler = new ChildTestHandler(); var grandChildHandler = new GrandChildTestHandler(); Bus.Subscribe <ParentTestMessage>(parentHandler); Bus.Subscribe <ChildTestMessage>(childHandler); Bus.Subscribe <GrandChildTestMessage>(grandChildHandler); Bus.Publish(new GrandChildTestMessage()); Assert.That(parentHandler.HandledMessages.ContainsSingle <GrandChildTestMessage>() && childHandler.HandledMessages.ContainsSingle <GrandChildTestMessage>() && grandChildHandler.HandledMessages.ContainsSingle <GrandChildTestMessage>()); }
public void message_of_grand_child_type_then_all_subscribed_handlers_of_parent_types_including_grand_child_handler_should_handle_message() { var parentHandler = new ParentTestHandler(); var childHandler = new ChildTestHandler(); var grandChildHandler = new GrandChildTestHandler(); Bus.Subscribe<ParentTestMessage>(parentHandler); Bus.Subscribe<ChildTestMessage>(childHandler); Bus.Subscribe<GrandChildTestMessage>(grandChildHandler); Bus.Publish(new GrandChildTestMessage()); Assert.That(parentHandler.HandledMessages.ContainsSingle<GrandChildTestMessage>() && childHandler.HandledMessages.ContainsSingle<GrandChildTestMessage>() && grandChildHandler.HandledMessages.ContainsSingle<GrandChildTestMessage>()); }