Add loader.args to PropertiesLauncher

Also new section of README for propery keys used by the
launcher.
This commit is contained in:
Dave Syer
2014-01-27 11:48:19 +00:00
parent 8d05cd1fb6
commit 91998d5942
3 changed files with 67 additions and 4 deletions

View File

@@ -20,6 +20,7 @@ import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.Arrays;
import java.util.Collections;
import org.junit.After;
@@ -147,6 +148,13 @@ public class PropertiesLauncherTests {
assertEquals("demo.Application", System.getProperty("loader.main"));
}
@Test
public void testArgsEnhanced() throws Exception {
System.setProperty("loader.args", "foo");
PropertiesLauncher launcher = new PropertiesLauncher();
assertEquals("[foo, bar]", Arrays.asList(launcher.getArgs("bar")).toString());
}
private void waitFor(String value) throws Exception {
int count = 0;
boolean timeout = false;