@Test public void shouldNotAcceptArgs() throws CommandException { thrown.expect(CommandException.class); thrown.expectMessage(containsString("Incorrect number of arguments")); cmd.execute("bob"); fail("Should not accept args"); }
@Override public void execute(@Nonnull final String argString) throws ExitException, CommandException { simpleArgParse(argString, 0, COMMAND_NAME, getUsage()); throw new ExitException(EXIT_SUCCESS); }
Exit implements Command { @Override public void execute(@Nonnull final String argString) throws ExitException, CommandException { simpleArgParse(argString, 0, COMMAND_NAME, getUsage()); throw new ExitException(EXIT_SUCCESS); } }
Exit implements Command { @Override public void execute(@Nonnull final String argString) throws ExitException, CommandException { simpleArgParse(argString, 0, COMMAND_NAME, getUsage()); throw new ExitException(EXIT_SUCCESS); } Exit(@Nonnull final Logger logger); }
Exit implements Command { @Override public void execute(@Nonnull final String argString) throws ExitException, CommandException { simpleArgParse(argString, 0, COMMAND_NAME, getUsage()); throw new ExitException(EXIT_SUCCESS); } Exit(@Nonnull final Logger logger); @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); }
Exit implements Command { @Override public void execute(@Nonnull final String argString) throws ExitException, CommandException { simpleArgParse(argString, 0, COMMAND_NAME, getUsage()); throw new ExitException(EXIT_SUCCESS); } Exit(@Nonnull final Logger logger); @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; }