public override void Context() { _substituteState = mock <ISubstituteState>(); _callHandlers = new[] { mock <ICallHandler>(), mock <ICallHandler>() }; _routeArguments = new[] { new object(), new object() }; _callHandlerFactory = mock <ICallHandlerFactory>(); _callHandlerFactory.stub(x => x.CreateCallHandler(SampleRouteDefinition.Handlers[0], _substituteState, _routeArguments)).Return(_callHandlers[0]); _callHandlerFactory.stub(x => x.CreateCallHandler(SampleRouteDefinition.Handlers[1], _substituteState, _routeArguments)).Return(_callHandlers[1]); temporarilyChange(() => RouteFactory.ConstructRoute).to(x => new FakeRoute(x)); }
public RouteFactory(ISubstituteState substituteState, ICallHandlerFactory callHandlerFactory) { _substituteState = substituteState; _callHandlerFactory = callHandlerFactory; }