@Test public void optionHelp() { OptionHandler handler = new OptionHandler(); handler.option("bar", "Bar"); OptionParsingCommand command = new TestOptionParsingCommand("foo", "Foo", handler); assertThat(command.getHelp()).contains("--bar"); }
@Test public void optionHelp() { OptionHandler handler = new OptionHandler(); handler.option("bar", "Bar"); OptionParsingCommand command = new OptionParsingCommand("foo", "Foo", handler) { }; assertThat(command.getHelp(), containsString("--bar")); }
protected ArchiveCommand(String name, String description, OptionHandler optionHandler) { super(name, description, optionHandler); }
protected OptionParsingCommand(String name, String description, OptionHandler handler) { super(name, description); this.handler = handler; }
protected OptionHandler getHandler() { return this.handler; }
TestOptionParsingCommand(String name, String description, OptionHandler handler) { super(name, description, handler); }