public void testGetElementsInManifest4() throws Exception { loadContentPackage1(); // Metadata Element[] elements = cpCore.getElementsInManifest( cpCore.getRootManifestElement(), MD_Core.ROOT_NAME, IMSMD_NAMESPACE_122); assertTrue("Metadata Elements should be found", elements.length > 0); }
public void testGetElementsInManifest3() throws Exception { loadContentPackage1(); // Bogus Element[] elements = cpCore.getElementsInManifest( cpCore.getRootManifestElement(), "bogus", cpCore.getRootManifestElement().getNamespace()); assertEquals("Elements should be Empty", 0, elements.length); }
public void testGetElementsInManifest2() throws Exception { loadContentPackage1(); // Organizations Element[] elements = cpCore.getElementsInManifest( cpCore.getRootManifestElement(), CP_Core.ORGANIZATION, cpCore.getRootManifestElement().getNamespace()); assertTrue("List should not be empty", elements.length > 0); for (int i = 0; i < elements.length; i++) { Element element = elements[i]; assertEquals("Element should be an Organization", CP_Core.ORGANIZATION, element.getName()); } }
public void testGetElementsInManifest1() throws Exception { loadContentPackage1(); // Resources Element[] elements = cpCore.getElementsInManifest( cpCore.getRootManifestElement(), CP_Core.RESOURCE, cpCore.getRootManifestElement().getNamespace()); assertTrue("List should not be empty", elements.length > 0); for (int i = 0; i < elements.length; i++) { Element element = elements[i]; assertEquals("Element should be a Resource", CP_Core.RESOURCE, element.getName()); } }