@Test public void shouldProperlyShowHelpMessage() { InputStream stream = toInputStream("help\n"); ByteArrayOutputStream result = new ByteArrayOutputStream(); new Shell(stream, result, "") { @Override public List<Object> buildCommands(JCommander jCommander) { return Arrays.<Object>asList( new Help(jCommander), new Clear(this) ); } }.run(); approval.verify(result, Paths.get("")); }
@Override public void run() { parent.usage(); }
Help implements ShellCommand { @Override public void run() { parent.usage(); } }
Help implements ShellCommand { @Override public void run() { parent.usage(); } Help(JCommander parent); }
Help implements ShellCommand { @Override public void run() { parent.usage(); } Help(JCommander parent); @Override void run(); }
Help implements ShellCommand { @Override public void run() { parent.usage(); } Help(JCommander parent); @Override void run();  }