@Test public void testComputeTargetsMultipleEndpoints() throws Exception { final List<String> argsList = Lists.newArrayList( SUBCOMMAND, "-d", Joiner.on(",").join(DOMAINS)); for (final String endpoint : ENDPOINTS) { argsList.add("--master"); argsList.add(endpoint); } argsList.add(SERVICE); final CliParser cliParser = new CliParser(toArray(argsList)); final List<Target> targets = cliParser.getTargets(); final List<Target> expectedTargets = Lists.newArrayListWithExpectedSize(ENDPOINTS.length); for (final String endpoint : ENDPOINTS) { expectedTargets.add(Target.from(URI.create(endpoint))); } assertEquals(expectedTargets, targets); }
public List<Target> getTargets() { return targets; }
CliParser { public List<Target> getTargets() { return targets; } }
CliParser { public List<Target> getTargets() { return targets; } CliParser(final String... args); }
CliParser { public List<Target> getTargets() { return targets; } CliParser(final String... args); List<Target> getTargets(); String getUsername(); boolean getJson(); Namespace getNamespace(); CliCommand getCommand(); LoggingConfig getLoggingConfig(); }
CliParser { public List<Target> getTargets() { return targets; } CliParser(final String... args); List<Target> getTargets(); String getUsername(); boolean getJson(); Namespace getNamespace(); CliCommand getCommand(); LoggingConfig getLoggingConfig();  }