commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stevencasw...@apache.org
Subject svn commit: r234407 - /jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/ValidateTest.java
Date Mon, 22 Aug 2005 00:55:39 GMT
Author: stevencaswell
Date: Sun Aug 21 17:55:37 2005
New Revision: 234407

URL: http://svn.apache.org/viewcvs?rev=234407&view=rev
Log:
increase Validate test coverage as reported by clover

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

Modified: jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/ValidateTest.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/ValidateTest.java?rev=234407&r1=234406&r2=234407&view=diff
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/ValidateTest.java (original)
+++ jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/ValidateTest.java Sun
Aug 21 17:55:37 2005
@@ -15,6 +15,8 @@
  */
 package org.apache.commons.lang;
 
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Modifier;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -363,6 +365,7 @@
         coll.add("a");
         coll.add("b");
         Validate.allElementsOfType(coll, String.class, "MSG");
+        Validate.allElementsOfType(coll, String.class);
         try {
             Validate.allElementsOfType(coll, Integer.class, "MSG");
             fail("Expecting IllegalArgumentException");
@@ -395,4 +398,13 @@
         }
     }
 
+    public void testConstructor() {
+        assertNotNull(new Validate());
+        Constructor[] cons = Validate.class.getDeclaredConstructors();
+        assertEquals(1, cons.length);
+        assertEquals(true, Modifier.isPublic(cons[0].getModifiers()));
+        assertEquals(true, Modifier.isPublic(Validate.class.getModifiers()));
+        assertEquals(false, Modifier.isFinal(Validate.class.getModifiers()));
+    }
+    
 }



---------------------------------------------------------------------
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