Skip to content

Commit 0308455

Browse files
author
Andrei Stryhelski
committed
Add ColumnRuleTest
DEVSIX-7565
1 parent 31e7704 commit 0308455

37 files changed

+1538
-0
lines changed
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
/*
2+
This file is part of the iText (R) project.
3+
Copyright (c) 1998-2023 Apryse Group NV
4+
Authors: Apryse Software.
5+
6+
This program is offered under a commercial and under the AGPL license.
7+
For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below.
8+
9+
AGPL licensing:
10+
This program is free software: you can redistribute it and/or modify
11+
it under the terms of the GNU Affero General Public License as published by
12+
the Free Software Foundation, either version 3 of the License, or
13+
(at your option) any later version.
14+
15+
This program is distributed in the hope that it will be useful,
16+
but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
GNU Affero General Public License for more details.
19+
20+
You should have received a copy of the GNU Affero General Public License
21+
along with this program. If not, see <https://www.gnu.org/licenses/>.
22+
*/
23+
package com.itextpdf.html2pdf.css.multicol;
24+
25+
import com.itextpdf.html2pdf.ConverterProperties;
26+
import com.itextpdf.html2pdf.ExtendedHtmlConversionITextTest;
27+
import com.itextpdf.test.annotations.type.IntegrationTest;
28+
29+
import java.io.IOException;
30+
import org.junit.BeforeClass;
31+
import org.junit.Test;
32+
import org.junit.experimental.categories.Category;
33+
34+
@Category(IntegrationTest.class)
35+
public class ColumnRuleTest extends ExtendedHtmlConversionITextTest {
36+
public static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/html2pdf/css/multicol/ColumnRuleTest/";
37+
public static final String DESTINATION_FOLDER = "./target/test/com/itextpdf/html2pdf/css/multicol/ColumnRuleTest/";
38+
39+
@BeforeClass
40+
public static void beforeClass() {
41+
createOrClearDestinationFolder(DESTINATION_FOLDER);
42+
}
43+
44+
@Test
45+
public void convertRuleStyleNoneTest() throws IOException, InterruptedException {
46+
runTest("ruleStyleNoneTest");
47+
}
48+
49+
@Test
50+
public void convertRuleStyleDottedTest() throws IOException, InterruptedException {
51+
runTest("ruleStyleDottedTest");
52+
}
53+
54+
@Test
55+
public void convertRuleStyleSolidTest() throws IOException, InterruptedException {
56+
runTest("ruleStyleSolidTest");
57+
}
58+
59+
@Test
60+
public void convertRuleStyleDoubleTest() throws IOException, InterruptedException {
61+
runTest("ruleStyleDoubleTest");
62+
}
63+
64+
@Test
65+
public void convertRuleStyleRidgeTest() throws IOException, InterruptedException {
66+
runTest("ruleStyleRidgeTest");
67+
}
68+
69+
@Test
70+
public void convertRuleStyleManyColumnsTest() throws IOException, InterruptedException {
71+
runTest("ruleStyleManyColumnsTest");
72+
}
73+
74+
@Test
75+
public void convertRuleStyleMultipageColumnsTest() throws IOException, InterruptedException {
76+
runTest("ruleStyleMultipageColumnsTest");
77+
}
78+
79+
@Test
80+
public void convertRuleWidthThinTest() throws IOException, InterruptedException {
81+
runTest("ruleWidthThinTest");
82+
}
83+
84+
@Test
85+
public void convertRuleWidthMediumTest() throws IOException, InterruptedException {
86+
runTest("ruleWidthMediumTest");
87+
}
88+
89+
@Test
90+
public void convertRuleWidthThickTest() throws IOException, InterruptedException {
91+
runTest("ruleWidthThickTest");
92+
}
93+
94+
@Test
95+
public void convertRuleWidthDifferentWidthValuesTest() throws IOException, InterruptedException {
96+
runTest("ruleWidthDifferentWidthValuesTest");
97+
}
98+
99+
@Test
100+
public void convertRuleWidthHugeColumnsTest() throws IOException, InterruptedException {
101+
runTest("ruleWidthHugeColumnsTest");
102+
}
103+
104+
@Test
105+
public void convertRuleWidthIncorrectValuesTest() throws IOException, InterruptedException {
106+
runTest("ruleWidthIncorrectValuesTest");
107+
}
108+
109+
@Test
110+
public void convertRuleColorTest() throws IOException, InterruptedException {
111+
runTest("ruleColorTest");
112+
}
113+
114+
@Test
115+
public void convertRuleColorRgbTest() throws IOException, InterruptedException {
116+
runTest("ruleColorRgbTest");
117+
}
118+
119+
@Test
120+
public void convertRuleColorHslaTest() throws IOException, InterruptedException {
121+
runTest("ruleColorHslaTest");
122+
}
123+
124+
@Test
125+
public void convertRuleColorCurrentColorTest() throws IOException, InterruptedException {
126+
runTest("ruleColorCurrentColorTest");
127+
}
128+
129+
@Test
130+
public void convertRuleShorthandTest() throws IOException, InterruptedException {
131+
runTest("ruleShorthandTest");
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));
138+
}
139+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)