File tree Expand file tree Collapse file tree 2 files changed +20
-246
lines changed
main/java/com/itextpdf/kernel/pdf/function
test/java/com/itextpdf/kernel/actions/events Expand file tree Collapse file tree 2 files changed +20
-246
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -141,6 +141,15 @@ public void doActionNullDocumentTest() {
141
141
AssertUtil .doesNotThrow (() -> closeEvent .doAction ());
142
142
}
143
143
144
+ @ Test
145
+ public void doActionNullEventMapTest () throws IOException {
146
+ try (PdfDocument document = new DummyPdfDocument (new PdfReader (SOURCE_FOLDER + "hello.pdf" ))) {
147
+ AssertUtil .doesNotThrow (() -> new FlushPdfDocumentEvent (document ).doAction ());
148
+ Assert .assertTrue (document .getDocumentInfo ().getProducer ()
149
+ .contains ("Apryse Group NV (no registered products)" ));
150
+ }
151
+ }
152
+
144
153
@ Test
145
154
public void flushEventAfterEachEventTest () throws IOException {
146
155
String resourceInit = SOURCE_FOLDER + "hello.pdf" ;
@@ -157,6 +166,17 @@ public void flushEventAfterEachEventTest() throws IOException {
157
166
}
158
167
}
159
168
169
+ private static class DummyPdfDocument extends PdfDocument {
170
+
171
+ public DummyPdfDocument (PdfReader reader ) {
172
+ super (reader );
173
+ }
174
+
175
+ public SequenceId getDocumentIdWrapper () {
176
+ return null ;
177
+ }
178
+ }
179
+
160
180
private static class TestProductEventProcessor implements ITextProductEventProcessor {
161
181
private final String processorId ;
162
182
You can’t perform that action at this time.
0 commit comments