Code example for Document

Methods: getImplementation

0
    * Runs the test case. 
    * @throws Throwable Any uncaught exception causes test to fail 
    */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "getPublicId", 
        args = {} 
    ) 
   public void testGetPublicId() throws Throwable { 
      Document doc;
      DocumentType docType;
      DOMImplementation domImpl;
      String publicId;
      String nullNS = null;
 
      doc = (Document) load("staffNS", builder);
      domImpl = doc.getImplementation();
      docType = domImpl.createDocumentType("l2:root", "PUB", nullNS);
      publicId = docType.getPublicId();
      assertEquals("documenttypepublicid01", "PUB", publicId);