@Test public void shouldCreateReadableUsage() { String helpText = RepositoriesHelp.getText(); assertFalse("help text should not be empty", helpText.isEmpty()); assertTrue("help text should contain 'git (GitRepository)'", helpText.contains("git (GitRepository)")); }
public static String getText() { StringBuilder builder = new StringBuilder(); builder.append("Enabled repositories:"); builder.append(System.lineSeparator()); builder.append(System.lineSeparator()); List<Class<? extends Repository>> clazzes = RepositoryFactory.getRepositoryClasses(); appendClassesHelp(builder, clazzes); List<Class<? extends Repository>> disabledClazzes = RepositoryFactory.getDisabledRepositoryClasses(); if (!disabledClazzes.isEmpty()) { if (!clazzes.isEmpty()) { builder.append(System.lineSeparator()); } builder.append("Disabled repositories:"); builder.append(System.lineSeparator()); builder.append(System.lineSeparator()); appendClassesHelp(builder, disabledClazzes); } return builder.toString(); }
RepositoriesHelp { public static String getText() { StringBuilder builder = new StringBuilder(); builder.append("Enabled repositories:"); builder.append(System.lineSeparator()); builder.append(System.lineSeparator()); List<Class<? extends Repository>> clazzes = RepositoryFactory.getRepositoryClasses(); appendClassesHelp(builder, clazzes); List<Class<? extends Repository>> disabledClazzes = RepositoryFactory.getDisabledRepositoryClasses(); if (!disabledClazzes.isEmpty()) { if (!clazzes.isEmpty()) { builder.append(System.lineSeparator()); } builder.append("Disabled repositories:"); builder.append(System.lineSeparator()); builder.append(System.lineSeparator()); appendClassesHelp(builder, disabledClazzes); } return builder.toString(); } }
RepositoriesHelp { public static String getText() { StringBuilder builder = new StringBuilder(); builder.append("Enabled repositories:"); builder.append(System.lineSeparator()); builder.append(System.lineSeparator()); List<Class<? extends Repository>> clazzes = RepositoryFactory.getRepositoryClasses(); appendClassesHelp(builder, clazzes); List<Class<? extends Repository>> disabledClazzes = RepositoryFactory.getDisabledRepositoryClasses(); if (!disabledClazzes.isEmpty()) { if (!clazzes.isEmpty()) { builder.append(System.lineSeparator()); } builder.append("Disabled repositories:"); builder.append(System.lineSeparator()); builder.append(System.lineSeparator()); appendClassesHelp(builder, disabledClazzes); } return builder.toString(); } private  RepositoriesHelp(); }
RepositoriesHelp { public static String getText() { StringBuilder builder = new StringBuilder(); builder.append("Enabled repositories:"); builder.append(System.lineSeparator()); builder.append(System.lineSeparator()); List<Class<? extends Repository>> clazzes = RepositoryFactory.getRepositoryClasses(); appendClassesHelp(builder, clazzes); List<Class<? extends Repository>> disabledClazzes = RepositoryFactory.getDisabledRepositoryClasses(); if (!disabledClazzes.isEmpty()) { if (!clazzes.isEmpty()) { builder.append(System.lineSeparator()); } builder.append("Disabled repositories:"); builder.append(System.lineSeparator()); builder.append(System.lineSeparator()); appendClassesHelp(builder, disabledClazzes); } return builder.toString(); } private  RepositoriesHelp(); static String getText(); }
RepositoriesHelp { public static String getText() { StringBuilder builder = new StringBuilder(); builder.append("Enabled repositories:"); builder.append(System.lineSeparator()); builder.append(System.lineSeparator()); List<Class<? extends Repository>> clazzes = RepositoryFactory.getRepositoryClasses(); appendClassesHelp(builder, clazzes); List<Class<? extends Repository>> disabledClazzes = RepositoryFactory.getDisabledRepositoryClasses(); if (!disabledClazzes.isEmpty()) { if (!clazzes.isEmpty()) { builder.append(System.lineSeparator()); } builder.append("Disabled repositories:"); builder.append(System.lineSeparator()); builder.append(System.lineSeparator()); appendClassesHelp(builder, disabledClazzes); } return builder.toString(); } private  RepositoriesHelp(); static String getText();  }