@Test public void testInitOptionsWithHelp_optionalArgument() { parser.accepts("argName", "Funky description"); OptionSet options = initOptionsWithHelp(parser, new String[] {"--argName"}); assertNotNull(options); assertEquals(1, options.specs().size()); assertTrue(options.has("argName")); }
@Test public void testInitOptionsWithHelp_noArgs() { OptionSet options = initOptionsWithHelp(parser, new String[] {}); assertNotNull(options); assertEquals(0, options.specs().size()); }