@Test public void testUsage() { ConfigureCommand command = new ConfigureCommand(new Shell(), new HashMap<>(), Paths.get("/path/to/not-found.yml")); Usage usage = command.usage(); assertThat(usage.synopsis(), is("configure [options] <profile>")); assertThat(usage.options().size(), is(1)); }
@Override public Usage usage() { Usage usage = new Usage("configure [options] <profile>"); usage.option(null, "default", false, "set <profile> as default"); return usage; }
ConfigureCommand implements Command { @Override public Usage usage() { Usage usage = new Usage("configure [options] <profile>"); usage.option(null, "default", false, "set <profile> as default"); return usage; } }
ConfigureCommand implements Command { @Override public Usage usage() { Usage usage = new Usage("configure [options] <profile>"); usage.option(null, "default", false, "set <profile> as default"); return usage; } ConfigureCommand(Shell shell, Map<String, Object> configuration, Path path); }
ConfigureCommand implements Command { @Override public Usage usage() { Usage usage = new Usage("configure [options] <profile>"); usage.option(null, "default", false, "set <profile> as default"); return usage; } ConfigureCommand(Shell shell, Map<String, Object> configuration, Path path); @Override String name(); @Override Usage usage(); @Override void run(Line line); }
ConfigureCommand implements Command { @Override public Usage usage() { Usage usage = new Usage("configure [options] <profile>"); usage.option(null, "default", false, "set <profile> as default"); return usage; } ConfigureCommand(Shell shell, Map<String, Object> configuration, Path path); @Override String name(); @Override Usage usage(); @Override void run(Line line);  }