This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch WAGON-541
in repository https://gitbox.apache.org/repos/asf/maven-wagon.git

commit 7bfe24467e547976000ef2ce4e966eeea45f3128
Author: Hervé Boutemy <hbout...@apache.org>
AuthorDate: Mon Oct 21 11:23:08 2019 -0300

    WAGON-541 fixed code style in tests
---
 .../providers/http/LightweightHttpWagonTest.java     | 13 +++++++------
 .../wagon/providers/http/HttpWagonErrorTest.java     | 20 ++++++++++----------
 2 files changed, 17 insertions(+), 16 deletions(-)

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 @@ public class LightweightHttpWagonTest
     }
 
     @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 @@ public class LightweightHttpWagonTest
                                     + " 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 @@ public class LightweightHttpWagonTest
                     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 @@ public class HttpWagonErrorTest
 
         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 @@ public class HttpWagonErrorTest
 
         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 @@ public class HttpWagonErrorTest
 
         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 @@ public class HttpWagonErrorTest
 
         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 @@ public class HttpWagonErrorTest
 
         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() );
     }
 }

Reply via email to