@Test public void testConfigOption() throws UnsupportedEncodingException { System.out.println(String.format("\n\n%s%s%s%s%s", StringUtils.repeat('*', 10), StringUtils.repeat(' ', 3), "testConfigOption -c", StringUtils.repeat(' ', 3), StringUtils.repeat('*', 10))); final ByteArrayOutputStream bos = new ByteArrayOutputStream(); final PrintStream sysout = System.out; try { System.setOut(new PrintStream(bos)); RunRightFastVertxApplicationLauncher.run(() -> app, "-c"); final String configAsString = bos.toString("UTF-8"); log.info(configAsString); final Config config = ConfigFactory.parseString(configAsString); } finally { System.setOut(sysout); } System.out.println(String.format("\n\n%s%s%s%s%s", StringUtils.repeat('*', 10), StringUtils.repeat(' ', 3), "testConfigOption --config", StringUtils.repeat(' ', 3), StringUtils.repeat('*', 10))); RunRightFastVertxApplicationLauncher.run(() -> app, "--config"); }
public static int run(@NonNull final Supplier<RunRightFastVertxApplication> app, final String... args) { final int returnCode = processCommandLine(args); if (returnCode != -1) { return returnCode; } try { runApp(app); return 0; } catch (final Throwable e) { log.logp(SEVERE, CLASS_NAME, "run", "unexpected exception", e); return 1; } }
RunRightFastVertxApplicationLauncher extends AbstractIdleService { public static int run(@NonNull final Supplier<RunRightFastVertxApplication> app, final String... args) { final int returnCode = processCommandLine(args); if (returnCode != -1) { return returnCode; } try { runApp(app); return 0; } catch (final Throwable e) { log.logp(SEVERE, CLASS_NAME, "run", "unexpected exception", e); return 1; } } }
RunRightFastVertxApplicationLauncher extends AbstractIdleService { public static int run(@NonNull final Supplier<RunRightFastVertxApplication> app, final String... args) { final int returnCode = processCommandLine(args); if (returnCode != -1) { return returnCode; } try { runApp(app); return 0; } catch (final Throwable e) { log.logp(SEVERE, CLASS_NAME, "run", "unexpected exception", e); return 1; } }  }
RunRightFastVertxApplicationLauncher extends AbstractIdleService { public static int run(@NonNull final Supplier<RunRightFastVertxApplication> app, final String... args) { final int returnCode = processCommandLine(args); if (returnCode != -1) { return returnCode; } try { runApp(app); return 0; } catch (final Throwable e) { log.logp(SEVERE, CLASS_NAME, "run", "unexpected exception", e); return 1; } }  static int run(@NonNull final Supplier<RunRightFastVertxApplication> app, final String... args); }
RunRightFastVertxApplicationLauncher extends AbstractIdleService { public static int run(@NonNull final Supplier<RunRightFastVertxApplication> app, final String... args) { final int returnCode = processCommandLine(args); if (returnCode != -1) { return returnCode; } try { runApp(app); return 0; } catch (final Throwable e) { log.logp(SEVERE, CLASS_NAME, "run", "unexpected exception", e); return 1; } }  static int run(@NonNull final Supplier<RunRightFastVertxApplication> app, final String... args);  }