public Send_a_single_message_to_the_correct_node()
        {
            Website1.Registry.Channel(x => x.Service1)
            .AcceptsMessage <OneMessage>();

            Service1.Handles <OneMessage>();

            Service2.Handles <OneMessage>();
            Service3.Handles <OneMessage>();

            Website1.Sends <OneMessage>("first message").ShouldBeReceivedBy(Service1);
        }
예제 #2
0
        public Send_a_single_message_to_multiple_listening_nodes()
        {
            Website1.Registry.Channel(x => x.Service1)
            .AcceptsMessage <OneMessage>();

            Website1.Registry.Channel(x => x.Service3)
            .AcceptsMessage <OneMessage>();


            Service1.Handles <OneMessage>();
            Service2.Handles <OneMessage>();
            Service3.Handles <OneMessage>();
            Service4.Handles <OneMessage>();

            Website1.Sends <OneMessage>("first message")
            .ShouldBeReceivedBy(Service1)
            .ShouldBeReceivedBy(Service3);
        }