@Test public void testWithImplementedUsesRelation() { init(false, false); Component component = packageArchitecture.getParentComponent("com.my.a.b"); assertThat(component, notNullValue()); component.getUsesAPI().put("newRule", new ClassSet("newRule", Lists.newArrayList("com.my.a.e"))); new DependencyChecker(architectureGraph, packageArchitecture); AllExplicitRulesUsedChecker checker = new AllExplicitRulesUsedChecker(architectureGraph, packageArchitecture); assertThat(checker.isOk(), is(true)); assertThat(checker.getViolationMessage(), nullValue()); }
@Override public String getViolationMessage() { return getViolationMessages().isEmpty() ? null : (getViolationMessages().size() + " unused rules: " + getViolationMessages()); }
AllExplicitRulesUsedChecker extends Checker { @Override public String getViolationMessage() { return getViolationMessages().isEmpty() ? null : (getViolationMessages().size() + " unused rules: " + getViolationMessages()); } }
AllExplicitRulesUsedChecker extends Checker { @Override public String getViolationMessage() { return getViolationMessages().isEmpty() ? null : (getViolationMessages().size() + " unused rules: " + getViolationMessages()); } AllExplicitRulesUsedChecker(DependencyGraph dependencyGraph, Architecture architecture); }
AllExplicitRulesUsedChecker extends Checker { @Override public String getViolationMessage() { return getViolationMessages().isEmpty() ? null : (getViolationMessages().size() + " unused rules: " + getViolationMessages()); } AllExplicitRulesUsedChecker(DependencyGraph dependencyGraph, Architecture architecture); @Override String getViolationMessage(); }
AllExplicitRulesUsedChecker extends Checker { @Override public String getViolationMessage() { return getViolationMessages().isEmpty() ? null : (getViolationMessages().size() + " unused rules: " + getViolationMessages()); } AllExplicitRulesUsedChecker(DependencyGraph dependencyGraph, Architecture architecture); @Override String getViolationMessage();  }