Author: tilman
Date: Mon Dec 29 09:38:25 2025
New Revision: 1930958
Log:
PDFBOX-6133: expand test
Modified:
pdfbox/branches/3.0/xmpbox/src/test/java/org/apache/xmpbox/xml/DomXmpParserTest.java
Modified:
pdfbox/branches/3.0/xmpbox/src/test/java/org/apache/xmpbox/xml/DomXmpParserTest.java
==============================================================================
---
pdfbox/branches/3.0/xmpbox/src/test/java/org/apache/xmpbox/xml/DomXmpParserTest.java
Mon Dec 29 09:38:19 2025 (r1930957)
+++
pdfbox/branches/3.0/xmpbox/src/test/java/org/apache/xmpbox/xml/DomXmpParserTest.java
Mon Dec 29 09:38:25 2025 (r1930958)
@@ -1500,7 +1500,7 @@ class DomXmpParserTest
}
@Test
- void testPDFBox6133() throws IOException, XmpParsingException
+ 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
@@ -1512,6 +1512,17 @@ 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());
}
}