use of com.intellij.cyclicDependencies.CyclicDependenciesBuilder in project intellij-community by JetBrains.
the class CyclicDependenciesTest method testT4.
public void testT4() {
//com.a<->com.b
//com.a->com.c->com.d->com.a
final CyclicDependenciesBuilder builder = new CyclicDependenciesBuilder(myProject, new AnalysisScope(myProject));
builder.analyze();
final HashMap<PsiPackage, Set<List<PsiPackage>>> cyclicDependencies = builder.getCyclicDependencies();
HashMap<String, String[][]> expected = new HashMap<>();
expected.put("com.b", new String[][] { { "com.a", "com.b" } });
expected.put("com.d", new String[][] { { "com.c", "com.a", "com.d" } });
expected.put("com.c", new String[][] { { "com.a", "com.d", "com.c" } });
expected.put("com.a", new String[][] { { "com.d", "com.c", "com.a" }, { "com.b", "com.a" } });
checkResult(expected, cyclicDependencies, true);
}
use of com.intellij.cyclicDependencies.CyclicDependenciesBuilder in project intellij-community by JetBrains.
the class CyclicDependenciesTest method testT6.
public void testT6() {
//A->B1
//B2->C
//C->A
final CyclicDependenciesBuilder builder = new CyclicDependenciesBuilder(myProject, new AnalysisScope(myProject));
builder.analyze();
final HashMap<PsiPackage, Set<List<PsiPackage>>> cyclicDependencies = builder.getCyclicDependencies();
HashMap<String, String[][]> expected = new HashMap<>();
expected.put("com.b", new String[][] { { "com.a", "com.c", "com.b" } });
expected.put("com.c", new String[][] { { "com.b", "com.a", "com.c" } });
expected.put("com.a", new String[][] { { "com.c", "com.b", "com.a" } });
checkResult(expected, cyclicDependencies, true);
}
use of com.intellij.cyclicDependencies.CyclicDependenciesBuilder in project intellij-community by JetBrains.
the class CyclicDependenciesTest method testT2.
public void testT2() {
//com.b<->com.a
//com.c<->com.d
final CyclicDependenciesBuilder builder = new CyclicDependenciesBuilder(myProject, new AnalysisScope(myProject));
builder.analyze();
final HashMap<PsiPackage, Set<List<PsiPackage>>> cyclicDependencies = builder.getCyclicDependencies();
HashMap<String, String[][]> expected = new HashMap<>();
expected.put("com.b", new String[][] { { "com.a", "com.b" } });
expected.put("com.d", new String[][] { { "com.c", "com.d" } });
expected.put("com.c", new String[][] { { "com.d", "com.c" } });
expected.put("com.a", new String[][] { { "com.b", "com.a" } });
checkResult(expected, cyclicDependencies);
}
use of com.intellij.cyclicDependencies.CyclicDependenciesBuilder in project intellij-community by JetBrains.
the class CyclicDependenciesTest method testNoCycle.
public void testNoCycle() {
//B->A
final CyclicDependenciesBuilder builder = new CyclicDependenciesBuilder(myProject, new AnalysisScope(myProject));
builder.analyze();
final HashMap<PsiPackage, Set<List<PsiPackage>>> cyclicDependencies = builder.getCyclicDependencies();
HashMap<String, String[][]> expected = new HashMap<>();
expected.put("com.b", new String[0][0]);
expected.put("com.a", new String[0][0]);
checkResult(expected, cyclicDependencies, true);
}
use of com.intellij.cyclicDependencies.CyclicDependenciesBuilder in project intellij-community by JetBrains.
the class CyclicDependenciesTest method testT1.
public void testT1() {
// com.a<->com.b
final CyclicDependenciesBuilder builder = new CyclicDependenciesBuilder(myProject, new AnalysisScope(myProject));
builder.analyze();
final HashMap<PsiPackage, Set<List<PsiPackage>>> cyclicDependencies = builder.getCyclicDependencies();
HashMap<String, String[][]> expected = new HashMap<>();
expected.put("com.b", new String[][] { { "com.a", "com.b" } });
expected.put("com.a", new String[][] { { "com.b", "com.a" } });
checkResult(expected, cyclicDependencies);
}
Aggregations