Ejemplo n.º 1
0
 public WhenCalled(ISubstitutionContext context, T substitute, Action <T> call, MatchArgs matchArgs)
 {
     _substitute = substitute;
     _call       = call;
     _matchArgs  = matchArgs;
     _callRouter = context.GetCallRouterFor(substitute);
 }
Ejemplo n.º 2
0
 public WhenCalled(ISubstitutionContext context, T substitute, Action <T> call, MatchArgs matchArgs)
 {
     _substitute    = substitute;
     _call          = call;
     _matchArgs     = matchArgs;
     _callRouter    = context.GetCallRouterFor(substitute);
     _routeFactory  = context.RouteFactory;
     _threadContext = context.ThreadContext;
 }
Ejemplo n.º 3
0
        protected internal override void OnMockCreated(object instance, Type type, IComponentContext context, ISubstitutionContext substitutionContext)
        {
            var router = substitutionContext.GetCallRouterFor(instance);

            router.RegisterCustomCallHandlerFactory(_ => new AutoPropertyInjectorCallHandler(context));
        }