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)); }
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)); }