public void send_now_is_handled_right_now() { using (var runtime = FubuRuntime.For <FubuRegistry>(x => { x.ServiceBus.Enable(true); x.ServiceBus.EnableInMemoryTransport(); x.Handlers.DisableDefaultHandlerSource(); x.Handlers.Include <SimpleHandler <OneMessage> >(); })) { var serviceBus = runtime.Get <IServiceBus>(); TestMessageRecorder.Clear(); var message = new OneMessage(); serviceBus.Consume(message); TestMessageRecorder.ProcessedFor <OneMessage>().Single().Message .ShouldBeTheSameAs(message); } }
public void send_now_is_handled_right_now() { using (var container = new Container()) { using (var runtime = FubuTransport.For(x => { x.EnableInMemoryTransport(); x.Handlers.DisableDefaultHandlerSource(); x.Handlers.Include <SimpleHandler <OneMessage> >(); }).StructureMap(container).Bootstrap()) { var serviceBus = container.GetInstance <IServiceBus>(); TestMessageRecorder.Clear(); var message = new OneMessage(); serviceBus.Consume(message); TestMessageRecorder.ProcessedFor <OneMessage>().Single().Message .ShouldBeTheSameAs(message); } } }