@Test @UseDataProvider("provideOGCli") public void ogcli(final String[] args, final boolean shouldStop, final boolean error, final boolean help, final boolean version) { final GetOpt getopt = new OGGetOpt(); final Cli cli = Application.cli("og", getopt, args); assertThat(cli.shouldStop(), is(shouldStop)); assertThat(cli.error(), is(error)); assertThat(cli.help(), is(help)); assertThat(cli.version(), is(version)); cli.printUsage(); cli.printErrors(); cli.printVersion(); }
public static Cli cli(final String name, final GetOpt getopt, final String[] args) { return new Cli(name, getopt, args); }
Application { public static Cli cli(final String name, final GetOpt getopt, final String[] args) { return new Cli(name, getopt, args); } }
Application { public static Cli cli(final String name, final GetOpt getopt, final String[] args) { return new Cli(name, getopt, args); } private  Application(); }
Application { public static Cli cli(final String name, final GetOpt getopt, final String[] args) { return new Cli(name, getopt, args); } private  Application(); static Cli cli(final String name, final GetOpt getopt, final String[] args); static URI getResource(final String resourceName); static T fromJson(final File json, final Class<T> cls, final Gson gson); static void exit(final int exitCode); }
Application { public static Cli cli(final String name, final GetOpt getopt, final String[] args) { return new Cli(name, getopt, args); } private  Application(); static Cli cli(final String name, final GetOpt getopt, final String[] args); static URI getResource(final String resourceName); static T fromJson(final File json, final Class<T> cls, final Gson gson); static void exit(final int exitCode); static final int TEST_SUCCESS; static final int TEST_ERROR; static final int TEST_CONFIG_ERROR; static final int TEST_SHUTDOWN_ERROR; static final String TEST_SUCCESS_MSG; }