public void testGetResourceElementByHREF2() throws Exception { loadContentPackage1(); // %20 Element resources = cpCore.getResourcesElement(cpCore.getRootManifestElement()); Element element = cpCore.getResourceElementByHREF("Another%20File.txt", resources); assertEquals( "Wrong Resource Element", element.getAttributeValue(CP_Core.IDENTIFIER), CP_Package1.RESOURCE2_ID); }
public void testGetResourceElementByHREF3() throws Exception { loadContentPackage1(); // URL Element resources = cpCore.getResourcesElement(cpCore.getRootManifestElement()); Element element = cpCore.getResourceElementByHREF("www.reload.ac.uk", resources); assertEquals( "Wrong Resource Element", element.getAttributeValue(CP_Core.IDENTIFIER), CP_Package1.RESOURCE3_ID); }
public void testGetResourceElementByHREF1() throws Exception { loadContentPackage1(); // Normal Element resources = cpCore.getResourcesElement(cpCore.getRootManifestElement()); Element element = cpCore.getResourceElementByHREF("zappa/0-intro.html", resources); assertEquals( "Wrong Resource Element", element.getAttributeValue(CP_Core.IDENTIFIER), CP_Package1.RESOURCE1_ID); }
public void testGetResourcesElement1() throws Exception { loadContentPackage1(); // Root manifest Element manifest = cpCore.getRootManifestElement(); Element element = cpCore.getResourcesElement(manifest); assertEquals("Wrong Resources Element", CP_Core.RESOURCES, element.getName()); assertEquals( "Wrong Resources Element", CP_Package1.MANIFEST1_ID, manifest.getAttributeValue(CP_Core.IDENTIFIER)); }