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 2011/12/29 15:22:13 UTC
svn commit: r1225542 - in /cxf/branches/2.3.x-fixes: ./
systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/
systests/jaxrs/src/test/resources/jaxrs_spring/WEB-INF/
Author: sergeyb
Date: Thu Dec 29 14:22:13 2011
New Revision: 1225542
URL: http://svn.apache.org/viewvc?rev=1225542&view=rev
Log:
Merged revisions 1225540 via svnmerge from
https://svn.apache.org/repos/asf/cxf/branches/2.4.x-fixes
................
r1225540 | sergeyb | 2011-12-29 14:19:46 +0000 (Thu, 29 Dec 2011) | 9 lines
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.3.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSimple.java
- copied unchanged from r1225540, cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSimple.java
Modified:
cxf/branches/2.3.x-fixes/ (props changed)
cxf/branches/2.3.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceCreatedSpringBookTest.java
cxf/branches/2.3.x-fixes/systests/jaxrs/src/test/resources/jaxrs_spring/WEB-INF/beans.xml
Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec 29 14:22:13 2011
@@ -1,2 +1,2 @@
-/cxf/branches/2.4.x-fixes:1221206,1221210,1221223,1221227,1221910,1222654
-/cxf/trunk:1221204,1221208,1221221,1221226,1222652
+/cxf/branches/2.4.x-fixes:1221206,1221210,1221223,1221227,1221910,1222654,1225540
+/cxf/trunk:1221204,1221208,1221221,1221226,1222652,1225538
Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.3.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceCreatedSpringBookTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceCreatedSpringBookTest.java?rev=1225542&r1=1225541&r2=1225542&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceCreatedSpringBookTest.java (original)
+++ cxf/branches/2.3.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceCreatedSpringBookTest.java Thu Dec 29 14:22:13 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.3.x-fixes/systests/jaxrs/src/test/resources/jaxrs_spring/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/systests/jaxrs/src/test/resources/jaxrs_spring/WEB-INF/beans.xml?rev=1225542&r1=1225541&r2=1225542&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/systests/jaxrs/src/test/resources/jaxrs_spring/WEB-INF/beans.xml (original)
+++ cxf/branches/2.3.x-fixes/systests/jaxrs/src/test/resources/jaxrs_spring/WEB-INF/beans.xml Thu Dec 29 14:22:13 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"
@@ -38,16 +31,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 -->
+