public void UsageThrowVerbHelpException() { ParserUsage helpUsage = new ParserUsage(); List<CommandLine.Error> errs = new List<CommandLine.Error>() { new CommandLineWrapError(CommandLine.ErrorType.HelpVerbRequestedError), }; ParseHelpException ex = Assert.Throws<ParseHelpException>(() => helpUsage.PrintHelp(Parser, errs, new string[] {})); Assert.IsNotNull(ex); }
public void UsageThrowHelpRequestExceptionWhenVerbHelpAsk() { ParserUsage helpUsage = new ParserUsage(); List<CommandLine.Error> errs = new List<CommandLine.Error>() { // https://github.com/commandlineparser/commandline/blob/master/src/CommandLine/Error.cs new CommandLineWrapError(CommandLine.ErrorType.BadVerbSelectedError), }; ParseHelpException ex = Assert.Throws<ParseHelpException>(() => helpUsage.PrintHelp(Parser, errs, new string[] {"pool", "help" })); Assert.IsNotNull(ex); }