Ejemplo n.º 1
0
   /*
    * Runs the test case.
    */
   void runTest()
   {
      Document doc;
      DocumentType docType;
      String docTypeName;
      String nodeValue;
      NamedNodeMap attributes;
      doc = (Document) baseT::load("hc_staff", false);
      docType = doc.getDoctype();
      
      if (
    !(("text/html" == baseT::getContentType()))
) {
          baseT::assertNotNull(docType, __LINE__, __FILE__);
      }
    
      if ((baseT::notNull(docType))) {
          docTypeName = docType.getName();
      
      if (("image/svg+xml" == baseT::getContentType())) {
          baseT::assertEquals("svg", docTypeName, __LINE__, __FILE__);
  } else {
          baseT::assertEquals("html", docTypeName, __LINE__, __FILE__);
  }
        
    nodeValue = docType.getNodeValue();
      baseT::assertNull(nodeValue, __LINE__, __FILE__);
      attributes = docType.getAttributes();
      baseT::assertNull(attributes, __LINE__, __FILE__);
      }
    
   }
 /*
  * Runs the test case.
  */
 void runTest()
 {
    Document doc;
    DocumentType docType;
    NamedNodeMap attrList;
    doc = (Document) baseT::load("staff", false);
    docType = doc.getDoctype();
    baseT::assertNotNull(docType, __LINE__, __FILE__);
    attrList = docType.getAttributes();
    baseT::assertNull(attrList, __LINE__, __FILE__);
    
 }