hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1788697 - /httpcomponents/httpclient/branches/4.6.x/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMinimalClientRequestExecution.java
Date Sun, 26 Mar 2017 00:30:32 GMT
Author: ggregory
Date: Sun Mar 26 00:30:32 2017
New Revision: 1788697

URL: http://svn.apache.org/viewvc?rev=1788697&view=rev
Log:
Add messages to JUnit assertions.

Modified:
    httpcomponents/httpclient/branches/4.6.x/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMinimalClientRequestExecution.java

Modified: httpcomponents/httpclient/branches/4.6.x/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMinimalClientRequestExecution.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.6.x/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMinimalClientRequestExecution.java?rev=1788697&r1=1788696&r2=1788697&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.6.x/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMinimalClientRequestExecution.java
(original)
+++ httpcomponents/httpclient/branches/4.6.x/httpclient/src/test/java/org/apache/http/impl/client/integration/TestMinimalClientRequestExecution.java
Sun Mar 26 00:30:32 2017
@@ -91,10 +91,11 @@ public class TestMinimalClientRequestExe
             for (final Header header: headers) {
                 headerSet.add(header.getName().toLowerCase(Locale.ROOT));
             }
-            Assert.assertEquals(3, headerSet.size());
-            Assert.assertTrue(headerSet.contains("connection"));
-            Assert.assertTrue(headerSet.contains("host"));
-            Assert.assertTrue(headerSet.contains("user-agent"));
+            String headerSetStr = headerSet.toString();
+			Assert.assertEquals(headerSetStr, 3, headerSet.size());
+            Assert.assertTrue(headerSetStr, headerSet.contains("connection"));
+            Assert.assertTrue(headerSetStr, headerSet.contains("host"));
+            Assert.assertTrue(headerSetStr, headerSet.contains("user-agent"));
         }
     }
 



Mime
View raw message