KuneCliMain { public static void main(final String[] args) throws InvalidSyntaxException, ExecutionException, MalformedURLException { final String serverPrefix = System.getenv("KUNE_SERVER_URL"); if (serverPrefix != null) { SERVER_PREFFIX = serverPrefix; SERVICE_PREFFIX = setServicePrefix(); LOG.debug("Using server URL: " + SERVER_PREFFIX); LOG.debug("Using service URL: " + SERVICE_PREFFIX); } initServices(); final Set<Command> cs = new LinkedHashSet<Command>(); final NaturalCLI nc = new NaturalCLI(cs); cs.add(new HelpCommand(cs)); cs.add(new HTMLHelpCommand(cs)); cs.add(new ExecuteFileCommand(nc)); cs.add(injector.getInstance(AuthCommand.class)); cs.add(injector.getInstance(SiteInviteCommand.class)); cs.add(injector.getInstance(SiteI18nStatsCommand.class)); cs.add(injector.getInstance(SiteReindexAllEntitiesCommand.class)); cs.add(injector.getInstance(SiteReindexAllWavesCommand.class)); cs.add(injector.getInstance(SiteReloadPropertiesCommand.class)); cs.add(injector.getInstance(GroupsCount.class)); cs.add(injector.getInstance(GroupsReindexCommand.class)); cs.add(injector.getInstance(UsersCount.class)); cs.add(injector.getInstance(UsersDailySignInsCommand.class)); cs.add(injector.getInstance(UsersLastSignInsCommand.class)); cs.add(injector.getInstance(UsersLangStatsCommand.class)); cs.add(injector.getInstance(UsersSignInsStatsCommand.class)); cs.add(injector.getInstance(UsersReindexCommand.class)); cs.add(injector.getInstance(WaveToDirCommand.class)); cs.add(injector.getInstance(DeltaMigrationToMongoCommand.class)); nc.execute(args, 0); }  static void main(final String[] args); static final Log LOG; static String SERVER_PREFFIX; static String SERVICE_PREFFIX; }
@Test public void testBasicAuth() throws InvalidSyntaxException, ExecutionException, MalformedURLException { final KuneCliMain cli = new KuneCliMain(); final String[] args = new String[] { "auth", "admin", "easyeasy" }; KuneCliMain.main(args); }
@Test public void testBasicHelp() throws InvalidSyntaxException, ExecutionException, MalformedURLException { final KuneCliMain cli = new KuneCliMain(); final String[] args = new String[] { "help" }; KuneCliMain.main(args); }