@Test public void helpForCommandHasOptionalColon() throws CommandException { doReturn(new FakeCommand(":bob")).when(cmdHelper).getCommand(eq(":bob")); cmd.execute("bob"); verify(logger).printOut("\nusage: @|BOLD :bob|@ usage for :bob\n" + "\nhelp for :bob\n"); }
@Override public void execute(@Nonnull final String argString) throws CommandException { String[] args = simpleArgParse(argString, 0, 1, COMMAND_NAME, getUsage()); if (args.length == 0) { printGeneralHelp(); } else { printHelpFor(args[0]); } }
Help implements Command { @Override public void execute(@Nonnull final String argString) throws CommandException { String[] args = simpleArgParse(argString, 0, 1, COMMAND_NAME, getUsage()); if (args.length == 0) { printGeneralHelp(); } else { printHelpFor(args[0]); } } }
Help implements Command { @Override public void execute(@Nonnull final String argString) throws CommandException { String[] args = simpleArgParse(argString, 0, 1, COMMAND_NAME, getUsage()); if (args.length == 0) { printGeneralHelp(); } else { printHelpFor(args[0]); } } Help(@Nonnull final Logger shell, @Nonnull final CommandHelper commandHelper); }
Help implements Command { @Override public void execute(@Nonnull final String argString) throws CommandException { String[] args = simpleArgParse(argString, 0, 1, COMMAND_NAME, getUsage()); if (args.length == 0) { printGeneralHelp(); } else { printHelpFor(args[0]); } } Help(@Nonnull final Logger shell, @Nonnull final CommandHelper commandHelper); @Nonnull @Override String getName(); @Nonnull @Override String getDescription(); @Nonnull @Override String getUsage(); @Nonnull @Override String getHelp(); @Nonnull @Override List<String> getAliases(); @Override void execute(@Nonnull final String argString); }
Help implements Command { @Override public void execute(@Nonnull final String argString) throws CommandException { String[] args = simpleArgParse(argString, 0, 1, COMMAND_NAME, getUsage()); if (args.length == 0) { printGeneralHelp(); } else { printHelpFor(args[0]); } } Help(@Nonnull final Logger shell, @Nonnull final CommandHelper commandHelper); @Nonnull @Override String getName(); @Nonnull @Override String getDescription(); @Nonnull @Override String getUsage(); @Nonnull @Override String getHelp(); @Nonnull @Override List<String> getAliases(); @Override void execute(@Nonnull final String argString); static final String COMMAND_NAME; static String CYPHER_REFCARD_LINK; }