public void testGetReferencedElement3() throws Exception { loadContentPackage1(); // Organization -> should not reference anything, should return null Element element = cpCore.getElementByIdentifier(cpCore.getRootManifestElement(), CP_Package1.ORG1_ID); Element refElement = cpCore.getReferencedElement(element); assertNull("Referenced Element should be null", refElement); }
public void testGetReferencedElement2() throws Exception { loadContentPackage1(); // Item -> sub-Manifest Element element = cpCore.getElementByIdentifier(cpCore.getRootManifestElement(), CP_Package1.ITEM4_ID); Element refElement = cpCore.getReferencedElement(element); assertEquals( "Could not get referenced Element", CP_Package1.SUB_MANIFEST1_ID, refElement.getAttributeValue(CP_Core.IDENTIFIER)); }