You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2014/01/24 15:03:52 UTC

svn commit: r1561014 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/ClassPathUtilsTest.java

Author: britter
Date: Fri Jan 24 14:03:52 2014
New Revision: 1561014

URL: http://svn.apache.org/r1561014
Log:
Add test for ClassPathUtils accessebility

Modified:
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/ClassPathUtilsTest.java

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/ClassPathUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/ClassPathUtilsTest.java?rev=1561014&r1=1561013&r2=1561014&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/ClassPathUtilsTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/ClassPathUtilsTest.java Fri Jan 24 14:03:52 2014
@@ -17,7 +17,14 @@
 package org.apache.commons.lang3;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Modifier;
+
+import org.apache.commons.lang3.text.WordUtils;
 import org.junit.Test;
 
 /**
@@ -25,6 +32,16 @@ import org.junit.Test;
  */
 public class ClassPathUtilsTest {
 
+    @Test
+    public void testConstructor() {
+        assertNotNull(new ClassPathUtils());
+        final Constructor<?>[] cons = ClassPathUtils.class.getDeclaredConstructors();
+        assertEquals(1, cons.length);
+        assertTrue(Modifier.isPublic(cons[0].getModifiers()));
+        assertTrue(Modifier.isPublic(ClassPathUtils.class.getModifiers()));
+        assertFalse(Modifier.isFinal(ClassPathUtils.class.getModifiers()));
+    }
+
     @Test(expected = NullPointerException.class)
     public void testToFullyQualifiedNameNullClassString() throws Exception {
         ClassPathUtils.toFullyQualifiedName((Class<?>) null, "Test.properties");