public void testGetResourceElementByHREF4() throws Exception { loadContentPackage1(); // Should be Null if not searching on Resources Element Element element = cpCore.getResourceElementByHREF("www.reload.ac.uk", cpCore.getRootManifestElement()); assertNull("Element should be null", element); }
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); }