o added test case
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@617806 13f79535-47bb-0310-9956-ffa450edef68master
parent
a850c5bd8a
commit
20347131d3
|
|
@ -478,7 +478,7 @@ public class PluginHelpGenerator
|
|||
* @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 ) )
|
||||
|
|
|
|||
|
|
@ -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:vincent.siveton@gmail.com">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 ) );
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue