WAGON-541 fixed code style in tests
diff --git a/wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/LightweightHttpWagonTest.java b/wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/LightweightHttpWagonTest.java
index 1a7de5e..5d2eb57 100644
--- a/wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/LightweightHttpWagonTest.java
+++ b/wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/LightweightHttpWagonTest.java
@@ -73,7 +73,7 @@
}
@Override
- protected void verifyWagonExceptionMessage(Exception e, int forStatusCode, String forUrl, String forReasonPhrase)
+ protected void verifyWagonExceptionMessage( Exception e, int forStatusCode, String forUrl, String forReasonPhrase )
{
// HttpUrlConnection prevents direct API access to the response code or reasonPhrase for any
@@ -135,9 +135,10 @@
+ " the already handled codes",
forStatusCode >= HttpServletResponse.SC_BAD_REQUEST );
- if( e.getCause() != null ){
- assertTrue("TransferFailedException should have the original cause for diagnosis",
- e.getCause() instanceof IOException );
+ if ( e.getCause() != null )
+ {
+ assertTrue( "TransferFailedException should have the original cause for diagnosis",
+ e.getCause() instanceof IOException );
}
// the status code and reason phrase cannot always be learned due to implementation limitations
@@ -145,13 +146,13 @@
assertTrue( "message should always include url",
e.getMessage().startsWith( "Transfer failed for " + forUrl ) );
- if( e.getMessage().length() > ("Transfer failed for " + forUrl).length() )
+ if ( e.getMessage().length() > ( "Transfer failed for " + forUrl ).length() )
{
assertTrue( "message should include url and status code",
e.getMessage().startsWith( "Transfer failed for " + forUrl + " " + forStatusCode ) );
}
- if( e.getMessage().length() > ("Transfer failed for " + forUrl + " " + forStatusCode).length() )
+ if ( e.getMessage().length() > ( "Transfer failed for " + forUrl + " " + forStatusCode ).length() )
{
assertEquals( "message should include url and status code and reason phrase",
"Transfer failed for " + forUrl + " " + forStatusCode + " " + forReasonPhrase,
diff --git a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonErrorTest.java b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonErrorTest.java
index 83d4387..63dd944 100644
--- a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonErrorTest.java
+++ b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonErrorTest.java
@@ -79,8 +79,8 @@
assertNotNull( thrown );
assertEquals( AuthorizationException.class, thrown.getClass() );
- assertEquals("Authentication failed for http://localhost:" + serverPort
- + "/401 401 " + ErrorWithMessageServlet.MESSAGE, thrown.getMessage());
+ assertEquals( "Authentication failed for http://localhost:" + serverPort + "/401 401 "
+ + ErrorWithMessageServlet.MESSAGE, thrown.getMessage() );
}
public void testGet403()
@@ -115,8 +115,8 @@
assertNotNull( thrown );
assertEquals( AuthorizationException.class, thrown.getClass() );
- assertEquals("Authorization failed for http://localhost:" + serverPort
- + "/403 403 " + ErrorWithMessageServlet.MESSAGE, thrown.getMessage());
+ assertEquals( "Authorization failed for http://localhost:" + serverPort + "/403 403 "
+ + ErrorWithMessageServlet.MESSAGE, thrown.getMessage() );
}
public void testGet404()
@@ -151,8 +151,8 @@
assertNotNull( thrown );
assertEquals( ResourceDoesNotExistException.class, thrown.getClass() );
- assertEquals("Resource missing at http://localhost:" + serverPort + "/404 404 "
- + ErrorWithMessageServlet.MESSAGE, thrown.getMessage());
+ assertEquals( "Resource missing at http://localhost:" + serverPort + "/404 404 "
+ + ErrorWithMessageServlet.MESSAGE, thrown.getMessage() );
}
public void testGet407()
@@ -187,8 +187,8 @@
assertNotNull( thrown );
assertEquals( AuthorizationException.class, thrown.getClass() );
- assertEquals("HTTP proxy server authentication failed for http://localhost:" + serverPort
- + "/407 407 " + ErrorWithMessageServlet.MESSAGE, thrown.getMessage());
+ assertEquals( "HTTP proxy server authentication failed for http://localhost:" + serverPort + "/407 407 "
+ + ErrorWithMessageServlet.MESSAGE, thrown.getMessage() );
}
public void testGet500()
@@ -223,7 +223,7 @@
assertNotNull( thrown );
assertEquals( TransferFailedException.class, thrown.getClass() );
- assertEquals("Transfer failed for http://localhost:" + serverPort + "/500 500 "
- + ErrorWithMessageServlet.MESSAGE, thrown.getMessage());
+ assertEquals( "Transfer failed for http://localhost:" + serverPort + "/500 500 "
+ + ErrorWithMessageServlet.MESSAGE, thrown.getMessage() );
}
}