@Test(expected = CommandLineExitException.class) public void testInitOptionsWithHelp_missingArgument() { parser .accepts("argName", "Funky description") .withRequiredArg() .ofType(String.class) .defaultsTo("nope"); initOptionsWithHelp(parser, new String[] {"--argName"}); }
@Test(expected = ExitStatusZeroException.class) public void testInitOptionsWithHelp_help() { initOptionsWithHelp(parser, new String[] {"--help"}); }
CloudInfoCli(CloudInfo cloudInfo, String[] args) { this.cloudInfo = cloudInfo; this.options = CliUtils.initOptionsWithHelp(parser, args); }