A minimalistic ICommandHandler that allows you to pre-record answers and retrieve output.
Inheritance: MockTaskHandler, ICommandHandler
Ejemplo n.º 1
0
 private static CliCommand CreateCommand(string name)
 {
     var handler = new MockCommandHandler();
     try
     {
         return CommandFactory.CreateAndParse(new[] {name, "--verbose"}, handler);
     }
     catch (OptionException)
     {
         // Pass in an additional dummy argument if required
         return CommandFactory.CreateAndParse(new[] {name, "--verbose", "http://dummy/"}, handler);
     }
 }
Ejemplo n.º 2
0
        private static CliCommand CreateCommand(string name)
        {
            var handler = new MockCommandHandler();

            try
            {
                return(CommandFactory.CreateAndParse(new[] { name, "--verbose" }, handler));
            }
            catch (OptionException)
            {
                // Pass in an additional dummy argument if required
                return(CommandFactory.CreateAndParse(new[] { name, "--verbose", "http://dummy/" }, handler));
            }
        }