Author: tilman
Date: Mon Dec 29 09:38:19 2025
New Revision: 1930957
Log:
PDFBOX-6133: expand test
Modified:
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/xml/DomXmpParserTest.java
Modified:
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/xml/DomXmpParserTest.java
==============================================================================
---
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/xml/DomXmpParserTest.java
Mon Dec 29 08:30:17 2025 (r1930956)
+++
pdfbox/branches/2.0/xmpbox/src/test/java/org/apache/xmpbox/xml/DomXmpParserTest.java
Mon Dec 29 09:38:19 2025 (r1930957)
@@ -1578,7 +1578,7 @@ public class DomXmpParserTest
}
@Test
- public void testPDFBox6133() throws IOException, XmpParsingException
+ public void testPDFBox6133() throws IOException, XmpParsingException,
BadFieldValueException
{
// Namespace is used both for the schema and the type,
// and that there are two types with the same namespace
@@ -1589,6 +1589,17 @@ public class DomXmpParserTest
assertEquals("[TotalNumberOfPages=RealType:47.0]",
epaSchema.getProperty("TotalNumberOfPages").toString());
DefinedStructuredType pub = (DefinedStructuredType)
epaSchema.getProperty("Publication");
assertEquals("[CountryCode=TextType:EP]",
pub.getProperty("CountryCode").toString());
+ ArrayProperty classification = (ArrayProperty)
epaSchema.getProperty("Classification");
+ assertEquals(4, classification.getAllProperties().size());
+ TextType class3 = (TextType) classification.getAllProperties().get(3);
+ assertEquals("A61K 39/215 20060101ALI20160203BHEP",
class3.getStringValue());
+ assertEquals("CORONAVIRUS",
epaSchema.getUnqualifiedLanguagePropertyValue("Title", "de"));
+ ArrayProperty documentStructure = (ArrayProperty)
epaSchema.getProperty("DocumentStructure");
+ assertEquals(5, documentStructure.getAllProperties().size());
+ DefinedStructuredType struct4 = (DefinedStructuredType)
documentStructure.getAllProperties().get(4);
+ assertEquals("[DocumentSection=TextType:cited-references]",
struct4.getProperty("DocumentSection").toString());
+ assertEquals("[StartPage=RealType:47.0]",
struct4.getProperty("StartPage").toString());
+ assertEquals("[NumberOfPages=RealType:1.0]",
struct4.getProperty("NumberOfPages").toString());
is.close();
}