commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r436670 - /jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/ExceptionUtilsTestCase.java
Date Fri, 25 Aug 2006 06:11:47 GMT
Author: bayard
Date: Thu Aug 24 23:11:47 2006
New Revision: 436670

URL: http://svn.apache.org/viewvc?rev=436670&view=rev
Log:
Added unit test to enforce the existence of the empty constructor

Modified:
    jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/ExceptionUtilsTestCase.java

Modified: jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/ExceptionUtilsTestCase.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/ExceptionUtilsTestCase.java?rev=436670&r1=436669&r2=436670&view=diff
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/ExceptionUtilsTestCase.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/exception/ExceptionUtilsTestCase.java
Thu Aug 24 23:11:47 2006
@@ -15,6 +15,8 @@
  */
 package org.apache.commons.lang.exception;
 
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Modifier;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.PrintStream;
@@ -115,6 +117,17 @@
         }
     }
 
+    //-----------------------------------------------------------------------
+    
+    public void testConstructor() {
+        assertNotNull(new ExceptionUtils());
+        Constructor[] cons = ExceptionUtils.class.getDeclaredConstructors();
+        assertEquals(1, cons.length);
+        assertEquals(true, Modifier.isPublic(cons[0].getModifiers()));
+        assertEquals(true, Modifier.isPublic(ExceptionUtils.class.getModifiers()));
+        assertEquals(false, Modifier.isFinal(ExceptionUtils.class.getModifiers()));
+    }
+    
     //-----------------------------------------------------------------------
     
     public void testCauseMethodNameOps() {



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message