public void testConfigure_Valid() throws Exception { launcher.configure(getConfigPath("valid-launch.conf")); Class mainClass = launcher.getMainClass(); assertNotNull(mainClass); assertEquals("a.A", mainClass.getName()); assertEquals("app", launcher.getMainRealm().getId()); }
public void testLaunch_ClassNotFound() throws Exception { launcher.configure(getConfigPath("launch-noclass.conf")); try { launcher.launch(new String[] {}); fail("throw ClassNotFoundException"); } catch (ClassNotFoundException e) { // expected and correct } }
public void testLaunch_NoSuchMethod() throws Exception { launcher.configure(getConfigPath("launch-nomethod.conf")); try { launcher.launch(new String[] {}); fail("should have thrown NoSuchMethodException"); } catch (NoSuchMethodException e) { // expected and correct } }
public void testLaunch_ValidEnhancedExitCode() throws Exception { launcher.configure(getConfigPath("valid-enh-launch-exitCode.conf")); launcher.launch(new String[] {}); assertEquals("check exit code", 45, launcher.getExitCode()); }
public void testLaunch_ValidEnhanced() throws Exception { launcher.configure(getConfigPath("valid-enh-launch.conf")); launcher.launch(new String[] {}); }