@Test public void shows_version_with_short_option() throws Exception { cli.execute(new String[] {"--version"}); assertThat(commandOutput()) .as("CLI should return valid version") .containsPattern(Pattern.compile("[1-9]\\d*\\.\\d+\\.\\d+(?:-SNAPSHOT)?")); }
void execute(String[] args) { registry .resolve(args) .orElseThrow(() -> new RuntimeException( String.format("Could not resolve command. Given args: %s%n", Arrays.toString(args)) )) .accept(this.liquigraph); }
LiquigraphCli { void execute(String[] args) { registry .resolve(args) .orElseThrow(() -> new RuntimeException( String.format("Could not resolve command. Given args: %s%n", Arrays.toString(args)) )) .accept(this.liquigraph); } }
LiquigraphCli { void execute(String[] args) { registry .resolve(args) .orElseThrow(() -> new RuntimeException( String.format("Could not resolve command. Given args: %s%n", Arrays.toString(args)) )) .accept(this.liquigraph); } LiquigraphCli(LiquigraphApi liquigraph); }
LiquigraphCli { void execute(String[] args) { registry .resolve(args) .orElseThrow(() -> new RuntimeException( String.format("Could not resolve command. Given args: %s%n", Arrays.toString(args)) )) .accept(this.liquigraph); } LiquigraphCli(LiquigraphApi liquigraph); static void main(String[] args); }
LiquigraphCli { void execute(String[] args) { registry .resolve(args) .orElseThrow(() -> new RuntimeException( String.format("Could not resolve command. Given args: %s%n", Arrays.toString(args)) )) .accept(this.liquigraph); } LiquigraphCli(LiquigraphApi liquigraph); static void main(String[] args);  }