Skip to content

Commit 8fb7b56

Browse files
author
Dmitry Radchuk
committed
Add a test for xmp node in java
1 parent f89665b commit 8fb7b56

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.itextpdf.kernel.xmp.impl;
2+
3+
import com.itextpdf.kernel.xmp.XMPException;
4+
import com.itextpdf.kernel.xmp.options.PropertyOptions;
5+
import com.itextpdf.test.AssertUtil;
6+
import com.itextpdf.test.ExtendedITextTest;
7+
import com.itextpdf.test.annotations.type.UnitTest;
8+
import org.junit.Test;
9+
import org.junit.experimental.categories.Category;
10+
11+
@Category(UnitTest.class)
12+
public class XMPNodeTest extends ExtendedITextTest {
13+
@Test
14+
public void test() throws XMPException {
15+
XMPNode node = new XMPNode("rdf:RDF", "idk", new PropertyOptions());
16+
node.addChild(new XMPNode("rdf:Description", "idk", new PropertyOptions()));
17+
for (Object object : node.getUnmodifiableChildren()) {
18+
AssertUtil.doesNotThrow(() ->
19+
node.addChild(new XMPNode("xmp:Authors", "itext", new PropertyOptions().setArrayAlternate(true))));
20+
}
21+
}
22+
}

sharpenConfiguration.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@
416416
<file path="com/itextpdf/kernel/xmp/XmlDomWriter.java"/>
417417
<file path="com/itextpdf/kernel/xmp/XMPDateTime.java"/>
418418
<file path="com/itextpdf/kernel/xmp/XMPDateTimeFactory.java"/>
419+
<file path="com/itextpdf/kernel/xmp/impl/XMPNodeTest.java"/>
419420
<!-- layout -->
420421
<fileset reason="XMLReader has different implementation in .NET and Java">
421422
<file path="com/itextpdf/layout/hyphenation/PatternParser.java"/>

0 commit comments

Comments
 (0)