@@ -49,6 +49,7 @@ This file is part of the iText (R) project.
4949import com .itextpdf .test .annotations .type .IntegrationTest ;
5050import org .junit .Assert ;
5151import org .junit .BeforeClass ;
52+ import org .junit .Ignore ;
5253import org .junit .Test ;
5354import org .junit .experimental .categories .Category ;
5455
@@ -118,6 +119,60 @@ public void resourceResolverTest11() throws IOException, InterruptedException {
118119 Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff11_" ));
119120 }
120121
122+ @ Test
123+ @ Ignore ("DEVSIX-1668" )
124+ public void resourceResolverTest12 () throws IOException , InterruptedException {
125+ String baseUri = sourceFolder + "path with spaces" ;
126+
127+ String outPdf = destinationFolder + "resourceResolverTest12.pdf" ;
128+ String cmpPdf = sourceFolder + "cmp_resourceResolverTest12.pdf" ;
129+ try (FileInputStream fileInputStream = new FileInputStream (sourceFolder + "resourceResolverTest12.html" );
130+ FileOutputStream fileOutputStream = new FileOutputStream (outPdf )) {
131+ HtmlConverter .convertToPdf (fileInputStream , fileOutputStream , new ConverterProperties ().setBaseUri (baseUri ));
132+ }
133+ Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff12_" ));
134+ }
135+
136+ @ Test
137+ public void resourceResolverTest13 () throws IOException , InterruptedException {
138+ String baseUri = sourceFolder ;
139+
140+ String outPdf = destinationFolder + "resourceResolverTest13.pdf" ;
141+ String cmpPdf = sourceFolder + "cmp_resourceResolverTest13.pdf" ;
142+ try (FileInputStream fileInputStream = new FileInputStream (sourceFolder + "resourceResolverTest13.html" );
143+ FileOutputStream fileOutputStream = new FileOutputStream (outPdf )) {
144+ HtmlConverter .convertToPdf (fileInputStream , fileOutputStream , new ConverterProperties ().setBaseUri (baseUri ));
145+ }
146+ Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff13_" ));
147+ }
148+
149+ @ Test
150+ @ Ignore ("DEVSIX-1668" )
151+ public void resourceResolverTest14 () throws IOException , InterruptedException {
152+ String baseUri = sourceFolder + "path%20with%20spaces" ;
153+
154+ String outPdf = destinationFolder + "resourceResolverTest14.pdf" ;
155+ String cmpPdf = sourceFolder + "cmp_resourceResolverTest14.pdf" ;
156+ try (FileInputStream fileInputStream = new FileInputStream (sourceFolder + "resourceResolverTest12.html" );
157+ FileOutputStream fileOutputStream = new FileOutputStream (outPdf )) {
158+ HtmlConverter .convertToPdf (fileInputStream , fileOutputStream , new ConverterProperties ().setBaseUri (baseUri ));
159+ }
160+ Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff14_" ));
161+ }
162+
163+ @ Test
164+ public void resourceResolverTest15 () throws IOException , InterruptedException {
165+ String baseUri = sourceFolder ;
166+
167+ String outPdf = destinationFolder + "resourceResolverTest15.pdf" ;
168+ String cmpPdf = sourceFolder + "cmp_resourceResolverTest15.pdf" ;
169+ try (FileInputStream fileInputStream = new FileInputStream (sourceFolder + "resourceResolverTest15.html" );
170+ FileOutputStream fileOutputStream = new FileOutputStream (outPdf )) {
171+ HtmlConverter .convertToPdf (fileInputStream , fileOutputStream , new ConverterProperties ().setBaseUri (baseUri ));
172+ }
173+ Assert .assertNull (new CompareTool ().compareByContent (outPdf , cmpPdf , destinationFolder , "diff15_" ));
174+ }
175+
121176 // TODO test with absolute http links for resources?
122177 // TODO test with http base URI?
123178}
0 commit comments