You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2012/04/22 19:10:45 UTC

svn commit: r1328906 - in /cxf/branches/2.5.x-fixes: ./ tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java

Author: sergeyb
Date: Sun Apr 22 17:10:45 2012
New Revision: 1328906

URL: http://svn.apache.org/viewvc?rev=1328906&view=rev
Log:
Merged revisions 1328894 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1328894 | sergeyb | 2012-04-22 17:28:17 +0100 (Sun, 22 Apr 2012) | 1 line
  
  [CXF-4256] Some updates to the code generating enum classes
........

Modified:
    cxf/branches/2.5.x-fixes/   (props changed)
    cxf/branches/2.5.x-fixes/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java

Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1328894

Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.5.x-fixes/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java?rev=1328906&r1=1328905&r2=1328906&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java (original)
+++ cxf/branches/2.5.x-fixes/tools/wadlto/jaxrs/src/test/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainerTest.java Sun Apr 22 17:10:45 2012
@@ -32,9 +32,42 @@ import org.junit.Test;
 
 public class JAXRSContainerTest extends ProcessorTestBase {
 
+    public enum Theid {
+        ONE("one"),
+        TWO("two");
+        private String value;
+        private Theid(String v) {
+            this.value = v;
+        }
+        public static Theid fromString(String value) {
+            if (value != null) {
+                for (Theid v : Theid.values()) {
+                    if (value.equalsIgnoreCase(v.value)) {
+                        return v;
+                    }
+                }
+            }
+            throw new IllegalArgumentException();
+        }
+    }
+    
+    @Test    
+    public void test1() {
+        try {
+        assertSame(Theid.ONE, Theid.fromString("on"));
+        fail();
+        } catch (IllegalArgumentException ex) {
+            
+        }
+    }
+    
+    
     @Test    
     public void testCodeGenInterfaces() {
         try {
+            
+            
+            
             JAXRSContainer container = new JAXRSContainer(null);
 
             ToolContext context = new ToolContext();