hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r936114 - /httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestIdentityInputStream.java
Date Tue, 20 Apr 2010 23:21:20 GMT
Author: sebb
Date: Tue Apr 20 23:21:20 2010
New Revision: 936114

URL: http://svn.apache.org/viewvc?rev=936114&view=rev
Log:
Use assertEquals(exp,actual) rather than assertTrue(actual==exp) to give more info on failure

Modified:
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestIdentityInputStream.java

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestIdentityInputStream.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestIdentityInputStream.java?rev=936114&r1=936113&r2=936114&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestIdentityInputStream.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestIdentityInputStream.java
Tue Apr 20 23:21:20 2010
@@ -92,7 +92,7 @@ public class TestIdentityInputStream ext
         instream.close();
         instream.close();
         
-        assertTrue(instream.available() == 0);
+        assertEquals(0, instream.available());
         byte[] tmp = new byte[2];
         assertEquals(-1, instream.read(tmp, 0, tmp.length));
         assertEquals(-1, instream.read());
@@ -105,7 +105,7 @@ public class TestIdentityInputStream ext
         SessionInputBufferMockup receiver = new SessionInputBufferMockup(input);
         IdentityInputStream instream = new IdentityInputStream(receiver);
         instream.read();
-        assertTrue(instream.available() == 2);        
+        assertEquals(2, instream.available());        
     }
     
 }



Mime
View raw message