@Test public void testDependencyChecker() { DependencyChecker checker = new DependencyChecker(); int EXPECTED_PAIRS = 6; int EXPECTED_REFLEXIVE_PAIRS = 3; DependencyPair pair1 = new DependencyPair("test1", "test2"); DependencyPair pair2 = new DependencyPair("test2", "test3"); DependencyPair pair3 = new DependencyPair("test3", "test1"); Set<DependencyPair> dependencySet = new HashSet<DependencyPair>() {{ add(pair1); add(pair2); add(pair3); }}; Set<DependencyPair> closure = checker.makeClosure(dependencySet); int reflexiveCount = 0; for (DependencyPair pair : closure) { if (pair.isReflexive()) { reflexiveCount++; } } assertEquals(EXPECTED_PAIRS, closure.size()); assertEquals(EXPECTED_REFLEXIVE_PAIRS, reflexiveCount); }
public DependencyChecker() { this.dependencies = new HashSet<>(); }
DependencyChecker { public DependencyChecker() { this.dependencies = new HashSet<>(); } }
DependencyChecker { public DependencyChecker() { this.dependencies = new HashSet<>(); } DependencyChecker(); }
DependencyChecker { public DependencyChecker() { this.dependencies = new HashSet<>(); } DependencyChecker(); ErrorLogger checkForCircularDependencies(Map<String, List<Parameter>> expressionMap); }
DependencyChecker { public DependencyChecker() { this.dependencies = new HashSet<>(); } DependencyChecker(); ErrorLogger checkForCircularDependencies(Map<String, List<Parameter>> expressionMap);  }