public ICallRouter Create(ISubstitutionContext substitutionContext) { var substituteState = SubstituteState.Create(substitutionContext); var receivedCalls = (IReceivedCalls)substituteState.FindInstanceFor(typeof(IReceivedCalls), null); var resultsSetter = (IResultSetter)substituteState.FindInstanceFor(typeof(IResultSetter), null); var callHandlerFactory = new CallHandlerFactory(); return(new CallRouter(substitutionContext, receivedCalls, resultsSetter, new RouteFactory(substituteState, callHandlerFactory))); }
public ICallRouter Create(ISubstitutionContext substitutionContext, SubstituteConfig config) { var substituteState = new SubstituteState(substitutionContext, config); return new CallRouter(substituteState, substitutionContext, new RouteFactory()); }
public ICallRouter Create(ISubstitutionContext substitutionContext) { var substituteState = new SubstituteState(substitutionContext); return(new CallRouter(substituteState, substitutionContext, new RouteFactory())); }
public ICallRouter Create(ISubstitutionContext substitutionContext, SubstituteConfig config) { var state = new SubstituteState(substitutionContext, config); return new CallRouter(state, substitutionContext, new FluentQueryCompatibleRouteFactory()); }