Beispiel #1
0
 public void testGetElementHREF2() throws Exception {
   loadContentPackage1();
   // External
   Element element =
       cpCore.getElementByIdentifier(cpCore.getRootManifestElement(), CP_Package1.ITEM3_ID);
   String url = cpCore.getElementHREF(element);
   assertEquals("ElementHREF not correct", CP_Package1.ITEM3_HREF, url);
 }
Beispiel #2
0
 public void testGetElementHREF3() throws Exception {
   loadContentPackage1();
   // Backslash converted to forward
   Element element =
       cpCore.getElementByIdentifier(cpCore.getRootManifestElement(), CP_Package1.ITEM5_ID);
   String url = cpCore.getElementHREF(element);
   assertEquals("ElementHREF not correct", "bogus/backslash", url);
 }
Beispiel #3
0
 public void testGetElementHREF1() throws Exception {
   loadContentPackage1();
   // Local
   Element element =
       cpCore.getElementByIdentifier(cpCore.getRootManifestElement(), CP_Package1.ITEM1_ID);
   String url = cpCore.getElementHREF(element);
   assertEquals("ElementHREF not correct", "zappa/0-intro.html", url);
 }
Beispiel #4
0
 public void testGetElementHREF5() throws Exception {
   loadContentPackage1();
   // External with NO base attribute prefix
   Element element =
       cpCore.getElementByIdentifier(
           cpCore.getRootManifestElement(), CP_Package1.SUBMANIFEST_ITEM1_ID);
   String url = cpCore.getElementHREF(element);
   assertEquals("ElementHREF not correct", CP_Package1.SUBMANIFEST_RESOURCE1_HREF, url);
 }