コード例 #1
0
  @Test(expected = CommandLineExitException.class)
  public void testInitOptionsWithHelp_missingArgument() {
    parser
        .accepts("argName", "Funky description")
        .withRequiredArg()
        .ofType(String.class)
        .defaultsTo("nope");

    initOptionsWithHelp(parser, new String[] {"--argName"});
  }
コード例 #2
0
 @Test(expected = ExitStatusZeroException.class)
 public void testInitOptionsWithHelp_help() {
   initOptionsWithHelp(parser, new String[] {"--help"});
 }
コード例 #3
0
 CloudInfoCli(CloudInfo cloudInfo, String[] args) {
   this.cloudInfo = cloudInfo;
   this.options = CliUtils.initOptionsWithHelp(parser, args);
 }