Author: vsiveton
Date: Sat Feb  2 06:33:57 2008
New Revision: 617806

URL: http://svn.apache.org/viewvc?rev=617806&view=rev
Log:
o added test case

Added:
    
maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/PluginHelpGeneratorTest.java
   (with props)
Modified:
    
maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java

Modified: 
maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
URL: 
http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java?rev=617806&r1=617805&r2=617806&view=diff
==============================================================================
--- 
maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
 (original)
+++ 
maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java
 Sat Feb  2 06:33:57 2008
@@ -478,7 +478,7 @@
      * @return a String with HTML tags into pure text
      * @throws IOException if any
      */
-    private static String toText( String str )
+    protected static String toText( String str )
         throws IOException
     {
         if ( StringUtils.isEmpty( str ) )

Added: 
maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/PluginHelpGeneratorTest.java
URL: 
http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/PluginHelpGeneratorTest.java?rev=617806&view=auto
==============================================================================
--- 
maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/PluginHelpGeneratorTest.java
 (added)
+++ 
maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/PluginHelpGeneratorTest.java
 Sat Feb  2 06:33:57 2008
@@ -0,0 +1,43 @@
+package org.apache.maven.tools.plugin.generator;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class PluginHelpGeneratorTest
+    extends AbstractGeneratorTestCase
+{
+    public void testToText()
+        throws Exception
+    {
+        String javadoc = "";
+        assertEquals( "", PluginHelpGenerator.toText( javadoc ) );
+
+        // true HTML
+        javadoc = "Generates <i>something</i> for the project.";
+        assertEquals( "Generates something for the project.", 
PluginHelpGenerator.toText( javadoc ) );
+
+        // wrong HTML
+        javadoc = "Generates <i>something</i> <b> for the project.";
+        assertEquals( "Generates something for the project.", 
PluginHelpGenerator.toText( javadoc ) );
+    }
+}
\ No newline at end of file

Propchange: 
maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/PluginHelpGeneratorTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugin-tools/trunk/maven-plugin-tools-api/src/test/java/org/apache/maven/tools/plugin/generator/PluginHelpGeneratorTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"


Reply via email to