@@ -20,7 +20,7 @@ This file is part of the iText (R) project.
2020 You should have received a copy of the GNU Affero General Public License
2121 along with this program. If not, see <https://www.gnu.org/licenses/>.
2222 */
23- package com .itextpdf .html2pdf .css ;
23+ package com .itextpdf .html2pdf .css . multicol ;
2424
2525import com .itextpdf .html2pdf .ConverterProperties ;
2626import com .itextpdf .html2pdf .ExtendedHtmlConversionITextTest ;
@@ -34,8 +34,8 @@ This file is part of the iText (R) project.
3434
3535@ Category (IntegrationTest .class )
3636public class ColumnCountTest extends ExtendedHtmlConversionITextTest {
37- public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/ColumnCountTest/" ;
38- public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/ColumnCountTest/" ;
37+ public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/multicol/ ColumnCountTest/" ;
38+ public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/multicol/ ColumnCountTest/" ;
3939
4040 @ BeforeClass
4141 public static void beforeClass () {
@@ -44,102 +44,97 @@ public static void beforeClass() {
4444
4545 @ Test
4646 public void convertBasicArticleTest () throws IOException , InterruptedException {
47- convertToPdfAndCompare ("basicArticleTest" ,
48- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true )
49- .setBaseUri (SOURCE_FOLDER ));
47+ runTest ("basicArticleTest" );
5048 }
5149
5250 @ Test
5351 public void convertBasicDivTest () throws IOException , InterruptedException {
54- convertToPdfAndCompare ("basicDivTest" ,
55- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
52+ runTest ("basicDivTest" );
5653 }
5754
5855 @ Test
5956 public void convertBasicDivWithImageTest () throws IOException , InterruptedException {
60- convertToPdfAndCompare ("basicDivWithImageTest" ,
61- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true )
62- .setBaseUri (SOURCE_FOLDER ));
57+ runTest ("basicDivWithImageTest" );
6358 }
6459
6560 @ Test
6661 public void convertBasicPTest () throws IOException , InterruptedException {
67- convertToPdfAndCompare ("basicPTest" ,
68- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
62+ runTest ("basicPTest" );
6963 }
7064
7165 //TODO: DEVSIX-7592 add support for forms
7266 @ Test
7367 public void convertBasicFormTest () throws IOException , InterruptedException {
74- convertToPdfAndCompare ("basicFormTest" ,
75- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
68+ runTest ("basicFormTest" );
7669 }
7770
7871 @ Test
7972 public void convertBasicUlTest () throws IOException , InterruptedException {
80- convertToPdfAndCompare ("basicUlTest" ,
81- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
73+ runTest ("basicUlTest" );
8274 }
8375
8476 //TODO: DEVSIX-7591
8577 @ Test
8678 public void convertBasicOlTest () throws IOException , InterruptedException {
87- convertToPdfAndCompare ("basicOlTest" ,
88- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
79+ runTest ("basicOlTest" );
8980 }
9081
9182 //TODO: DEVSIX-7592
9283 @ Test
9384 public void convertBasicTableTest () throws IOException , InterruptedException {
94- convertToPdfAndCompare ("basicTableTest" ,
95- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
85+ runTest ("basicTableTest" );
9686 }
9787
9888 //TODO: DEVSIX-7584 add multipage support
9989 @ Test
10090 public void convertBasicSectionTest () throws IOException , InterruptedException {
101- convertToPdfAndCompare ("basicSectionTest" ,
102- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
91+ runTest ("basicSectionTest" );
10392 }
10493
10594 //TODO: DEVSIX-7584 add multipage support
10695 @ Test
10796 public void convertBasicDivMultiPageDocumentsTest () throws IOException , InterruptedException {
108- convertToPdfAndCompare ("basicDivMultiPageTest" ,
109- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
97+ runTest ("basicDivMultiPageTest" );
11098 }
11199
112100 //TODO: DEVSIX-7592 add support for forms
113101 @ Test
114102 public void convertBasicFormMultiPageDocumentsTest () throws IOException , InterruptedException {
115- convertToPdfAndCompare ("basicFormMultiPageTest" ,
116- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
103+ runTest ("basicFormMultiPageTest" );
117104 }
118105
119106 @ Test
120107 public void convertBasicDisplayPropertyTest () throws IOException , InterruptedException {
121- convertToPdfAndCompare ("basicDisplayPropertyTest" ,
122- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
108+ runTest ("basicDisplayPropertyTest" );
123109 }
124110
125111 //TODO: DEVSIX-7591
126112 @ Test
127113 public void convertBasicDisplayPropertyWithNestedColumnsTest () throws IOException , InterruptedException {
128- convertToPdfAndCompare ("basicDisplayPropertyWithNestedColumnsTest" ,
129- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
114+ runTest ("basicDisplayPropertyWithNestedColumnsTest" );
130115 }
131116
132117 //TODO: DEVSIX-7556
133118 @ Test
134119 public void convertBasicFloatPropertyTest () throws IOException , InterruptedException {
135- convertToPdfAndCompare ("basicFloatPropertyTest" ,
136- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
120+ runTest ("basicFloatPropertyTest" );
137121 }
138122
139123 @ Test
140124 public void convertBasicFlexPropertyTest () throws IOException , InterruptedException {
141- convertToPdfAndCompare ("basicFlexPropertyTest" ,
142- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
125+ runTest ("basicFlexPropertyTest" );
126+ }
127+
128+ //TODO: DEVSIX-7587 adjust approximate height calculation
129+ @ Test
130+ public void convertImagesWithDifferentColValuesTest () throws IOException , InterruptedException {
131+ runTest ("imagesWithDifferentColValuesTest" );
132+ }
133+
134+ private void runTest (String testName ) throws IOException , InterruptedException {
135+ convertToPdfAndCompare (testName ,
136+ SOURCE_FOLDER , DESTINATION_FOLDER , false ,
137+ new ConverterProperties ().setMulticolEnabled (true ).setBaseUri (SOURCE_FOLDER ));
143138 }
144139
145140
0 commit comments