|
26 | 26 | import java.io.File; |
27 | 27 | import java.io.FileReader; |
28 | 28 | import java.io.IOException; |
| 29 | +import java.util.Locale; |
29 | 30 |
|
30 | 31 | /** |
31 | 32 | * @author <a href="mailto:[email protected]">Maria Odea Ching</a> |
@@ -66,7 +67,7 @@ public void testDefaultConfiguration() |
66 | 67 |
|
67 | 68 | //check if there's a link to the javadoc files |
68 | 69 | String str = readFile( new File( xrefDir, "def/configuration/AppSample.html" ) ); |
69 | | - assertTrue( str.toLowerCase().indexOf( "/apidocs/def/configuration/AppSample.html\"".toLowerCase() ) != -1 ); |
| 70 | + assertTrue( str.toLowerCase().indexOf( "/apidocs/def/configuration/appsample.html\"" ) != -1 ); |
70 | 71 |
|
71 | 72 | str = readFile( new File( xrefDir, "def/configuration/App.html" ) ); |
72 | 73 | assertTrue( str.toLowerCase().indexOf( "/apidocs/def/configuration/app.html\"".toLowerCase() ) != -1 ); |
@@ -107,10 +108,10 @@ public void testJdk4Configuration() |
107 | 108 |
|
108 | 109 | //check if there's a link to the javadoc files |
109 | 110 | String str = readFile( new File( xrefDir, "def/configuration/AppSample.html" ) ); |
110 | | - assertTrue( str.toLowerCase().indexOf( "/apidocs/def/configuration/AppSample.html\"".toLowerCase() ) != -1 ); |
| 111 | + assertTrue( str.toLowerCase().indexOf( "/apidocs/def/configuration/appsample.html\"" ) != -1 ); |
111 | 112 |
|
112 | 113 | str = readFile( new File( xrefDir, "def/configuration/App.html" ) ); |
113 | | - assertTrue( str.toLowerCase().indexOf( "/apidocs/def/configuration/app.html\"".toLowerCase() ) != -1 ); |
| 114 | + assertTrue( str.toLowerCase( Locale.US ).indexOf( "/apidocs/def/configuration/app.html\"" ) != -1 ); |
114 | 115 |
|
115 | 116 | // check if encoding is UTF-8, the default value |
116 | 117 | assertTrue( str.indexOf( "text/html; charset=UTF-8" ) != -1 ); |
@@ -148,10 +149,10 @@ public void testJdk6Configuration() |
148 | 149 |
|
149 | 150 | //check if there's a link to the javadoc files |
150 | 151 | String str = readFile( new File( xrefDir, "def/configuration/AppSample.html" ) ); |
151 | | - assertTrue( str.toLowerCase().indexOf( "/apidocs/def/configuration/AppSample.html\"".toLowerCase() ) != -1 ); |
| 152 | + assertTrue( str.toLowerCase( Locale.US ).indexOf( "/apidocs/def/configuration/appsample.html\"" ) != -1 ); |
152 | 153 |
|
153 | 154 | str = readFile( new File( xrefDir, "def/configuration/App.html" ) ); |
154 | | - assertTrue( str.toLowerCase().indexOf( "/apidocs/def/configuration/app.html\"".toLowerCase() ) != -1 ); |
| 155 | + assertTrue( str.toLowerCase( Locale.US ).indexOf( "/apidocs/def/configuration/app.html\"" ) != -1 ); |
155 | 156 |
|
156 | 157 | // check if encoding is UTF-8, the default value |
157 | 158 | assertTrue( str.indexOf( "text/html; charset=UTF-8" ) != -1 ); |
@@ -193,10 +194,10 @@ public void testJdk7Configuration() |
193 | 194 |
|
194 | 195 | //check if there's a link to the javadoc files |
195 | 196 | String str = readFile( new File( xrefDir, "def/configuration/AppSample.html" ) ); |
196 | | - assertTrue( str.toLowerCase().indexOf( "/apidocs/def/configuration/AppSample.html\"".toLowerCase() ) != -1 ); |
| 197 | + assertTrue( str.toLowerCase( Locale.US ).indexOf( "/apidocs/def/configuration/appsample.html\"" ) != -1 ); |
197 | 198 |
|
198 | 199 | str = readFile( new File( xrefDir, "def/configuration/App.html" ) ); |
199 | | - assertTrue( str.toLowerCase().indexOf( "/apidocs/def/configuration/app.html\"".toLowerCase() ) != -1 ); |
| 200 | + assertTrue( str.toLowerCase( Locale.US ).indexOf( "/apidocs/def/configuration/app.html\"" ) != -1 ); |
200 | 201 |
|
201 | 202 | // check if encoding is UTF-8, the default value |
202 | 203 | assertTrue( str.indexOf( "text/html; charset=UTF-8" ) != -1 ); |
@@ -234,7 +235,7 @@ public void testJdk8Configuration() |
234 | 235 |
|
235 | 236 | //check if there's a link to the javadoc files |
236 | 237 | String str = readFile( new File( xrefDir, "def/configuration/AppSample.html" ) ); |
237 | | - assertTrue( str.toLowerCase().indexOf( "/apidocs/def/configuration/AppSample.html\"".toLowerCase() ) != -1 ); |
| 238 | + assertTrue( str.toLowerCase().indexOf( "/apidocs/def/configuration/appsample.html\"" ) != -1 ); |
238 | 239 |
|
239 | 240 | str = readFile( new File( xrefDir, "def/configuration/App.html" ) ); |
240 | 241 | assertTrue( str.toLowerCase().indexOf( "/apidocs/def/configuration/app.html\"".toLowerCase() ) != -1 ); |
@@ -275,15 +276,15 @@ public void testNoJavadocLink() |
275 | 276 | //check if there's a link to the javadoc files |
276 | 277 | String str = readFile( new File( xrefDir, "nojavadoclink/configuration/AppSample.html" ) ); |
277 | 278 | assertTrue( |
278 | | - str.toLowerCase().indexOf( "/apidocs/nojavadoclink/configuration/AppSample.html\"".toLowerCase() ) == -1 ); |
| 279 | + str.toLowerCase( Locale.US ).indexOf( "/apidocs/nojavadoclink/configuration/appsample.html\"" ) == -1 ); |
279 | 280 |
|
280 | 281 | str = readFile( new File( xrefDir, "nojavadoclink/configuration/App.html" ) ); |
281 | 282 | assertTrue( |
282 | | - str.toLowerCase().indexOf( "/apidocs/nojavadoclink/configuration/app.html\"".toLowerCase() ) == -1 ); |
| 283 | + str.toLowerCase( Locale.US ).indexOf( "/apidocs/nojavadoclink/configuration/app.html\"" ) == -1 ); |
283 | 284 |
|
284 | 285 | str = readFile( new File( xrefDir, "nojavadoclink/configuration/sample/Sample.html" ) ); |
285 | 286 | assertTrue( str.toLowerCase().indexOf( |
286 | | - "/apidocs/nojavadoclink/configuration/sample/sample.html\"".toLowerCase() ) == -1 ); |
| 287 | + "/apidocs/nojavadoclink/configuration/sample/sample.html\"" ) == -1 ); |
287 | 288 |
|
288 | 289 | // check if encoding is ISO-8859-1, like specified in the plugin configuration |
289 | 290 | assertTrue( str.indexOf( "text/html; charset=ISO-8859-1" ) != -1 ); |
@@ -335,10 +336,10 @@ public void testNoJavadocDir() |
335 | 336 |
|
336 | 337 | //check if there's a link to the javadoc files |
337 | 338 | String str = readFile( new File( xrefDir, "nojavadocdir/test/AppSample.html" ) ); |
338 | | - assertTrue( str.toLowerCase().indexOf( "/apidocs/nojavadocdir/test/AppSample.html".toLowerCase() ) != -1 ); |
| 339 | + assertTrue( str.toLowerCase( Locale.US ).indexOf( "/apidocs/nojavadocdir/test/appsample.html") != -1 ); |
339 | 340 |
|
340 | 341 | str = readFile( new File( xrefDir, "nojavadocdir/test/App.html" ) ); |
341 | | - assertTrue( str.toLowerCase().indexOf( "/apidocs/nojavadocdir/test/app.html".toLowerCase() ) != -1 ); |
| 342 | + assertTrue( str.toLowerCase( Locale.US ).indexOf( "/apidocs/nojavadocdir/test/app.html" ) != -1 ); |
342 | 343 |
|
343 | 344 | } |
344 | 345 |
|
|
0 commit comments