Skip to content

Commit bc38a15

Browse files
committed
Add new ignored test for file sharing.
DEVSIX-1668
1 parent f248108 commit bc38a15

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

src/test/java/com/itextpdf/html2pdf/ResourceResolverTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ This file is part of the iText (R) project.
4949
import com.itextpdf.test.annotations.type.IntegrationTest;
5050
import org.junit.Assert;
5151
import org.junit.BeforeClass;
52+
import org.junit.Ignore;
5253
import org.junit.Test;
5354
import org.junit.experimental.categories.Category;
5455

@@ -79,6 +80,7 @@ public void resourceResolverTest03() throws IOException, InterruptedException {
7980
}
8081
Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder, "diff03_"));
8182
}
83+
8284
@Test
8385
public void resourceResolverTest07() throws IOException, InterruptedException {
8486
String outPdf = destinationFolder + "resourceResolverTest07.pdf";
@@ -316,6 +318,19 @@ public void resourceResolverTest16D() throws IOException, InterruptedException {
316318
Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder, "diff16D_"));
317319
}
318320

321+
@Test
322+
@Ignore("The path to the image shall be changed to reference some available shared file in order to run the test correctly.")
323+
public void resourceResolverTest17() throws IOException, InterruptedException {
324+
String baseUri = sourceFolder;
325+
String outPdf = destinationFolder + "resourceResolverTest17.pdf";
326+
String cmpPdf = sourceFolder + "cmp_resourceResolverTest17.pdf";
327+
try (FileInputStream fileInputStream = new FileInputStream(sourceFolder + "resourceResolverTest17.html");
328+
FileOutputStream fileOutputStream = new FileOutputStream(outPdf)) {
329+
HtmlConverter.convertToPdf(fileInputStream, fileOutputStream, new ConverterProperties().setBaseUri(baseUri));
330+
}
331+
Assert.assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, destinationFolder, "diff17_"));
332+
}
333+
319334
// TODO test with absolute http links for resources?
320335
// TODO test with http base URI?
321336
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<title>Page Title</title>
6+
</head>
7+
8+
<body>
9+
<div>
10+
<img src="File:\\\\\LERASH-PC\Users\pictures\download.jpg">
11+
</div>
12+
<div><b>The content of the document......</b></div>
13+
14+
</body>
15+
16+
</html>

0 commit comments

Comments
 (0)