cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1396585 - /cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/WadlGeneratorTest.java
Date Wed, 10 Oct 2012 13:16:19 GMT
Author: coheigea
Date: Wed Oct 10 13:16:19 2012
New Revision: 1396585

URL: http://svn.apache.org/viewvc?rev=1396585&view=rev
Log:
Fixing another failing JAX-RS test on IBM

Modified:
    cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/WadlGeneratorTest.java

Modified: cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/WadlGeneratorTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/WadlGeneratorTest.java?rev=1396585&r1=1396584&r2=1396585&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/WadlGeneratorTest.java
(original)
+++ cxf/trunk/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/WadlGeneratorTest.java
Wed Oct 10 13:16:19 2012
@@ -31,6 +31,7 @@ import javax.ws.rs.core.Response;
 import org.w3c.dom.Document;
 
 import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.endpoint.EndpointImpl;
 import org.apache.cxf.jaxrs.JAXRSServiceImpl;
 import org.apache.cxf.jaxrs.impl.MetadataMap;
 import org.apache.cxf.jaxrs.model.ClassResourceInfo;
@@ -99,12 +100,10 @@ public class WadlGeneratorTest extends A
     }
     
     private Message mockMessage(String baseAddress, String pathInfo, String query,
-                                List<ClassResourceInfo> cris) {
+                                List<ClassResourceInfo> cris) throws Exception {
         Message m = new MessageImpl();
         Exchange e = new ExchangeImpl();
         e.put(Service.class, new JAXRSServiceImpl(cris));
-        Endpoint endpoint = control.createMock(Endpoint.class);
-        e.put(Endpoint.class, endpoint);
         m.setExchange(e);
         control.reset();
         ServletDestination d = control.createMock(ServletDestination.class);
@@ -112,8 +111,10 @@ public class WadlGeneratorTest extends A
         epr.setAddress(baseAddress);
         d.getEndpointInfo();
         EasyMock.expectLastCall().andReturn(epr).anyTimes();
-        endpoint.getEndpointInfo();
-        EasyMock.expectLastCall().andReturn(epr).anyTimes();
+
+        Endpoint endpoint = new EndpointImpl(null, null, epr);
+        e.put(Endpoint.class, endpoint);
+
         e.setDestination(d);
         BindingInfo bi = control.createMock(BindingInfo.class);
         epr.setBinding(bi);



Mime
View raw message