public void send_and_wait()
        {
            var message = new Message1();
            var bus = new RecordingServiceBus();

            bus.SendAndWait(message).Wait();

            // Checking for messages sent
            bus.Sent.Single().ShouldBeTheSameAs(message);

            // Checking for awaited calls
            bus.Await.Single().ShouldBeTheSameAs(message);
        }
Beispiel #2
0
        public void send_to_destination_and_wait()
        {
            var destination = new Uri("memory://blah");
            var message     = new Message1();
            var bus         = new RecordingServiceBus();

            bus.SendAndWait(destination, message);

            var sentTo = bus.SentDirectlyTo.Single();

            sentTo.Destination.ShouldEqual(destination);
            sentTo.Message.ShouldBeTheSameAs(message);
        }
Beispiel #3
0
        public void send_and_wait()
        {
            var message = new Message1();
            var bus     = new RecordingServiceBus();

            bus.SendAndWait(message).Wait();

            // Checking for messages sent
            bus.Sent.Single().ShouldBeTheSameAs(message);

            // Checking for awaited calls
            bus.Await.Single().ShouldBeTheSameAs(message);
        }
        public void send_to_destination_and_wait()
        {
            var destination = new Uri("memory://blah");
            var message = new Message1();
            var bus = new RecordingServiceBus();

            bus.SendAndWait(destination, message);

            var sentTo = bus.SentDirectlyTo.Single();
            sentTo.Destination.ShouldEqual(destination);
            sentTo.Message.ShouldBeTheSameAs(message);
        }