@Test public void testNotOk() { init(false, false); @SuppressWarnings("unchecked") List<String> uses = (List<String>) architectureGraph.getNode("com.my.a").getProperty(Constants.USES_API); uses.add("com.my.other"); new DependencyChecker(architectureGraph, packageArchitecture); AllExplicitRulesUsedChecker checker = new AllExplicitRulesUsedChecker(architectureGraph, packageArchitecture); assertThat(checker.isOk(), is(false)); assertThat(checker.getViolationMessage(), is("1 unused rules: [com.my.a: com.my.other]")); }
@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();  }