@Test public void whenCreatingCustomJavaCheckRegistrarThenGenerateClassWithSuccess() { CustomRulesCheckRegistrar registrar = new CustomRulesCheckRegistrar(); RegistrarContext registrarContext = new CheckRegistrar.RegistrarContext(); registrar.register(registrarContext); List<Class<? extends JavaCheck>> checkClasses = Lists.newArrayList(registrarContext.checkClasses()); List<Class<? extends JavaCheck>> testCheckClasses = Lists.newArrayList(registrarContext.testCheckClasses()); assertThat(checkClasses.size(), is(2)); assertThat(testCheckClasses.size(), is(0)); assertThat(registrarContext.repositoryKey(), is(CheckList.REPOSITORY_KEY)); }
@Override public void register(RegistrarContext registrarContext) { registrarContext.registerClassesForRepository(CheckList.REPOSITORY_KEY, CheckList.getJavaChecks(), CheckList.getJavaTestChecks()); }
CustomRulesCheckRegistrar implements CheckRegistrar { @Override public void register(RegistrarContext registrarContext) { registrarContext.registerClassesForRepository(CheckList.REPOSITORY_KEY, CheckList.getJavaChecks(), CheckList.getJavaTestChecks()); } }
CustomRulesCheckRegistrar implements CheckRegistrar { @Override public void register(RegistrarContext registrarContext) { registrarContext.registerClassesForRepository(CheckList.REPOSITORY_KEY, CheckList.getJavaChecks(), CheckList.getJavaTestChecks()); }  }
CustomRulesCheckRegistrar implements CheckRegistrar { @Override public void register(RegistrarContext registrarContext) { registrarContext.registerClassesForRepository(CheckList.REPOSITORY_KEY, CheckList.getJavaChecks(), CheckList.getJavaTestChecks()); }  @Override void register(RegistrarContext registrarContext); }
CustomRulesCheckRegistrar implements CheckRegistrar { @Override public void register(RegistrarContext registrarContext) { registrarContext.registerClassesForRepository(CheckList.REPOSITORY_KEY, CheckList.getJavaChecks(), CheckList.getJavaTestChecks()); }  @Override void register(RegistrarContext registrarContext);  }