Author: sully6768
Date: Tue Oct 30 19:46:46 2012
New Revision: 1403840

URL: http://svn.apache.org/viewvc?rev=1403840&view=rev
Log:
Updated batch transaction tests

Modified:
    
camel/trunk/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/SjmsEndpointTest.java

Modified: 
camel/trunk/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/SjmsEndpointTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/SjmsEndpointTest.java?rev=1403840&r1=1403839&r2=1403840&view=diff
==============================================================================
--- 
camel/trunk/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/SjmsEndpointTest.java
 (original)
+++ 
camel/trunk/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/SjmsEndpointTest.java
 Tue Oct 30 19:46:46 2012
@@ -145,16 +145,25 @@ public class SjmsEndpointTest extends Ca
         assertNotNull(endpoint);
         assertTrue(endpoint instanceof SjmsEndpoint);
         SjmsEndpoint qe = (SjmsEndpoint)endpoint;
-        assertTrue(qe.getDestinationName().equals("test"));
+        assertTrue(qe.isSynchronous());
     }
 
     @Test
-    public void testTransactedBatchCount() throws Exception {
+    public void testTransactedBatchCountDefault() throws Exception {
+        Endpoint endpoint = 
context.getEndpoint("sjms:queue:test?transacted=true");
+        assertNotNull(endpoint);
+        assertTrue(endpoint instanceof SjmsEndpoint);
+        SjmsEndpoint qe = (SjmsEndpoint)endpoint;
+        assertTrue(qe.getTransactionBatchCount() == -1);
+    }
+
+    @Test
+    public void testTransactedBatchCountModified() throws Exception {
         Endpoint endpoint = 
context.getEndpoint("sjms:queue:test?transacted=true&transactionBatchCount=10");
         assertNotNull(endpoint);
         assertTrue(endpoint instanceof SjmsEndpoint);
         SjmsEndpoint qe = (SjmsEndpoint)endpoint;
-        assertTrue(qe.getDestinationName().equals("test"));
+        assertTrue(qe.getTransactionBatchCount() == 10);
     }
 
     @Test
@@ -163,7 +172,7 @@ public class SjmsEndpointTest extends Ca
         assertNotNull(endpoint);
         assertTrue(endpoint instanceof SjmsEndpoint);
         SjmsEndpoint qe = (SjmsEndpoint)endpoint;
-        assertTrue(qe.getDestinationName().equals("test"));
+        assertTrue(qe.getTransactionBatchTimeout() == 5000);
     }
 
     @Test
@@ -172,7 +181,7 @@ public class SjmsEndpointTest extends Ca
         assertNotNull(endpoint);
         assertTrue(endpoint instanceof SjmsEndpoint);
         SjmsEndpoint qe = (SjmsEndpoint)endpoint;
-        assertTrue(qe.getDestinationName().equals("test"));
+        assertTrue(qe.getTransactionBatchTimeout() == 3000);
     }
 
     protected CamelContext createCamelContext() throws Exception {


Reply via email to