InterlokLauncher extends Launcher { @Override protected String getMainClass() throws Exception { return mainClassSelector.mainClass(); } InterlokLauncher(String[] argv); static void main(String[] args);  }
@Test public void testMainClass() throws Exception { InterlokLauncher launcher = new InterlokLauncher(null); assertEquals(InterlokLauncher.INTERLOK_MAIN_CLASS, launcher.getMainClass()); }
@Test public void testMainClassFailover() throws Exception { InterlokLauncher launcher = new InterlokLauncher(new String[]{ "-failover", "input.xml" }); assertEquals(InterlokLauncher.INTERLOK_FAILOVER_MAIN_CLASS, launcher.getMainClass()); launcher = new InterlokLauncher(new String[]{ "--failover", "input.xml" }); assertEquals(InterlokLauncher.INTERLOK_FAILOVER_MAIN_CLASS, launcher.getMainClass()); }
@Test public void testMainClassContainer() throws Exception { InterlokLauncher launcher = new InterlokLauncher(new String[] { "-container", "input.properties" }); assertEquals(InterlokLauncher.INTERLOK_CONTAINER_MAIN_CLASS, launcher.getMainClass()); launcher = new InterlokLauncher(new String[] { "--container", "input.properties" }); assertEquals(InterlokLauncher.INTERLOK_CONTAINER_MAIN_CLASS, launcher.getMainClass()); }
@Test public void testMainClassServiceTest() throws Exception { InterlokLauncher launcher = new InterlokLauncher(new String[]{ "-serviceTest", "input.xml" }); assertEquals(InterlokLauncher.SERVICE_TEST_MAIN_CLASS, launcher.getMainClass()); launcher = new InterlokLauncher(new String[]{ "--serviceTest", "input.xml" }); assertEquals(InterlokLauncher.SERVICE_TEST_MAIN_CLASS, launcher.getMainClass()); }
@Test public void testMainClassPassword() throws Exception { InterlokLauncher launcher = new InterlokLauncher(new String[] { "-password", "PW:", "Hello" }); assertEquals(InterlokLauncher.PASSWORD_GEN_MAIN_CLASS, launcher.getMainClass()); launcher = new InterlokLauncher(new String[] { "--password", "PW:", "Hello" }); assertEquals(InterlokLauncher.PASSWORD_GEN_MAIN_CLASS, launcher.getMainClass()); }