Skip to content

Commit 1d72156

Browse files
BlackEgoistSnipx
authored andcommitted
Add outlines with invalid parent links test
DEVSIX-3703 DEVSIX-4243
1 parent 776c709 commit 1d72156

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

kernel/src/test/java/com/itextpdf/kernel/pdf/PdfOutlineTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,16 @@ public void updateOutlineTitle() throws IOException, InterruptedException {
216216
Assert.assertNull(new CompareTool().compareByContent(destinationFolder + filename, sourceFolder + "cmp_" + filename, destinationFolder, "diff_"));
217217
}
218218

219+
@Test
220+
public void getOutlinesInvalidParentLink() throws IOException, InterruptedException {
221+
junitExpectedException.expect(NullPointerException.class);
222+
PdfReader reader = new PdfReader(sourceFolder + "outlinesInvalidParentLink.pdf");
223+
String filename = "updateOutlineTitleInvalidParentLink.pdf";
224+
PdfWriter writer = new PdfWriter(destinationFolder + filename);
225+
PdfDocument pdfDoc = new PdfDocument(reader, writer);
226+
PdfOutline outlines = pdfDoc.getOutlines(false);
227+
}
228+
219229
@Test
220230
public void readOutlineTitle() throws IOException {
221231
String filename = sourceFolder + "updateOutlineTitleResult.pdf";

0 commit comments

Comments
 (0)