cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1052993 - /cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/uri/JMSEndpointTest.java
Date Mon, 27 Dec 2010 03:38:21 GMT
Author: ningjiang
Date: Mon Dec 27 03:38:20 2010
New Revision: 1052993

URL: http://svn.apache.org/viewvc?rev=1052993&view=rev
Log:
Polish the JMSEndpointTest accorrding to the SOAP over JMS spec

Modified:
    cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/uri/JMSEndpointTest.java

Modified: cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/uri/JMSEndpointTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/uri/JMSEndpointTest.java?rev=1052993&r1=1052992&r2=1052993&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/uri/JMSEndpointTest.java
(original)
+++ cxf/trunk/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/uri/JMSEndpointTest.java
Mon Dec 27 03:38:20 2010
@@ -39,6 +39,7 @@ public class JMSEndpointTest extends Ass
     public void testQueueParameters() throws Exception {
         JMSEndpoint endpoint = resolveEndpoint("jms:queue:Foo.Bar?foo=bar&foo2=bar2");
         assertTrue(endpoint instanceof JMSQueueEndpoint);
+        System.out.println("The Request URI is " + endpoint.getRequestURI());
         assertEquals(endpoint.getDestinationName(), "Foo.Bar");
         assertEquals(endpoint.getJmsVariant(), JMSURIConstants.QUEUE);
         assertEquals(endpoint.getParameters().size(), 2);
@@ -122,14 +123,25 @@ public class JMSEndpointTest extends Ass
     public void testRequestUri() throws Exception {
         JMSEndpoint endpoint = resolveEndpoint("jms:jndi:Foo.Bar?" + "jndiInitialContextFactory"
                                                + "=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
+                                               + "&targetService=greetMe"
+                                               + "&replyToName=replyQueue"
+                                               + "&timeToLive=1000"
+                                               + "&priority=3"
                                                + "&foo=bar"
                                                + "&foo2=bar2");
         assertTrue(endpoint instanceof JMSJNDIEndpoint);
-        assertEquals(endpoint.getParameters().size(), 2);
+        assertEquals(endpoint.getParameters().size(), 3);
         String requestUri = endpoint.getRequestURI();
+        System.out.println("request uri " + requestUri);
+        // Checking what's the request uri should have
         assertTrue(requestUri.startsWith("jms:jndi:Foo.Bar?"));
         assertTrue(requestUri.contains("foo=bar"));
         assertTrue(requestUri.contains("foo2=bar2"));
+        // Cheching what's the request uri should not have
+        assertFalse(requestUri.contains("jndiInitialContextFactory"));
+        assertFalse(requestUri.contains("targetService"));
+        assertFalse(requestUri.contains("replyToName"));
+        assertFalse(requestUri.contains("priority=3"));
     }
     
     private JMSEndpoint resolveEndpoint(String uri) {



Mime
View raw message