use of org.apache.ignite.internal.commandline.argument.CommandArg in project ignite by apache.
the class GridCommandHandlerClusterByClassTest method testCacheHelp.
/**
*/
@Test
public void testCacheHelp() throws Exception {
injectTestSystemOut();
assertEquals(EXIT_CODE_OK, execute("--cache", "help"));
String output = testOut.toString();
for (CacheSubcommands cmd : CacheSubcommands.values()) {
if (cmd != HELP) {
assertContains(log, output, cmd.toString());
Class<? extends Enum<? extends CommandArg>> args = cmd.getCommandArgs();
if (args != null)
for (Enum<? extends CommandArg> arg : args.getEnumConstants()) assertTrue(cmd + " " + arg, output.contains(arg.toString()));
} else
assertContains(log, output, CommandHandler.UTILITY_NAME);
}
checkHelp(output, "org.apache.ignite.util/" + getClass().getSimpleName() + "_cache_help.output");
}
Aggregations