cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1033889 - /cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java
Date Thu, 11 Nov 2010 11:16:01 GMT
Author: gmazza
Date: Thu Nov 11 11:16:01 2010
New Revision: 1033889

URL: http://svn.apache.org/viewvc?rev=1033889&view=rev
Log:
Restoring two tests erroneously removed yesterday.

Modified:
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java?rev=1033889&r1=1033888&r2=1033889&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java
Thu Nov 11 11:16:01 2010
@@ -58,6 +58,20 @@ public class JAXRSHttpsBookTest extends 
     }
     
     @Test
+    public void testGetBook123ProxyWithURLConduitId() throws Exception {
+        
+        BookStore bs = JAXRSClientFactory.create("https://localhost:" + PORT, BookStore.class,

+                                                 CLIENT_CONFIG_FILE2);
+        // just to verify the interface call goes through CGLIB proxy too
+        assertEquals("https://localhost:" + PORT, WebClient.client(bs).getBaseURI().toString());
+        Book b = bs.getSecureBook("123");
+        assertEquals(b.getId(), 123);
+        b = bs.getSecureBook("123");
+        assertEquals(b.getId(), 123);
+    }
+    
+    
+    @Test
     public void testGetBook123ProxyToWebClient() throws Exception {
         
         BookStore bs = JAXRSClientFactory.create("https://localhost:" + PORT, BookStore.class,

@@ -98,6 +112,18 @@ public class JAXRSHttpsBookTest extends 
         Book b = client.get(Book.class);
         assertEquals(123, b.getId());
         
-    }  
+    }
+    
+    @Test
+    public void testGetBook123WebClientWithURLConduitId() throws Exception {
+        
+        WebClient client = WebClient.create("https://localhost:" + PORT, CLIENT_CONFIG_FILE2);
+        assertEquals("https://localhost:" + PORT, client.getBaseURI().toString());
+        
+        client.path("/bookstore/securebooks/123").accept(MediaType.APPLICATION_XML_TYPE);
+        Book b = client.get(Book.class);
+        assertEquals(123, b.getId());
+        
+    }
     
 }



Mime
View raw message