public void can_find_chain_for_input_type() { var graph = FubuTransportRegistry.HandlerGraphFor(x => { x.Handlers.Include <OneHandler>(); x.Handlers.Include <TwoHandler>(); x.Handlers.DisableDefaultHandlerSource(); }); var invoker = new ChainInvoker(null, graph, null, null, null, null); invoker.FindChain(new Envelope { Message = new OneMessage() }) .OfType <HandlerCall>().Single() .HandlerType.ShouldEqual(typeof(OneHandler)); }
public void can_find_chain_for_input_type() { using (var runtime = FubuRuntime.BasicBus(x => { x.Handlers.Include <OneHandler>(); x.Handlers.Include <TwoHandler>(); x.Handlers.DisableDefaultHandlerSource(); })) { var graph = runtime.Behaviors; var invoker = new ChainInvoker(null, new ChainResolutionCache(graph), null, null, null); invoker.FindChain(new Envelope { Message = new OneMessage() }) .OfType <HandlerCall>().Single() .HandlerType.ShouldBe(typeof(OneHandler)); } }