File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
xmpbox/src/test/java/org/apache/xmpbox/xml Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 2626import java .nio .charset .StandardCharsets ;
2727
2828import org .apache .xmpbox .XMPMetadata ;
29+ import org .apache .xmpbox .schema .XMPMediaManagementSchema ;
30+ import org .apache .xmpbox .type .ArrayProperty ;
31+ import org .apache .xmpbox .type .ResourceEventType ;
2932
3033import org .junit .jupiter .api .Assertions ;
3134import org .junit .jupiter .api .Test ;
@@ -148,6 +151,11 @@ void testPDFBox5288() throws XmpParsingException
148151 "</x:xmpmeta><?xpacket end=\" w\" ?>" ;
149152 DomXmpParser xmpParser = new DomXmpParser ();
150153 XMPMetadata xmp = xmpParser .parse (s .getBytes (StandardCharsets .UTF_8 ));
151- Assertions .assertNotNull (xmp .getXMPMediaManagementSchema ());
154+ XMPMediaManagementSchema xmpMediaManagementSchema = xmp .getXMPMediaManagementSchema ();
155+ Assertions .assertEquals ("uidd:1f0e03977b90b6365a376454ffdf34a7" , xmpMediaManagementSchema .getDocumentID ());
156+ ArrayProperty historyProperty = xmpMediaManagementSchema .getHistoryProperty ();
157+ ResourceEventType firstHistoryEntry = (ResourceEventType ) historyProperty .getAllProperties ().iterator ().next ();
158+ Assertions .assertEquals ("created" , firstHistoryEntry .getAction ());
159+ Assertions .assertEquals ("iDRS PDF output engine 7" , firstHistoryEntry .getParameters ());
152160 }
153161}
You can’t perform that action at this time.
0 commit comments