1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package org.nuiton.jrst;
24
25 import org.apache.commons.logging.Log;
26 import org.apache.commons.logging.LogFactory;
27 import org.junit.Ignore;
28 import org.junit.Test;
29
30 import java.io.File;
31
32
33
34
35
36
37
38
39
40
41
42
43 public class JRSTGeneratorTest extends JRSTAbstractTest {
44
45
46 protected static Log log = LogFactory.getLog(JRSTGeneratorTest.class);
47
48 public static File getResourcesTestPath() {
49 return getTestFile("test.rst");
50 }
51
52
53 @Ignore
54 @Test
55 public void testRstToRst() throws Exception {
56
57 if (log.isInfoEnabled()) {
58 log.info("Testing RST to RST (test.rst)...");
59 }
60
61 String test1 = getOutputTestPath("jrst-RstToRst.rst");
62 new JRSTTestGenerator("rst", getResourcesTestPath(), new File(test1), JRST.Overwrite.ALLTIME);
63 }
64
65 @Test
66 public void testRstToHtml() throws Exception {
67
68 if (log.isInfoEnabled()) {
69 log.info("Testing RST to HTML (test.rst)...");
70 }
71
72 String test1 = getOutputTestPath("jrst-RstToHtml.html");
73 new JRSTTestGenerator("html", getResourcesTestPath(), new File(test1), JRST.Overwrite.ALLTIME);
74 }
75
76 @Test
77 public void testRstToHtml2() throws Exception {
78
79 if (log.isInfoEnabled()) {
80 log.info("Testing RST to HTML (docDeveloppeur.rst) ...");
81 }
82
83 String test1 = getOutputTestPath("jrst-RstToHtml2.html");
84 new JRSTTestGenerator("html", getTestFile("docDeveloppeur.rst"), new File(test1), JRST.Overwrite.ALLTIME);
85 }
86
87
88 @Test
89 public void testRstToDocbook() throws Exception {
90
91 if (log.isInfoEnabled()) {
92 log.info("Testing RST to Docbook (test.rst)...");
93 }
94
95 String test1 = getOutputTestPath("jrst-RstToDocbook.dbk");
96 new JRSTTestGenerator("docbook", getResourcesTestPath(), new File(test1), JRST.Overwrite.ALLTIME);
97 }
98
99 @Test
100 public void testRstToXdoc() throws Exception {
101
102 if (log.isInfoEnabled()) {
103 log.info("Testing RST to Xdoc (test.rst)...");
104 }
105
106 String test1 = getOutputTestPath("jrst-RstToXdoc.xdoc");
107 new JRSTTestGenerator("xdoc", getResourcesTestPath(), new File(test1), JRST.Overwrite.ALLTIME);
108 }
109
110
111
112
113
114
115 @Ignore
116 public void testRstToXdoc2() throws Exception {
117
118 if (log.isInfoEnabled()) {
119 log.info("Testing RST to Xdoc (test2.rst)...");
120 }
121
122 String test1 = getOutputTestPath("jrst-RstToXdoc2.xdoc");
123 new JRSTTestGenerator("xdoc", getTestFile("test2.rst"), new File(test1), JRST.Overwrite.ALLTIME);
124 }
125
126 @Test
127 public void testRstToXdoc3() throws Exception {
128
129 if (log.isInfoEnabled()) {
130 log.info("Testing RST to Xdoc (test3.rst) ...");
131 }
132
133 String test1 = getOutputTestPath("jrst-RstToXdoc3.xdoc");
134 new JRSTTestGenerator("xdoc", getTestFile("test3.rst"), new File(test1), JRST.Overwrite.ALLTIME);
135 }
136
137 @Test
138 public void testRstToXdoc4() throws Exception {
139
140 if (log.isInfoEnabled()) {
141 log.info("Testing RST to Xdoc (test4.rst) ...");
142 }
143
144 String test1 = getOutputTestPath("jrst-RstToXdoc4.xdoc");
145 new JRSTTestGenerator("xdoc", getTestFile("test4.rst"), new File(test1), JRST.Overwrite.ALLTIME);
146 }
147
148 @Test
149 public void testRstToXdocJrstSite() throws Exception {
150
151 if (log.isInfoEnabled()) {
152 log.info("Testing RST to Xdoc (frEntier.rst) ...");
153 }
154
155 String test1 = getOutputTestPath("jrst-RstToXdocJrstSite.xdoc");
156 new JRSTTestGenerator("xdoc", getTestFile("frEntier.rst"), new File(test1), JRST.Overwrite.ALLTIME);
157 }
158
159
160 @Test
161 public void testRstToPDF() throws Exception {
162
163 if (log.isInfoEnabled()) {
164 log.info("Testing RST to PDF (test.rst) ...");
165 }
166
167 String test1 = getOutputTestPath("jrst-RstToPDF.pdf");
168 new JRSTTestGenerator("pdf", getResourcesTestPath(), new File(test1), JRST.Overwrite.ALLTIME);
169 }
170
171 @Test
172 public void testRstToPDF2() throws Exception {
173
174 if (log.isInfoEnabled()) {
175 log.info("Testing RST to PDF (docDeveloppeur.rst) ...");
176 }
177
178 String test1 = getOutputTestPath("jrst-RstToPDF2.pdf");
179 new JRSTTestGenerator("pdf", getTestFile("docDeveloppeur.rst"), new File(test1), JRST.Overwrite.ALLTIME);
180 }
181 }