cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1225540 - in /cxf/branches/2.4.x-fixes: ./ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ systests/jaxrs/src/test/resources/jaxrs_spring/WEB-INF/
Date Thu, 29 Dec 2011 14:19:47 GMT
Author: sergeyb
Date: Thu Dec 29 14:19:46 2011
New Revision: 1225540

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

........
  r1225538 | sergeyb | 2011-12-29 14:17:28 +0000 (Thu, 29 Dec 2011) | 1 line
  
  Adding some more tests with URIs containing matrix params
........

Added:
    cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSimple.java
      - copied unchanged from r1225538, cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSimple.java
Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceCreatedSpringBookTest.java
    cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/resources/jaxrs_spring/WEB-INF/beans.xml

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec 29 14:19:46 2011
@@ -1 +1 @@
-/cxf/trunk:1225217,1225494,1225521
+/cxf/trunk:1225217,1225494,1225521,1225538

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

Modified: cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceCreatedSpringBookTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceCreatedSpringBookTest.java?rev=1225540&r1=1225539&r2=1225540&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceCreatedSpringBookTest.java
(original)
+++ cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceCreatedSpringBookTest.java
Thu Dec 29 14:19:46 2011
@@ -25,6 +25,7 @@ import java.net.URLConnection;
 
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.io.CachedOutputStream;
+import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -39,10 +40,34 @@ public class JAXRSClientServerResourceCr
     }
     
     @Test
+    public void testGetBookSimple() throws Exception {
+        
+        String address =
+            "http://localhost:" + PORT + "/webapp/rest/simplebooks/444";
+        assertEquals(444L, WebClient.create(address).get(Book.class).getId());
+    }
+    
+    @Test
+    public void testGetBookSimpleMatrixEnd() throws Exception {
+        
+        String address =
+            "http://localhost:" + PORT + "/webapp/rest/simplebooks/444;bookId=ssn";
+        assertEquals(444L, WebClient.create(address).get(Book.class).getId());
+    }
+    
+    @Test
+    public void testGetBookSimpleMatrixMiddle() throws Exception {
+        
+        String address =
+            "http://localhost:" + PORT + "/webapp/rest/simplebooks/444;bookId=ssn/book";
+        assertEquals(444L, WebClient.create(address).get(Book.class).getId());
+    }
+    
+    @Test
     public void testGetBook123() throws Exception {
         
         String endpointAddress =
-            "http://localhost:" + PORT + "/webapp/bookstore/books/123"; 
+            "http://localhost:" + PORT + "/webapp/rest/bookstore/books/123"; 
         URL url = new URL(endpointAddress);
         URLConnection connect = url.openConnection();
         connect.addRequestProperty("Accept", "application/xml");
@@ -59,7 +84,7 @@ public class JAXRSClientServerResourceCr
     public void testPetStore() throws Exception {
         
         String endpointAddress =
-            "http://localhost:" + PORT + "/webapp/petstore/pets/24"; 
+            "http://localhost:" + PORT + "/webapp/rest/petstore/pets/24"; 
         URL url = new URL(endpointAddress);
         URLConnection connect = url.openConnection();
         connect.addRequestProperty("Accept", "text/xml");

Modified: cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/resources/jaxrs_spring/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/resources/jaxrs_spring/WEB-INF/beans.xml?rev=1225540&r1=1225539&r2=1225540&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/resources/jaxrs_spring/WEB-INF/beans.xml
(original)
+++ cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/resources/jaxrs_spring/WEB-INF/beans.xml
Thu Dec 29 14:19:46 2011
@@ -17,13 +17,6 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<!-- START SNIPPET: beans -->
-<!--beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:simple="http://cxf.apache.org/simple"
-  xsi:schemaLocation="
-  http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-  http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd"-->
 <beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:jaxrs="http://cxf.apache.org/jaxrs"
@@ -37,16 +30,16 @@ http://cxf.apache.org/schemas/jaxrs.xsd"
   <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
   
   <jaxrs:server id="bookservice"
-		        address="/">
+		        address="/rest">
     <jaxrs:serviceBeans>
       <ref bean="petstore"/>	
       <ref bean="bookstore"/>
+      <ref bean="bookstoreSimple"/>
     </jaxrs:serviceBeans>		   
   </jaxrs:server>
-  <bean id="bookstore" scope="prototype" class="org.apache.cxf.systest.jaxrs.BookStore">
-  </bean>
-  <bean id="petstore" scope="prototype" class="org.apache.cxf.systest.jaxrs.PetStore">
-  </bean>
+  <bean id="bookstore" scope="prototype" class="org.apache.cxf.systest.jaxrs.BookStore"/>
+  <bean id="petstore" scope="prototype" class="org.apache.cxf.systest.jaxrs.PetStore"/>
+  <bean id="bookstoreSimple" class="org.apache.cxf.systest.jaxrs.BookStoreSimple"/>
 
 </beans>
-<!-- END SNIPPET: beans -->
+



Mime
View raw message