@Test public void executes_minimal_migration_with_short_options() { String uri = "jdbc:neo4j:bolt: String masterChangelog = "changelog.xml"; cli.execute(new String[] { "run", "-g", uri, "-c", masterChangelog }); ArgumentCaptor<Configuration> captor = ArgumentCaptor.forClass(Configuration.class); verify(liquigraph).runMigrations(captor.capture()); Configuration configuration = captor.getValue(); assertThat(configuration.masterChangelog()).isEqualTo(masterChangelog); assertThat(configuration.executionMode()).isEqualTo(RUN_MODE); }
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);  }