@@ -89,6 +89,38 @@ public void resourceResolverTest07() throws IOException, InterruptedException {
89
89
Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff07_" ));
90
90
}
91
91
92
+ @ Test
93
+ @ LogMessages (messages = @ LogMessage (messageTemplate = LogMessageConstant .NO_WORKER_FOUND_FOR_TAG , count = 1 ))
94
+ public void resourceResolverTest07A () throws IOException , InterruptedException {
95
+ String baseUri = sourceFolder + "%23r%e%2525s@o%25urces/" ;
96
+
97
+ String outPdf = destinationFolder + "resourceResolverTest07A.pdf" ;
98
+ String cmpPdf = sourceFolder + "cmp_resourceResolverTest07A.pdf" ;
99
+ try (FileInputStream fileInputStream = new FileInputStream (sourceFolder + "resourceResolverTest07A.html" );
100
+ FileOutputStream fileOutputStream = new FileOutputStream (outPdf )) {
101
+ HtmlConverter .convertToPdf (fileInputStream , fileOutputStream , new ConverterProperties ().setBaseUri (baseUri ));
102
+ }
103
+ Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff07A_" ));
104
+ }
105
+
106
+ @ Test
107
+ public void resourceResolverTest07B () throws IOException , InterruptedException {
108
+ String outPdf = destinationFolder + "resourceResolverTest07B.pdf" ;
109
+ String cmpPdf = sourceFolder + "cmp_resourceResolverTest07B.pdf" ;
110
+ HtmlConverter .convertToPdf (new File (sourceFolder + "#r%e%25s@o%urces/resourceResolverTest07B.html" ), new File (outPdf ));
111
+ Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff07B_" ));
112
+ }
113
+
114
+ @ Test
115
+ @ LogMessages (messages = @ LogMessage (messageTemplate = LogMessageConstant .NO_WORKER_FOUND_FOR_TAG , count = 1 ))
116
+ public void resourceResolverTest07C () throws IOException , InterruptedException {
117
+ String outPdf = destinationFolder + "resourceResolverTest07C.pdf" ;
118
+ String cmpPdf = sourceFolder + "cmp_resourceResolverTest07C.pdf" ;
119
+ HtmlConverter .convertToPdf (new File (sourceFolder + "#r%e%25s@o%urces/resourceResolverTest07C.html" ), new File (outPdf ),
120
+ new ConverterProperties ().setBaseUri (sourceFolder + "#r%e%25s@o%urces/.." ));
121
+ Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff07C_" ));
122
+ }
123
+
92
124
@ Test
93
125
public void resourceResolverTest09 () throws IOException , InterruptedException {
94
126
String outPdf = destinationFolder + "resourceResolverTest09.pdf" ;
@@ -120,44 +152,101 @@ public void resourceResolverTest11() throws IOException, InterruptedException {
120
152
}
121
153
122
154
@ Test
123
- @ Ignore ( "DEVSIX-1668" )
124
- public void resourceResolverTest12 () throws IOException , InterruptedException {
125
- String baseUri = sourceFolder + "path with spaces" ;
155
+ @ LogMessages ( messages = @ LogMessage ( messageTemplate = LogMessageConstant . NO_WORKER_FOUND_FOR_TAG , count = 1 ) )
156
+ public void resourceResolverTest12A () throws IOException , InterruptedException {
157
+ String baseUri = sourceFolder + "path% with% spaces/ " ;
126
158
127
- String outPdf = destinationFolder + "resourceResolverTest12 .pdf" ;
128
- String cmpPdf = sourceFolder + "cmp_resourceResolverTest12 .pdf" ;
129
- try (FileInputStream fileInputStream = new FileInputStream (sourceFolder + "resourceResolverTest12 .html" );
159
+ String outPdf = destinationFolder + "resourceResolverTest12A .pdf" ;
160
+ String cmpPdf = sourceFolder + "cmp_resourceResolverTest12A .pdf" ;
161
+ try (FileInputStream fileInputStream = new FileInputStream (sourceFolder + "resourceResolverTest12A .html" );
130
162
FileOutputStream fileOutputStream = new FileOutputStream (outPdf )) {
131
163
HtmlConverter .convertToPdf (fileInputStream , fileOutputStream , new ConverterProperties ().setBaseUri (baseUri ));
132
164
}
133
- Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff12_ " ));
165
+ Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff12A_ " ));
134
166
}
135
167
136
168
@ Test
137
- public void resourceResolverTest13 () throws IOException , InterruptedException {
138
- String baseUri = sourceFolder ;
169
+ @ LogMessages (messages = @ LogMessage (messageTemplate = LogMessageConstant .NO_WORKER_FOUND_FOR_TAG , count = 1 ))
170
+ public void resourceResolverTest12B () throws IOException , InterruptedException {
171
+ String baseUri = sourceFolder + "path%25with%25spaces/" ;
139
172
140
- String outPdf = destinationFolder + "resourceResolverTest13 .pdf" ;
141
- String cmpPdf = sourceFolder + "cmp_resourceResolverTest13 .pdf" ;
142
- try (FileInputStream fileInputStream = new FileInputStream (sourceFolder + "resourceResolverTest13 .html" );
173
+ String outPdf = destinationFolder + "resourceResolverTest12B .pdf" ;
174
+ String cmpPdf = sourceFolder + "cmp_resourceResolverTest12B .pdf" ;
175
+ try (FileInputStream fileInputStream = new FileInputStream (sourceFolder + "resourceResolverTest12B .html" );
143
176
FileOutputStream fileOutputStream = new FileOutputStream (outPdf )) {
144
177
HtmlConverter .convertToPdf (fileInputStream , fileOutputStream , new ConverterProperties ().setBaseUri (baseUri ));
145
178
}
146
- Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff13_" ));
179
+ Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff12B_" ));
180
+ }
181
+
182
+ @ Test
183
+ @ LogMessages (messages = @ LogMessage (messageTemplate = LogMessageConstant .NO_WORKER_FOUND_FOR_TAG , count = 1 ))
184
+ public void resourceResolverTest12C () throws IOException , InterruptedException {
185
+ String baseUri = sourceFolder + "path%2525with%2525spaces/" ;
186
+
187
+ String outPdf = destinationFolder + "resourceResolverTest12C.pdf" ;
188
+ String cmpPdf = sourceFolder + "cmp_resourceResolverTest12C.pdf" ;
189
+ try (FileInputStream fileInputStream = new FileInputStream (sourceFolder + "resourceResolverTest12C.html" );
190
+ FileOutputStream fileOutputStream = new FileOutputStream (outPdf )) {
191
+ HtmlConverter .convertToPdf (fileInputStream , fileOutputStream , new ConverterProperties ().setBaseUri (baseUri ));
192
+ }
193
+ Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff12C_" ));
194
+ }
195
+
196
+
197
+ @ Test
198
+ @ LogMessages (messages = @ LogMessage (messageTemplate = LogMessageConstant .NO_WORKER_FOUND_FOR_TAG , count = 1 ))
199
+ public void resourceResolverTest12D () throws IOException , InterruptedException {
200
+ String baseUri = sourceFolder + "path with spaces/" ;
201
+
202
+ String outPdf = destinationFolder + "resourceResolverTest12D.pdf" ;
203
+ String cmpPdf = sourceFolder + "cmp_resourceResolverTest12D.pdf" ;
204
+ try (FileInputStream fileInputStream = new FileInputStream (sourceFolder + "resourceResolverTest12D.html" );
205
+ FileOutputStream fileOutputStream = new FileOutputStream (outPdf )) {
206
+ HtmlConverter .convertToPdf (fileInputStream , fileOutputStream , new ConverterProperties ().setBaseUri (baseUri ));
207
+ }
208
+ Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff12D_" ));
209
+ }
210
+
211
+ @ Test
212
+ @ LogMessages (messages = @ LogMessage (messageTemplate = LogMessageConstant .NO_WORKER_FOUND_FOR_TAG , count = 1 ))
213
+ public void resourceResolverTest12E () throws IOException , InterruptedException {
214
+ String baseUri = sourceFolder + "path%20with%20spaces/" ;
215
+
216
+ String outPdf = destinationFolder + "resourceResolverTest12E.pdf" ;
217
+ String cmpPdf = sourceFolder + "cmp_resourceResolverTest12E.pdf" ;
218
+ try (FileInputStream fileInputStream = new FileInputStream (sourceFolder + "resourceResolverTest12E.html" );
219
+ FileOutputStream fileOutputStream = new FileOutputStream (outPdf )) {
220
+ HtmlConverter .convertToPdf (fileInputStream , fileOutputStream , new ConverterProperties ().setBaseUri (baseUri ));
221
+ }
222
+ Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff12E_" ));
147
223
}
148
224
149
225
@ Test
150
- @ Ignore ( "DEVSIX-1668" )
151
- public void resourceResolverTest14 () throws IOException , InterruptedException {
152
- String baseUri = sourceFolder + "path%20with%20spaces " ;
226
+ @ LogMessages ( messages = @ LogMessage ( messageTemplate = LogMessageConstant . NO_WORKER_FOUND_FOR_TAG , count = 1 ) )
227
+ public void resourceResolverTest12F () throws IOException , InterruptedException {
228
+ String baseUri = sourceFolder + "path%2520with%2520spaces/ " ;
153
229
154
- String outPdf = destinationFolder + "resourceResolverTest14 .pdf" ;
155
- String cmpPdf = sourceFolder + "cmp_resourceResolverTest14 .pdf" ;
156
- try (FileInputStream fileInputStream = new FileInputStream (sourceFolder + "resourceResolverTest12 .html" );
230
+ String outPdf = destinationFolder + "resourceResolverTest12F .pdf" ;
231
+ String cmpPdf = sourceFolder + "cmp_resourceResolverTest12F .pdf" ;
232
+ try (FileInputStream fileInputStream = new FileInputStream (sourceFolder + "resourceResolverTest12F .html" );
157
233
FileOutputStream fileOutputStream = new FileOutputStream (outPdf )) {
158
234
HtmlConverter .convertToPdf (fileInputStream , fileOutputStream , new ConverterProperties ().setBaseUri (baseUri ));
159
235
}
160
- Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff14_" ));
236
+ Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff12F_" ));
237
+ }
238
+
239
+ @ Test
240
+ public void resourceResolverTest13 () throws IOException , InterruptedException {
241
+ String baseUri = sourceFolder ;
242
+
243
+ String outPdf = destinationFolder + "resourceResolverTest13.pdf" ;
244
+ String cmpPdf = sourceFolder + "cmp_resourceResolverTest13.pdf" ;
245
+ try (FileInputStream fileInputStream = new FileInputStream (sourceFolder + "resourceResolverTest13.html" );
246
+ FileOutputStream fileOutputStream = new FileOutputStream (outPdf )) {
247
+ HtmlConverter .convertToPdf (fileInputStream , fileOutputStream , new ConverterProperties ().setBaseUri (baseUri ));
248
+ }
249
+ Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff13_" ));
161
250
}
162
251
163
252
@ Test
@@ -173,6 +262,61 @@ public void resourceResolverTest15() throws IOException, InterruptedException {
173
262
Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff15_" ));
174
263
}
175
264
265
+ @ Test
266
+ @ LogMessages (messages = @ LogMessage (messageTemplate = LogMessageConstant .NO_WORKER_FOUND_FOR_TAG , count = 1 ))
267
+ public void resourceResolverTest16A () throws IOException , InterruptedException {
268
+ String baseUri = sourceFolder + "path/with/spaces/" ;
269
+
270
+ String outPdf = destinationFolder + "resourceResolverTest16A.pdf" ;
271
+ String cmpPdf = sourceFolder + "cmp_resourceResolverTest16A.pdf" ;
272
+ try (FileInputStream fileInputStream = new FileInputStream (sourceFolder + "resourceResolverTest16A.html" );
273
+ FileOutputStream fileOutputStream = new FileOutputStream (outPdf )) {
274
+ HtmlConverter .convertToPdf (fileInputStream , fileOutputStream , new ConverterProperties ().setBaseUri (baseUri ));
275
+ }
276
+ Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff16A_" ));
277
+ }
278
+
279
+ @ Test
280
+ @ LogMessages (messages = @ LogMessage (messageTemplate = LogMessageConstant .NO_WORKER_FOUND_FOR_TAG , count = 1 ))
281
+ public void resourceResolverTest16B () throws IOException , InterruptedException {
282
+ String baseUri = sourceFolder + "path%2Fwith%2Fspaces/" ;
283
+
284
+ String outPdf = destinationFolder + "resourceResolverTest16B.pdf" ;
285
+ String cmpPdf = sourceFolder + "cmp_resourceResolverTest16B.pdf" ;
286
+ try (FileInputStream fileInputStream = new FileInputStream (sourceFolder + "resourceResolverTest16B.html" );
287
+ FileOutputStream fileOutputStream = new FileOutputStream (outPdf )) {
288
+ HtmlConverter .convertToPdf (fileInputStream , fileOutputStream , new ConverterProperties ().setBaseUri (baseUri ));
289
+ }
290
+ Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff16B_" ));
291
+ }
292
+
293
+ @ Test
294
+ @ LogMessages (messages = @ LogMessage (messageTemplate = LogMessageConstant .NO_WORKER_FOUND_FOR_TAG , count = 1 ))
295
+ public void resourceResolverTest16C () throws IOException , InterruptedException {
296
+ String baseUri = sourceFolder + "path%252Fwith%252Fspaces/" ;
297
+
298
+ String outPdf = destinationFolder + "resourceResolverTest16C.pdf" ;
299
+ String cmpPdf = sourceFolder + "cmp_resourceResolverTest16C.pdf" ;
300
+ try (FileInputStream fileInputStream = new FileInputStream (sourceFolder + "resourceResolverTest16C.html" );
301
+ FileOutputStream fileOutputStream = new FileOutputStream (outPdf )) {
302
+ HtmlConverter .convertToPdf (fileInputStream , fileOutputStream , new ConverterProperties ().setBaseUri (baseUri ));
303
+ }
304
+ Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff16C_" ));
305
+ }
306
+
307
+ @ Test
308
+ @ LogMessages (messages = @ LogMessage (messageTemplate = LogMessageConstant .NO_WORKER_FOUND_FOR_TAG , count = 1 ))
309
+ public void resourceResolverTest16D () throws IOException , InterruptedException {
310
+ String baseUri = sourceFolder + "path%25252Fwith%25252Fspaces/" ;
311
+
312
+ String outPdf = destinationFolder + "resourceResolverTest16D.pdf" ;
313
+ String cmpPdf = sourceFolder + "cmp_resourceResolverTest16D.pdf" ;
314
+ try (FileInputStream fileInputStream = new FileInputStream (sourceFolder + "resourceResolverTest16D.html" );
315
+ FileOutputStream fileOutputStream = new FileOutputStream (outPdf )) {
316
+ HtmlConverter .convertToPdf (fileInputStream , fileOutputStream , new ConverterProperties ().setBaseUri (baseUri ));
317
+ }
318
+ Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff16D_" ));
319
+ }
176
320
// TODO test with absolute http links for resources?
177
321
// TODO test with http base URI?
178
322
}
0 commit comments