Ejemplo n.º 1
0
 public static T GetFromContext <T>(this AppRunner runner,
                                    string args,
                                    ITestOutputHelper output,
                                    Func <CommandContext, T> capture,
                                    MiddlewareStages middlewareStage = MiddlewareStages.PostBindValuesPreInvoke)
 {
     return(runner.GetFromContext(
                args.SplitArgs(),
                output?.AsLogger(),
                capture,
                middlewareStage));
 }
Ejemplo n.º 2
0
        private Operands GetOperands(string methodName, IDependencyResolver dependencyResolver = null)
        {
            var appRunner = new AppRunner <App>();

            if (dependencyResolver != null)
            {
                appRunner.UseDependencyResolver(dependencyResolver);
            }
            return(appRunner.GetFromContext(methodName.SplitArgs(),
                                            ctx => Operands.FromCommand(ctx.ParseResult.TargetCommand),
                                            middlewareStage: MiddlewareStages.PostParseInputPreBindValues));
        }