Search in sources :

Example 1 with SmartRefElementPointer

use of com.intellij.codeInspection.reference.SmartRefElementPointer in project intellij-community by JetBrains.

the class EntryPointsConverterTest method doTest.

private static void doTest(String type, String fqName, String expectedFQName) throws Exception {
    final Element entryPoints = setUpEntryPoint(type, fqName);
    final HashMap<String, SmartRefElementPointer> persistentEntryPoints = new HashMap<>();
    EntryPointsManagerBase.convert(entryPoints, persistentEntryPoints);
    final Element testElement = new Element("comp");
    EntryPointsManagerBase.writeExternal(testElement, persistentEntryPoints, new JDOMExternalizableStringList());
    final Element expectedEntryPoints = setUpEntryPoint(type, expectedFQName);
    expectedEntryPoints.setAttribute("version", "2.0");
    final Element expected = new Element("comp");
    expected.addContent(expectedEntryPoints);
    assertTrue(JDOMUtil.areElementsEqual(testElement, expected));
}
Also used : JDOMExternalizableStringList(com.intellij.openapi.util.JDOMExternalizableStringList) HashMap(com.intellij.util.containers.HashMap) Element(org.jdom.Element) SmartRefElementPointer(com.intellij.codeInspection.reference.SmartRefElementPointer)

Aggregations

SmartRefElementPointer (com.intellij.codeInspection.reference.SmartRefElementPointer)1 JDOMExternalizableStringList (com.intellij.openapi.util.JDOMExternalizableStringList)1 HashMap (com.intellij.util.containers.HashMap)1 Element (org.jdom.Element)1