@Test public void testParseArgument_duplicateOptions_coordinates_allVersions() throws ParseException { try { DashboardArguments.readCommandLine( "-c", "com.google.cloud:libraries-bom:1.0.0", "-a", "com.google.cloud:libraries-bom"); Assert.fail("The argument should validate duplicate input"); } catch (AlreadySelectedException ex) { } }
static DashboardArguments readCommandLine(String... arguments) throws ParseException { CommandLineParser parser = new DefaultParser(); try { return new DashboardArguments(parser.parse(options, arguments)); } catch (ParseException ex) { helpFormatter.printHelp("DashboardMain", options); throw ex; } }
DashboardArguments { static DashboardArguments readCommandLine(String... arguments) throws ParseException { CommandLineParser parser = new DefaultParser(); try { return new DashboardArguments(parser.parse(options, arguments)); } catch (ParseException ex) { helpFormatter.printHelp("DashboardMain", options); throw ex; } } }
DashboardArguments { static DashboardArguments readCommandLine(String... arguments) throws ParseException { CommandLineParser parser = new DefaultParser(); try { return new DashboardArguments(parser.parse(options, arguments)); } catch (ParseException ex) { helpFormatter.printHelp("DashboardMain", options); throw ex; } } private  DashboardArguments(CommandLine commandLine); }
DashboardArguments { static DashboardArguments readCommandLine(String... arguments) throws ParseException { CommandLineParser parser = new DefaultParser(); try { return new DashboardArguments(parser.parse(options, arguments)); } catch (ParseException ex) { helpFormatter.printHelp("DashboardMain", options); throw ex; } } private  DashboardArguments(CommandLine commandLine);  }
DashboardArguments { static DashboardArguments readCommandLine(String... arguments) throws ParseException { CommandLineParser parser = new DefaultParser(); try { return new DashboardArguments(parser.parse(options, arguments)); } catch (ParseException ex) { helpFormatter.printHelp("DashboardMain", options); throw ex; } } private  DashboardArguments(CommandLine commandLine);   }