public void send_records() { var message = new Message1(); var bus = new RecordingServiceBus(); bus.Send(message); bus.Sent.Single().ShouldBeTheSameAs(message); }
public void send_to_destination() { var destination = new Uri("memory://blah"); var message = new Message1(); var bus = new RecordingServiceBus(); bus.Send(destination, message); var sentTo = bus.SentDirectlyTo.Single(); sentTo.Destination.ShouldEqual(destination); sentTo.Message.ShouldBeTheSameAs(message); }