@@ -63,8 +63,7 @@ public void convertBasicPTest() throws IOException, InterruptedException {
6363
6464 @ Test
6565 public void diffElementsInsidePTest () throws IOException , InterruptedException {
66- convertToPdfAndCompare ("diffElementsInsidePTest" , SOURCE_FOLDER , DESTINATION_FOLDER , false ,
67- new ConverterProperties ().setMulticolEnabled (true ).setBaseUri (SOURCE_FOLDER ));
66+ runTest ("diffElementsInsidePTest" );
6867 }
6968
7069 //TODO: DEVSIX-7591 support nested multicol layouting
@@ -91,20 +90,17 @@ public void convertBasicTableTest() throws IOException, InterruptedException {
9190
9291 @ Test
9392 public void tableColspanTest () throws IOException , InterruptedException {
94- convertToPdfAndCompare ("tableColspanTest" ,
95- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
93+ runTest ("tableColspanTest" );
9694 }
9795
9896 @ Test
9997 public void tableRowspanTest () throws IOException , InterruptedException {
100- convertToPdfAndCompare ("tableRowspanTest" ,
101- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
98+ runTest ("tableRowspanTest" );
10299 }
103100
104101 @ Test
105102 public void tableColspanRowspanTest () throws IOException , InterruptedException {
106- convertToPdfAndCompare ("tableColspanRowspanTest" ,
107- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
103+ runTest ("tableColspanRowspanTest" );
108104 }
109105
110106 //TODO: DEVSIX-7591 Support nested multicol layouting
@@ -153,99 +149,84 @@ public void convertImagesWithDifferentColValuesTest() throws IOException, Interr
153149 runTest ("imagesWithDifferentColValuesTest" );
154150 }
155151
156- private void runTest (String testName ) throws IOException , InterruptedException {
157- convertToPdfAndCompare (testName ,
158- SOURCE_FOLDER , DESTINATION_FOLDER , false ,
159- new ConverterProperties ().setMulticolEnabled (true ).setBaseUri (SOURCE_FOLDER ));
160- }
161-
162-
163152 @ Test
164153 public void paddingsMarginsBorderBackgrounds () throws IOException , InterruptedException {
165- convertToPdfAndCompare ("paddingsMarginsBorderBackgrounds" ,
166- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
154+ runTest ("paddingsMarginsBorderBackgrounds" );
167155 }
168156
169157
170158 @ Test
171159 public void borderOnlyTest () throws IOException , InterruptedException {
172- convertToPdfAndCompare ("borderOnly" ,
173- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
160+ runTest ("borderOnly" );
174161 }
175162
176163
177164 @ Test
178165 public void paddingOnlyTest () throws IOException , InterruptedException {
179- convertToPdfAndCompare ("paddingOnly" ,
180- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
166+ runTest ("paddingOnly" );
181167 }
182168
183169
184170 @ Test
185171 public void marginOnlyTest () throws IOException , InterruptedException {
186- convertToPdfAndCompare ("marginOnly" ,
187- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
172+ runTest ("marginOnly" );
188173 }
189174
190175
191176 @ Test
192177 public void splitInnerParagraphBetweenColumns () throws IOException , InterruptedException {
193- convertToPdfAndCompare ("splitInnerParagraphBetweenColumns" ,
194- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
178+ runTest ("splitInnerParagraphBetweenColumns" );
195179 }
196180
197181 @ Test
198182 public void splitInnerParagraphWithoutMarginBetweenColumns () throws IOException , InterruptedException {
199- convertToPdfAndCompare ("splitInnerParagraphWithoutMarginBetweenColumns" ,
200- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
183+ runTest ("splitInnerParagraphWithoutMarginBetweenColumns" );
201184 }
202185
203186 @ Test
204187 public void splitEmptyBlockElementsBetweenColumns () throws IOException , InterruptedException {
205- convertToPdfAndCompare ("splitEmptyBlockElementsBetweenColumns" ,
206- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
188+ runTest ("splitEmptyBlockElementsBetweenColumns" );
207189 }
208190
209191
210192 @ Test
211193 public void splitEmptyParagraphElementsBetweenColumns () throws IOException , InterruptedException {
212- convertToPdfAndCompare ("splitEmptyParagraphElementsBetweenColumns" ,
213- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
194+ runTest ("splitEmptyParagraphElementsBetweenColumns" );
214195 }
215196
216197 @ Test
217198 public void splitEmptyContinuousBlockElementBetweenColumns () throws IOException , InterruptedException {
218- convertToPdfAndCompare ("splitEmptyContinuousBlockElementBetweenColumns" ,
219- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
199+ runTest ("splitEmptyContinuousBlockElementBetweenColumns" );
220200 }
221201
222202 @ Test
223203 public void basicHiTest () throws IOException , InterruptedException {
224- convertToPdfAndCompare ("basicHiTest" ,
225- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
204+ runTest ("basicHiTest" );
226205 }
227206
228207 @ Test
229208 public void basicFooterHeaderTest () throws IOException , InterruptedException {
230- convertToPdfAndCompare ("basicFooterHeaderTest" ,
231- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
209+ runTest ("basicFooterHeaderTest" );
232210 }
233211
234212 @ Test
235213 public void basicDlTest () throws IOException , InterruptedException {
236- convertToPdfAndCompare ("basicDlTest" ,
237- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
214+ runTest ("basicDlTest" );
238215 }
239216
240217 @ Test
241218 public void basicInlineElementsTest () throws IOException , InterruptedException {
242- convertToPdfAndCompare ("basicInlineElementsTest" ,
243- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
219+ runTest ("basicInlineElementsTest" );
244220 }
245221
246222 @ Test
247223 public void basicBlockquoteTest () throws IOException , InterruptedException {
248- convertToPdfAndCompare ("basicBlockquoteTest" ,
249- SOURCE_FOLDER , DESTINATION_FOLDER , false , new ConverterProperties ().setMulticolEnabled (true ));
224+ runTest ("basicBlockquoteTest" );
225+ }
226+
227+ private void runTest (String testName ) throws IOException , InterruptedException {
228+ convertToPdfAndCompare (testName ,
229+ SOURCE_FOLDER , DESTINATION_FOLDER , false ,
230+ new ConverterProperties ().setMulticolEnabled (true ).setBaseUri (SOURCE_FOLDER ));
250231 }
251232}
0 commit comments