/*
    * 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;
     String name;
     doc = (Document) baseT::load("staff", false);
     docType = doc.getDoctype();
     baseT::assertNotNull(docType, __LINE__, __FILE__);
     name = docType.getName();
     
     if (("image/svg+xml" == baseT::getContentType())) {
         baseT::assertEquals("svg", name, __LINE__, __FILE__);
 } else {
         baseT::assertEquals("staff", name, __LINE__, __FILE__);
 }
       
   
  }
示例#3
0
ReferenceDataType::ReferenceDataType(const DocumentType& targetDocType, int id)
    : DataType(vespalib::make_string("Reference<%s>", targetDocType.getName().c_str()), id),
      _targetDocType(targetDocType)
{
}