hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r755563 - /httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/TestEnglishReasonPhraseCatalog.java
Date Wed, 18 Mar 2009 11:53:14 GMT
Author: sebb
Date: Wed Mar 18 11:53:14 2009
New Revision: 755563

URL: http://svn.apache.org/viewvc?rev=755563&view=rev
Log:
Use assertNotNull rather than assertTrue: simpler, and prevents Eclipse complaining about
subsequent use of the variable.

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

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/TestEnglishReasonPhraseCatalog.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/TestEnglishReasonPhraseCatalog.java?rev=755563&r1=755562&r2=755563&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/TestEnglishReasonPhraseCatalog.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/TestEnglishReasonPhraseCatalog.java
Wed Mar 18 11:53:14 2009
@@ -67,7 +67,7 @@
     public void testReasonPhrases() throws IllegalAccessException {
     Field[] publicFields = HttpStatus.class.getFields();
 
-    assertTrue( publicFields != null );
+    assertNotNull( publicFields );
 
     assertTrue( publicFields.length > 0 );
 
@@ -85,8 +85,7 @@
             final int iValue = f.getInt(null);
             final String text = EnglishReasonPhraseCatalog.
                             INSTANCE.getReason(iValue, null);
-            assertTrue("text is null for HttpStatus."+f.getName(), 
-                                   (text != null));
+            assertNotNull("text is null for HttpStatus."+f.getName(), text);
             assertTrue(text.length() > 0);
         }
     }



Mime
View raw message