You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2025/11/28 20:54:56 UTC

svn commit: r1930085 - pdfbox/branches/3.0/xmpbox/src/test/java/org/apache/xmpbox/xml

Author: tilman
Date: Fri Nov 28 20:54:55 2025
New Revision: 1930085

Log:
PDFBOX-5288: improve test coverage

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	Fri Nov 28 20:54:51 2025	(r1930084)
+++ pdfbox/branches/3.0/xmpbox/src/test/java/org/apache/xmpbox/xml/DomXmpParserTest.java	Fri Nov 28 20:54:55 2025	(r1930085)
@@ -26,6 +26,9 @@ import java.io.InputStream;
 import java.nio.charset.StandardCharsets;
 
 import org.apache.xmpbox.XMPMetadata;
+import org.apache.xmpbox.schema.XMPMediaManagementSchema;
+import org.apache.xmpbox.type.ArrayProperty;
+import org.apache.xmpbox.type.ResourceEventType;
 
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
@@ -148,6 +151,11 @@ class DomXmpParserTest
                     "</x:xmpmeta><?xpacket end=\"w\"?>";
         DomXmpParser xmpParser = new DomXmpParser();
         XMPMetadata xmp = xmpParser.parse(s.getBytes(StandardCharsets.UTF_8));
-        Assertions.assertNotNull(xmp.getXMPMediaManagementSchema());
+        XMPMediaManagementSchema xmpMediaManagementSchema = xmp.getXMPMediaManagementSchema();
+        Assertions.assertEquals("uidd:1f0e03977b90b6365a376454ffdf34a7", xmpMediaManagementSchema.getDocumentID());
+        ArrayProperty historyProperty = xmpMediaManagementSchema.getHistoryProperty();
+        ResourceEventType firstHistoryEntry = (ResourceEventType) historyProperty.getAllProperties().iterator().next();
+        Assertions.assertEquals("created", firstHistoryEntry.getAction());
+        Assertions.assertEquals("iDRS PDF output engine 7", firstHistoryEntry.getParameters());
     }
 }