commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1561014 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/ClassPathUtilsTest.java
Date Fri, 24 Jan 2014 14:03:52 GMT
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");



Mime
View raw message