Skip to content

Commit df762d4

Browse files
committed
change input apache-fop
1 parent eb49512 commit df762d4

13 files changed

Lines changed: 1630 additions & 61 deletions

File tree

‎apache-fop/src/test/java/org/baeldung/java/ApacheFOPConvertHTMLTest.java‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@
2626
import org.w3c.tidy.Tidy;
2727

2828
public class ApacheFOPConvertHTMLTest {
29-
private String inputFile = "src/test/resources/hello.html";
29+
private String inputFile = "src/test/resources/input.html";
3030
private String style = "src/test/resources/xhtml2fo.xsl";
3131
private String style1 = "src/test/resources/docbook-xsl/fo/docbook.xsl";
32-
private String output = "src/test/resources/hello.pdf";
33-
private String output1 = "src/test/resources/hello1.pdf";
34-
private String output2 = "src/test/resources/hello2.pdf";
35-
private String foFile = "src/test/resources/hello.fo";
36-
private String xmlFile = "src/test/resources/hello.xml";
32+
private String output_jtidy = "src/test/resources/output_jtidy.pdf";
33+
private String output_html2fo = "src/test/resources/output_html2fo.pdf";
34+
private String output_herold = "src/test/resources/output_herold.pdf";
35+
private String foFile = "src/test/resources/input.fo";
36+
private String xmlFile = "src/test/resources/input.xml";
3737

3838
@Test
3939
public void whenTransformHTMLToPDFUsingJTidy_thenCorrect() throws Exception {
4040
final Document xhtml = fromHTMLToXHTML();
4141
final Document fo = fromXHTMLToFO(xhtml);
42-
fromFODocumentToPDF(fo, output);
42+
fromFODocumentToPDF(fo, output_jtidy);
4343
}
4444

4545
@Test
@@ -51,7 +51,7 @@ public void whenTransformFromHTML2FOToPDF_thenCorrect() throws Exception {
5151
public void whenTransformFromHeroldToPDF_thenCorrect() throws Exception {
5252
fromHTMLTOXMLUsingHerold();
5353
final Document fo = fromXMLFileToFO();
54-
fromFODocumentToPDF(fo, output2);
54+
fromFODocumentToPDF(fo, output_herold);
5555
}
5656

5757
private Document fromHTMLToXHTML() throws FileNotFoundException {
@@ -92,7 +92,7 @@ private Transformer createTransformer(final String styleFile) throws Exception {
9292

9393
private void fromFOFileToPDF() throws Exception {
9494
final FopFactory fopFactory = FopFactory.newInstance();
95-
final OutputStream outStream = new BufferedOutputStream(new FileOutputStream(new File(output1)));
95+
final OutputStream outStream = new BufferedOutputStream(new FileOutputStream(new File(output_html2fo)));
9696
final Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, outStream);
9797

9898
final TransformerFactory factory = TransformerFactory.newInstance();

‎apache-fop/src/test/resources/hello.fo‎

Lines changed: 0 additions & 31 deletions
This file was deleted.

‎apache-fop/src/test/resources/hello.html‎

Lines changed: 0 additions & 11 deletions
This file was deleted.
-5.32 KB
Binary file not shown.

‎apache-fop/src/test/resources/hello.xml‎

Lines changed: 0 additions & 10 deletions
This file was deleted.
-5.31 KB
Binary file not shown.
-6.25 KB
Binary file not shown.

0 commit comments

Comments
 (0)