@Test public void testCommandLineLoader() { CommandLineLoader loader = new CommandLineLoader(emptyArgv); assertEquals(0, loader.getNodeArguments().size()); emptyArgv.add("one two --three"); loader = new CommandLineLoader(emptyArgv); Assert.assertEquals(emptyArgv.subList(1, emptyArgv.size()), loader.getNodeArguments()); List<String> tests = Lists.newArrayList("--help one name:=/my/name -i foo:=/my/foo", "name:=/my/name --help one -i foo:=/my/foo", "name:=/my/name --help foo:=/my/foo one -i"); List<String> expected = Lists.newArrayList("--help", "one", "-i"); for (String test : tests) { loader = new CommandLineLoader(Lists.newArrayList(("Foo " + test).split("\\s+"))); Assert.assertEquals(expected, loader.getNodeArguments()); } }
public CommandLineLoader(List<String> argv) { this(argv, System.getenv()); }
CommandLineLoader { public CommandLineLoader(List<String> argv) { this(argv, System.getenv()); } }
CommandLineLoader { public CommandLineLoader(List<String> argv) { this(argv, System.getenv()); } CommandLineLoader(List<String> argv);  CommandLineLoader(List<String> argv, Map<String, String> environment); }
CommandLineLoader { public CommandLineLoader(List<String> argv) { this(argv, System.getenv()); } CommandLineLoader(List<String> argv);  CommandLineLoader(List<String> argv, Map<String, String> environment); String getNodeClassName(); List<String> getNodeArguments(); NodeConfiguration build(); NodeMain loadClass(String name); }
CommandLineLoader { public CommandLineLoader(List<String> argv) { this(argv, System.getenv()); } CommandLineLoader(List<String> argv);  CommandLineLoader(List<String> argv, Map<String, String> environment); String getNodeClassName(); List<String> getNodeArguments(); NodeConfiguration build(); NodeMain loadClass(String name);  }