cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1492277 - /cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/ResourceUtilsTest.java
Date Wed, 12 Jun 2013 16:46:52 GMT
Author: sergeyb
Date: Wed Jun 12 16:46:52 2013
New Revision: 1492277

URL: http://svn.apache.org/r1492277
Log:
[CXF-5066] Adding a test with @Override

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/ResourceUtilsTest.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/ResourceUtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/ResourceUtilsTest.java?rev=1492277&r1=1492276&r2=1492277&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/ResourceUtilsTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/ResourceUtilsTest.java
Wed Jun 12 16:46:52 2013
@@ -132,6 +132,17 @@ public class ResourceUtilsTest extends A
         assertTrue(types.containsKey(Chapter.class));
     }
     
+    @Test
+    public void testClassResourceInfoWithOverride() throws Exception {
+        ClassResourceInfo cri = 
+            ResourceUtils.createClassResourceInfo(ExampleImpl.class, ExampleImpl.class, true,
true);
+        assertNotNull(cri);
+        Method m = ExampleImpl.class.getMethod("get");
+        OperationResourceInfo ori = cri.getMethodDispatcher().getOperationResourceInfo(m);
+        assertNotNull(ori);
+        assertEquals("GET", ori.getHttpMethod());
+    }
+    
     public interface IProductResource {
         @Path("/parts")
         IPartsResource getParts();
@@ -156,4 +167,19 @@ public class ResourceUtilsTest extends A
         @GET
         Book get();
     }
+    
+    @Path("example")
+    public interface Example {
+         
+        @GET
+        Book get();
+    }
+
+    public static class ExampleImpl implements Example {
+
+        @Override
+        public Book get() {
+            return null;
+        }
+    }
 }



Mime
View raw message