commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r911954 - /commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/enums/EnumUtilsTest.java
Date Fri, 19 Feb 2010 19:54:13 GMT
Author: niallp
Date: Fri Feb 19 19:54:13 2010
New Revision: 911954

URL: http://svn.apache.org/viewvc?rev=911954&view=rev
Log:
LANG-76 Add a test case to try and reproduce

Modified:
    commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/enums/EnumUtilsTest.java

Modified: commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/enums/EnumUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/enums/EnumUtilsTest.java?rev=911954&r1=911953&r2=911954&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/enums/EnumUtilsTest.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/enums/EnumUtilsTest.java
Fri Feb 19 19:54:13 2010
@@ -157,4 +157,21 @@
         } catch (IllegalArgumentException ex) {}
     }
 
+    /** Test for LANG-76 **/
+    public void testGetEnum_LANG76() {
+        Object obj = EnumUtils.getEnum(Lang76Enum.class, "1");
+        assertNotNull(obj);
+        assertEquals("EnumUtilsTest.Lang76Enum[1]", obj.toString());
+    }
+
+    /** Test Enum for LANG-76 **/
+    public static final class Lang76Enum  extends Enum {
+        public static final Lang76Enum ONE     = new Lang76Enum("1");
+        public static final Lang76Enum TWO     = new Lang76Enum("2");
+        public static final Lang76Enum THREE   = new Lang76Enum("3");
+
+        private Lang76Enum(String suit) {
+            super(suit);
+        }
+    }
 }



Mime
View raw message