r416 - in trunk: . jrst jrst/src/test/java/org/nuiton/jrst
Author: tchemit Date: 2009-09-29 18:44:36 +0200 (Tue, 29 Sep 2009) New Revision: 416 Modified: trunk/jrst/pom.xml trunk/jrst/src/test/java/org/nuiton/jrst/AdvancedReaderTest.java trunk/jrst/src/test/java/org/nuiton/jrst/JRSTReaderTest.java trunk/jrst/src/test/java/org/nuiton/jrst/JRSTTest.java trunk/pom.xml Log: - use mavenpom 1.0.3, junit 4.7, maven-helper-plugin 1.1.0 - no more junit 3 tests - fix xalan dependency pb without adding a dep to the labs :) Modified: trunk/jrst/pom.xml =================================================================== --- trunk/jrst/pom.xml 2009-09-17 09:41:56 UTC (rev 415) +++ trunk/jrst/pom.xml 2009-09-29 16:44:36 UTC (rev 416) @@ -39,11 +39,7 @@ <groupId>org.apache.xmlgraphics</groupId> <artifactId>fop</artifactId> </dependency> - <dependency> - <groupId>xerces</groupId> - <artifactId>xml-serializer</artifactId> - <scope>compile</scope> - </dependency> + <!-- Annoted interfaces to present command line arguments --> <dependency> <groupId>uk.co.flamingpenguin.jewelcli</groupId> @@ -54,6 +50,11 @@ <groupId>xalan</groupId> <artifactId>xalan</artifactId> </dependency> + <!-- TC-20090929 force it, otherwise the dependency is not attached--> + <dependency> + <groupId>xalan</groupId> + <artifactId>serializer</artifactId> + </dependency> <!-- Swing librairie --> <dependency> <groupId>org.nuiton.thirdparty</groupId> Modified: trunk/jrst/src/test/java/org/nuiton/jrst/AdvancedReaderTest.java =================================================================== --- trunk/jrst/src/test/java/org/nuiton/jrst/AdvancedReaderTest.java 2009-09-17 09:41:56 UTC (rev 415) +++ trunk/jrst/src/test/java/org/nuiton/jrst/AdvancedReaderTest.java 2009-09-29 16:44:36 UTC (rev 416) @@ -86,6 +86,7 @@ * {@link org.nuiton.jrst.AdvancedReader#skipBlankLines()}. * @throws IOException */ + @Test public void testSkipBlankLines() throws IOException { { AdvancedReader in = new AdvancedReader(new FileReader(file)); @@ -106,6 +107,7 @@ * Test method for {@link org.nuiton.jrst.AdvancedReader#readAll()}. * @throws IOException */ + @Test public void testReadAll() throws IOException { { AdvancedReader in = new AdvancedReader(new FileReader(file)); @@ -130,6 +132,7 @@ * Test method for {@link org.nuiton.jrst.AdvancedReader#readLines(int)}. * @throws IOException */ + @Test public void testReadLines() throws IOException { { AdvancedReader in = new AdvancedReader(new FileReader(file)); @@ -155,6 +158,7 @@ * {@link org.nuiton.jrst.AdvancedReader#readUntil(java.lang.String)}. * @throws IOException */ + @Test public void testReadUntil() throws IOException { { AdvancedReader in = new AdvancedReader(new FileReader(file)); @@ -186,6 +190,7 @@ * {@link org.nuiton.jrst.AdvancedReader#readUntil(java.lang.String)}. * @throws IOException */ + @Test public void testReadWhile() throws IOException { { AdvancedReader in = new AdvancedReader(new FileReader(file)); @@ -218,6 +223,7 @@ * Test method for {@link org.nuiton.jrst.AdvancedReader#readLine()}. * @throws IOException */ + @Test public void testReadLine() throws IOException { { AdvancedReader in = new AdvancedReader(new FileReader(file)); @@ -240,6 +246,7 @@ } } + @Test public void testMark() throws IOException { AdvancedReader in = new AdvancedReader(new StringReader(text)); String line = in.readLine(); @@ -251,6 +258,7 @@ Assert.assertEquals("1 toto tata tutu", line); } + @Test public void testUnread() throws IOException { AdvancedReader in = new AdvancedReader(new StringReader(text)); Assert.assertEquals(0, in.getCharNumber()); @@ -271,6 +279,7 @@ Assert.assertEquals("1 toto tata tutu", line); } + @Test public void testSkip() throws IOException { AdvancedReader in = new AdvancedReader(new StringReader(text)); in.skip(3); Modified: trunk/jrst/src/test/java/org/nuiton/jrst/JRSTReaderTest.java =================================================================== --- trunk/jrst/src/test/java/org/nuiton/jrst/JRSTReaderTest.java 2009-09-17 09:41:56 UTC (rev 415) +++ trunk/jrst/src/test/java/org/nuiton/jrst/JRSTReaderTest.java 2009-09-29 16:44:36 UTC (rev 416) @@ -17,7 +17,6 @@ package org.nuiton.jrst; -import junit.framework.TestCase; import org.dom4j.Document; import org.dom4j.io.OutputFormat; import org.dom4j.io.XMLWriter; @@ -25,6 +24,7 @@ import java.io.InputStreamReader; import java.io.Reader; import java.net.URL; +import org.junit.Test; /** * JRSTReaderTest. @@ -37,8 +37,9 @@ * Last update: $Date$ * by : $Author$ */ -public class JRSTReaderTest extends TestCase { +public class JRSTReaderTest { + @Test public void testRead() throws Exception { URL url = JRSTReaderTest.class .getResource("/test.rst"); Modified: trunk/jrst/src/test/java/org/nuiton/jrst/JRSTTest.java =================================================================== --- trunk/jrst/src/test/java/org/nuiton/jrst/JRSTTest.java 2009-09-17 09:41:56 UTC (rev 415) +++ trunk/jrst/src/test/java/org/nuiton/jrst/JRSTTest.java 2009-09-29 16:44:36 UTC (rev 416) @@ -38,7 +38,7 @@ } @Test - public void testToRst() throws Exception { + public void generateRst() throws Exception { File in = new File(testBasedir, "toRst1-in.rst"); List<String> IN_LINES = Arrays.asList(new String[]{ @@ -86,4 +86,15 @@ } } + + @Test + public void generateHtml() throws Exception { + + File in = new File(basedir, "src/test/resources/text.rst"); + + File out = new File(testBasedir, "jrst-RstToHtml2.html"); + + JRST.generate(JRST.TYPE_HTML, in, out, JRST.Overwrite.ALLTIME); + + } } Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2009-09-17 09:41:56 UTC (rev 415) +++ trunk/pom.xml 2009-09-29 16:44:36 UTC (rev 416) @@ -9,7 +9,7 @@ <parent> <groupId>org.nuiton</groupId> <artifactId>mavenpom</artifactId> - <version>1.0.1</version> + <version>1.0.3-SNAPSHOT</version> </parent> <artifactId>jrst</artifactId> @@ -43,6 +43,67 @@ <groupId>org.nuiton</groupId> <artifactId>maven-helper-plugin</artifactId> <version>${helper.version}</version> + <exclusions> + <exclusion> + <groupId>org.apache.maven</groupId> + <artifactId>maven-artifact</artifactId> + </exclusion> + + <exclusion> + <groupId>org.apache.maven</groupId> + <artifactId>maven-artifact-manager</artifactId> + </exclusion> + + <exclusion> + <groupId>org.apache.maven</groupId> + <artifactId>maven-model</artifactId> + </exclusion> + + <exclusion> + <groupId>org.apache.maven</groupId> + <artifactId>maven-profile</artifactId> + </exclusion> + + <exclusion> + <groupId>org.apache.maven</groupId> + <artifactId>maven-settings</artifactId> + </exclusion> + <exclusion> + <groupId>commons-httpclient</groupId> + <artifactId>commons-httpclient</artifactId> + </exclusion> + + <exclusion> + <groupId>plexus</groupId> + <artifactId>plexus-mail-sender-simple</artifactId> + </exclusion> + + <exclusion> + <groupId>plexus</groupId> + <artifactId>plexus-mail-sender-api</artifactId> + </exclusion> + + <exclusion> + <groupId>plexus</groupId> + <artifactId>plexus-mail-sender-javamail</artifactId> + </exclusion> + + <exclusion> + <groupId>javax.mail</groupId> + <artifactId>mail</artifactId> + </exclusion> + + <exclusion> + <groupId>org.sonatype.plexus</groupId> + <artifactId>plexus-cipher</artifactId> + </exclusion> + + <exclusion> + <groupId>org.sonatype.plexus</groupId> + <artifactId>plexus-sec-dispatcher</artifactId> + </exclusion> + + </exclusions> </dependency> <dependency> @@ -67,11 +128,21 @@ </dependency> <dependency> + <groupId>xalan</groupId> + <artifactId>serializer</artifactId> + <version>2.7.1</version> + <scope>runtime</scope> + </dependency> + + <!-- TC-20090929 y'a serializer-2.7.1 offer par xalan 2-7-1 + cela devrait faire l'affaire --> + + <!--dependency> <groupId>xerces</groupId> <artifactId>xml-serializer</artifactId> <version>2.7.1</version> <scope>runtime</scope> - </dependency> + </dependency--> <dependency> <groupId>org.nuiton.thirdparty</groupId> @@ -108,13 +179,6 @@ </dependency> <dependency> - <groupId>org.nuiton</groupId> - <artifactId>maven-helper-plugin</artifactId> - <version>${helper.version}</version> - <scope>compile</scope> - </dependency> - - <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> <version>${maven.version}</version> @@ -145,7 +209,7 @@ <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>4.6</version> + <version>4.7</version> <scope>test</scope> </dependency> @@ -247,13 +311,13 @@ </build> - <repositories> + <!--repositories> <repository> - <id>labs</id> - <name>lutinbuilder</name> - <url>http://lutinbuilder.labs.libre-entreprise.org/maven2/</url> + <id>labs</id> + <name>lutinbuilder</name> + <url>http://lutinbuilder.labs.libre-entreprise.org/maven2/</url> </repository> - </repositories> + </repositories--> <!-- ************************************************************* -->
participants (1)
-
tchemit@users.nuiton.org