You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2019/07/28 09:24:09 UTC
[maven-javadoc-plugin] 02/02: [MJAVADOC-616] Adjust test to please
generate-test-metadata goal
This is an automated email from the ASF dual-hosted git repository.
rfscholte pushed a commit to branch MJAVADOC-616
in repository https://gitbox.apache.org/repos/asf/maven-javadoc-plugin.git
commit 1969ceaa451833ab147d061fcde2032f32408854
Author: rfscholte <rf...@apache.org>
AuthorDate: Sun Jul 28 11:23:59 2019 +0200
[MJAVADOC-616] Adjust test to please generate-test-metadata goal
---
.../org/apache/maven/plugins/javadoc/JavadocReportTest.java | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
index 9c7e23f..4e01410 100644
--- a/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
+++ b/src/test/java/org/apache/maven/plugins/javadoc/JavadocReportTest.java
@@ -72,7 +72,7 @@ public class JavadocReportTest
private static final char LINE_SEPARATOR = ' ';
- public static final String OPTIONS_UMLAUT_ENCODING_Ö_Ä_Ü_ß = "Options Umlaut Encoding ö ä ü ß";
+ public static final String OPTIONS_UMLAUT_ENCODING = "Options Umlaut Encoding ö ä ü ß";
/** flag to copy repo only one time */
private static boolean TEST_REPO_CREATED = false;
@@ -559,9 +559,9 @@ public class JavadocReportTest
* @throws Exception if any
*/
public void testOptionsUmlautEncoding()
- throws Exception
+ throws Exception
{
- File testPom = new File(unit, "optionsumlautencoding-test/optionsumlautencoding-test-plugin-config.xml" );
+ File testPom = new File( unit, "optionsumlautencoding-test/optionsumlautencoding-test-plugin-config.xml" );
JavadocReport mojo = lookupMojo( testPom );
mojo.execute();
@@ -570,18 +570,19 @@ public class JavadocReportTest
// check for a part of the window title
String content;
- String expected = OPTIONS_UMLAUT_ENCODING_Ö_Ä_Ü_ß;
+ String expected;
if ( JavaVersion.JAVA_VERSION.isAtLeast( "9" ) )
{
content = readFile( optionsFile, StandardCharsets.UTF_8 );
+ expected = OPTIONS_UMLAUT_ENCODING;
}
else
{
content = readFile( optionsFile, Charset.defaultCharset() );
- expected = new String(expected.getBytes(Charset.defaultCharset()));
+ expected = new String( OPTIONS_UMLAUT_ENCODING.getBytes( Charset.defaultCharset() ) );
}
- assertTrue( content.contains(expected) );
+ assertTrue( content.contains( expected ) );
File apidocs = new File( getBasedir(), "target/test/unit/optionsumlautencoding-test/target/site/apidocs" );