You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by se...@apache.org on 2009/03/18 12:53:14 UTC

svn commit: r755563 - /httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/TestEnglishReasonPhraseCatalog.java

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);
         }
     }