[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpcomponents-commits
Subject:    [httpcomponents-core] 01/02: Corrected asserts in Http1IntegrationTest#testExpectationFailed test ca
From:       olegk () apache ! org
Date:       2022-10-26 12:54:24
Message-ID: 20221026130037.B4069440184 () gitbox2-he-fi ! apache ! org
[Download RAW message or body]

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

olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git

commit 793bbc2dc2d1baf05f3a337e1e4ca1df0b3a6686
Author: Oleg Kalnichevski <olegk@apache.org>
AuthorDate: Wed Oct 26 14:49:28 2022 +0200

    Corrected asserts in Http1IntegrationTest#testExpectationFailed test case
---
 .../org/apache/hc/core5/testing/nio/Http1IntegrationTest.java     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http1IntegrationTest.java \
b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http1IntegrationTest.java
 index e3c471ac0..73eb29a19 100644
--- a/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http1IntegrationTest.java
                
+++ b/httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/Http1IntegrationTest.java
 @@ -783,7 +783,7 @@ public abstract class Http1IntegrationTest {
         final HttpResponse response1 = result1.getHead();
         Assertions.assertNotNull(response1);
         Assertions.assertEquals(200, response1.getCode());
-        Assertions.assertNotNull("All is well", result1.getBody());
+        Assertions.assertEquals("All is well", result1.getBody());
 
         Assertions.assertTrue(ioSession.isOpen());
 
@@ -796,7 +796,7 @@ public abstract class Http1IntegrationTest {
         final HttpResponse response2 = result2.getHead();
         Assertions.assertNotNull(response2);
         Assertions.assertEquals(HttpStatus.SC_UNAUTHORIZED, response2.getCode());
-        Assertions.assertNotNull("You shall not pass", result2.getBody());
+        Assertions.assertEquals("You shall not pass", result2.getBody());
 
         Assertions.assertTrue(ioSession.isOpen());
 
@@ -810,7 +810,7 @@ public abstract class Http1IntegrationTest {
         final HttpResponse response3 = result3.getHead();
         Assertions.assertNotNull(response3);
         Assertions.assertEquals(200, response3.getCode());
-        Assertions.assertNotNull("All is well", result3.getBody());
+        Assertions.assertEquals("All is well", result3.getBody());
 
         Assertions.assertTrue(ioSession.isOpen());
 
@@ -823,7 +823,7 @@ public abstract class Http1IntegrationTest {
         final HttpResponse response4 = result4.getHead();
         Assertions.assertNotNull(response4);
         Assertions.assertEquals(HttpStatus.SC_UNAUTHORIZED, response4.getCode());
-        Assertions.assertNotNull("You shall not pass", result4.getBody());
+        Assertions.assertEquals("You shall not pass", result4.getBody());
 
         Assertions.assertFalse(ioSession.isOpen());
     }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic