Example #1
0
        public void can_determine_if_a_message_is_handled()
        {
            var message = new FakeMessage();
            var handler = Mock <IRoutedMessageHandler>();

            handler.Expect(x => x.Initialize(node));
            handler.Expect(x => x.Handles(message)).Return(true);

            node.RegisterHandler(handler);

            bool result = node.Handles(message);

            result.ShouldBeTrue();
        }