Search in sources :

Example 1 with HierarchyTreeStructure

use of com.intellij.ide.hierarchy.HierarchyTreeStructure in project intellij-community by JetBrains.

the class HierarchyViewTestBase method doHierarchyTest.

protected void doHierarchyTest(final Computable<HierarchyTreeStructure> treeStructureComputable, final String... fileNames) throws Exception {
    final String[] relFilePaths = new String[fileNames.length];
    for (int i = 0; i < fileNames.length; i++) {
        relFilePaths[i] = "/" + getBasePath() + "/" + fileNames[i];
    }
    configureByFiles(null, relFilePaths);
    final String verificationFilePath = getTestDataPath() + "/" + getBasePath() + "/" + getTestName(false) + "_verification.xml";
    HierarchyTreeStructure structure = treeStructureComputable.compute();
    try {
        checkHierarchyTreeStructure(structure, JDOMUtil.load(new File(verificationFilePath)));
    } catch (Throwable e) {
        assertEquals("XML structure comparison for your convenience, actual failure details BELOW", FileUtil.loadFile(new File(verificationFilePath)), dump(structure, null, 0));
        //noinspection CallToPrintStackTrace
        e.printStackTrace();
    }
}
Also used : HierarchyTreeStructure(com.intellij.ide.hierarchy.HierarchyTreeStructure) File(java.io.File)

Aggregations

HierarchyTreeStructure (com.intellij.ide.hierarchy.HierarchyTreeStructure)1 File (java.io.File)1