1
+ package com .itextpdf .svg .jfreesvg ;
2
+
3
+
4
+ import com .itextpdf .svg .exceptions .SvgLogMessageConstant ;
5
+ import com .itextpdf .svg .renderers .SvgIntegrationTest ;
6
+ import com .itextpdf .test .ITextTest ;
7
+ import com .itextpdf .test .annotations .LogMessage ;
8
+ import com .itextpdf .test .annotations .LogMessages ;
9
+ import com .itextpdf .test .annotations .type .IntegrationTest ;
10
+ import org .junit .BeforeClass ;
11
+ import org .junit .Test ;
12
+ import org .junit .experimental .categories .Category ;
13
+ import java .io .IOException ;
14
+
15
+
16
+ @ Category (IntegrationTest .class )
17
+ public class JFreeSvg extends SvgIntegrationTest {
18
+
19
+ private static final String SOURCE_FOLDER = "./src/test/resources/com/itextpdf/svg/JFreeSvg/" ;
20
+ private static final String DESTINATION_FOLDER = "./src/test/resources/com/itextpdf/svg/JFreeSvg/" ;
21
+
22
+ @ BeforeClass
23
+ public static void beforeClass () {
24
+ ITextTest .createDestinationFolder (DESTINATION_FOLDER );
25
+ }
26
+
27
+ //Do not make changes in svg file because it was generated by JFreeSVG
28
+ @ Test
29
+ public void usingJFreeSvgFromString () throws IOException , InterruptedException {
30
+ //TODO: update cmp_ when RND-1029 fixed
31
+ convertAndCompareVisually (SOURCE_FOLDER , DESTINATION_FOLDER , "rectangleFromString" );
32
+ }
33
+
34
+ //Do not make changes in svg file because it was generated by JFreeSVG
35
+ @ Test
36
+ public void usingJFreeSvgFromFile () throws IOException , InterruptedException {
37
+ //TODO: update cmp_ when RND-1029 fixed
38
+ convertAndCompareVisually (SOURCE_FOLDER , DESTINATION_FOLDER , "rectangleFromFile" );
39
+ }
40
+
41
+ //Do not make changes in svg file because it was generated by JFreeSVG
42
+ @ Test
43
+ public void pieChartByJFreeSvg () throws IOException , InterruptedException {
44
+ convertAndCompareVisually (SOURCE_FOLDER , DESTINATION_FOLDER , "usingJFreeSvgPieChartFromFile" );
45
+ }
46
+
47
+ //Do not make changes in svg file because it was generated by JFreeSVG
48
+ @ Test
49
+ // TODO: Update cmp_ file when DEVSIX-2086 resolved
50
+ @ LogMessages (messages = {
51
+ @ LogMessage (messageTemplate = SvgLogMessageConstant .UNMAPPEDTAG , count = 80 )
52
+ })
53
+ public void barChartByJFreeSvgFromString () throws IOException , InterruptedException {
54
+ convertAndCompareVisually (SOURCE_FOLDER , DESTINATION_FOLDER , "usingJFreeSvgBarChartFromString" );
55
+ }
56
+
57
+ //Do not make changes in svg file because it was generated by JFreeSVG
58
+ @ Test
59
+ // TODO: Update cmp_ file when DEVSIX-2086 resolved
60
+ @ LogMessages (messages = {
61
+ @ LogMessage (messageTemplate = SvgLogMessageConstant .UNMAPPEDTAG , count = 80 )
62
+ })
63
+ public void barChartByJFreeSvgFromFile () throws IOException , InterruptedException {
64
+ convertAndCompareVisually (SOURCE_FOLDER , DESTINATION_FOLDER , "usingJFreeSvgBarChartFromFile" );
65
+ }
66
+
67
+ //Do not make changes in svg file because it was generated by JFreeSVG
68
+ @ Test
69
+ public void lineChartByJFreeSvgFromString () throws IOException , InterruptedException {
70
+ convertAndCompareVisually (SOURCE_FOLDER , DESTINATION_FOLDER , "usingJFreeSvgLineChartFromString" );
71
+ }
72
+
73
+ //Do not make changes in svg file because it was generated by JFreeSVG
74
+ @ Test
75
+ public void lineChartByJFreeSvgFromFile () throws IOException , InterruptedException {
76
+ convertAndCompareVisually (SOURCE_FOLDER , DESTINATION_FOLDER , "usingJFreeSvgLineChartFromFile" );
77
+ }
78
+
79
+ //Do not make changes in svg file because it was generated by JFreeSVG
80
+ @ Test
81
+ public void xyChartByJFreeSvgFromString () throws IOException , InterruptedException {
82
+ convertAndCompareVisually (SOURCE_FOLDER , DESTINATION_FOLDER , "usingJFreeSvgXYChartFromString" );
83
+ }
84
+
85
+ //Do not make changes in svg file because it was generated by JFreeSVG
86
+
87
+ @ Test
88
+ public void xyChartByJFreeSvgFromFile () throws IOException , InterruptedException {
89
+ convertAndCompareVisually (SOURCE_FOLDER , DESTINATION_FOLDER , "usingJFreeSvgXYChartFromFile" );
90
+ }
91
+ }
0 commit comments