@@ -23,41 +23,23 @@ You should have received a copy of the GNU Affero General Public License
23
23
using System ;
24
24
using System . Collections . Generic ;
25
25
using System . IO ;
26
- using System . Linq ;
27
26
using iText . Commons . Utils ;
28
27
using iText . Kernel . Pdf ;
29
28
30
29
namespace iText . Html2pdf {
31
30
[ NUnit . Framework . Category ( "IntegrationTest" ) ]
32
- [ NUnit . Framework . TestFixtureSource ( "RotationRelatedPropertiesTestFixtureData" ) ]
33
31
public class HtmlConverterPdfAParameterizedTest : ExtendedHtmlConversionITextTest {
34
32
public static readonly String SOURCE_FOLDER = iText . Test . TestUtil . GetParentProjectDirectory ( NUnit . Framework . TestContext
35
33
. CurrentContext . TestDirectory ) + "/resources/itext/html2pdf/HtmlConverterPdfAParameterizedTest/" ;
36
34
37
35
public static readonly String DESTINATION_FOLDER = NUnit . Framework . TestContext . CurrentContext . TestDirectory
38
36
+ "/test/itext/html2pdf/HtmlConverterPdfAParameterizedTest/" ;
39
37
40
- private readonly String htmlName ;
41
-
42
- private readonly String testName ;
43
-
44
- private readonly PdfAConformanceLevel conformanceLevel ;
45
-
46
38
[ NUnit . Framework . OneTimeSetUp ]
47
39
public static void BeforeClass ( ) {
48
40
CreateDestinationFolder ( DESTINATION_FOLDER ) ;
49
41
}
50
42
51
- public HtmlConverterPdfAParameterizedTest ( Object htmlName , Object testName , Object conformance ) {
52
- this . conformanceLevel = ( PdfAConformanceLevel ) conformance ;
53
- this . htmlName = ( String ) htmlName ;
54
- this . testName = ( String ) testName ;
55
- }
56
-
57
- public HtmlConverterPdfAParameterizedTest ( Object [ ] array )
58
- : this ( array [ 0 ] , array [ 1 ] , array [ 2 ] ) {
59
- }
60
-
61
43
// TODO DEVSIX-2449 z-index is not supported (zindex.html)
62
44
public static IEnumerable < Object [ ] > RotationRelatedProperties ( ) {
63
45
return JavaUtil . ArraysAsList ( new Object [ ] [ ] { new Object [ ] { "images.html" , "pdfA4BasicImageTest" , PdfAConformanceLevel
@@ -105,12 +87,9 @@ public static IEnumerable<Object[]> RotationRelatedProperties() {
105
87
} , new Object [ ] { "zIndex.html" , "pdfA1ZIndexTest" , PdfAConformanceLevel . PDF_A_1B } } ) ;
106
88
}
107
89
108
- public static ICollection < NUnit . Framework . TestFixtureData > RotationRelatedPropertiesTestFixtureData ( ) {
109
- return RotationRelatedProperties ( ) . Select ( array => new NUnit . Framework . TestFixtureData ( array ) ) . ToList ( ) ;
110
- }
111
-
112
- [ NUnit . Framework . Test ]
113
- public virtual void ConvertToPdfA4Test ( ) {
90
+ [ NUnit . Framework . TestCaseSource ( "RotationRelatedProperties" ) ]
91
+ public virtual void ConvertToPdfA4Test ( Object htmlName , Object testName , PdfAConformanceLevel conformanceLevel
92
+ ) {
114
93
String sourceHtml = SOURCE_FOLDER + htmlName ;
115
94
String destinationPdf = DESTINATION_FOLDER + testName + ".pdf" ;
116
95
String cmpPdf = SOURCE_FOLDER + "cmp_" + testName + ".pdf" ;
0 commit comments