@Test public void whenRetrievingJavaChecksThenGetRightNumberOfClasses() { int count = 0; Collection<File> files = FileUtils.listFiles( new File("src/main/java/de/example/custom/java/checks/"), new String[] {"java"}, true); for (File file : files) { if (file.getName().endsWith("Check.java")) { count++; } } assertThat(CheckList.getChecks().size(), is(count)); }
public static List<Class> getChecks() { return ImmutableList.<Class>builder() .addAll(getJavaChecks()) .addAll(getJavaTestChecks()) .addAll(getXmlChecks()) .addAll(getMavenChecks()) .build(); }
CheckList { public static List<Class> getChecks() { return ImmutableList.<Class>builder() .addAll(getJavaChecks()) .addAll(getJavaTestChecks()) .addAll(getXmlChecks()) .addAll(getMavenChecks()) .build(); } }
CheckList { public static List<Class> getChecks() { return ImmutableList.<Class>builder() .addAll(getJavaChecks()) .addAll(getJavaTestChecks()) .addAll(getXmlChecks()) .addAll(getMavenChecks()) .build(); } private  CheckList(); }
CheckList { public static List<Class> getChecks() { return ImmutableList.<Class>builder() .addAll(getJavaChecks()) .addAll(getJavaTestChecks()) .addAll(getXmlChecks()) .addAll(getMavenChecks()) .build(); } private  CheckList(); static List<Class> getChecks(); static List<Class<? extends JavaCheck>> getJavaChecks(); static List<Class<? extends JavaCheck>> getJavaTestChecks(); static List<Class<? extends JavaCheck>> getXmlChecks(); }
CheckList { public static List<Class> getChecks() { return ImmutableList.<Class>builder() .addAll(getJavaChecks()) .addAll(getJavaTestChecks()) .addAll(getXmlChecks()) .addAll(getMavenChecks()) .build(); } private  CheckList(); static List<Class> getChecks(); static List<Class<? extends JavaCheck>> getJavaChecks(); static List<Class<? extends JavaCheck>> getJavaTestChecks(); static List<Class<? extends JavaCheck>> getXmlChecks(); static final String REPOSITORY_KEY; static final String REPOSITORY_NAME; }