maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r711955 - in /maven/doxia/doxia/trunk/doxia-modules: doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocValidatorTest.java
Date Thu, 06 Nov 2008 20:03:15 GMT
Author: vsiveton
Date: Thu Nov  6 12:02:58 2008
New Revision: 711955

URL: http://svn.apache.org/viewvc?rev=711955&view=rev
Log:
o improved test cases

Modified:
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocValidatorTest.java

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java?rev=711955&r1=711954&r2=711955&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java
Thu Nov  6 12:02:58 2008
@@ -23,7 +23,6 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.regex.Pattern;
 
 import org.apache.maven.doxia.xsd.AbstractXmlValidatorTest;
 import org.codehaus.plexus.util.FileUtils;
@@ -222,11 +221,7 @@
     /** {@inheritDoc} */
     protected String addNamespaces( String content )
     {
-        boolean result =
-            Pattern.matches( ".*(<faqs)(\\s)*(xmlns=\"http://maven.apache.org/FML/1.0\")"
-                + "(\\s)*(xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\").*", content
);
-
-        if ( result )
+        if ( content.indexOf( FML_XSD.getName() ) != -1 )
         {
             return content;
         }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocValidatorTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocValidatorTest.java?rev=711955&r1=711954&r2=711955&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocValidatorTest.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocValidatorTest.java
Thu Nov  6 12:02:58 2008
@@ -23,7 +23,6 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.regex.Pattern;
 
 import org.apache.maven.doxia.xsd.AbstractXmlValidatorTest;
 import org.codehaus.plexus.util.FileUtils;
@@ -83,11 +82,7 @@
     /** {@inheritDoc} */
     protected String addNamespaces( String content )
     {
-        boolean result =
-            Pattern.matches( ".*(<document)(\\s)*(xmlns=\"http://maven.apache.org/XDOC/2.0\")"
-                + "(\\s)*(xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\").*", content
);
-
-        if ( result )
+        if ( content.indexOf( XDOC_XSD.getName() ) != -1 )
         {
             return content;
         }



Mime
View raw message