You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cs...@apache.org on 2017/04/05 13:27:10 UTC

activemq git commit: Removing two tests as they do not actually test anything

Repository: activemq
Updated Branches:
  refs/heads/master b64ac1dd7 -> 548403ad9


Removing two tests as they do not actually test anything


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/548403ad
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/548403ad
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/548403ad

Branch: refs/heads/master
Commit: 548403ad995a5286029d437a7fe1011e01da1b1d
Parents: b64ac1d
Author: Christian Schneider <ch...@die-schneider.net>
Authored: Wed Apr 5 15:27:04 2017 +0200
Committer: Christian Schneider <ch...@die-schneider.net>
Committed: Wed Apr 5 15:27:04 2017 +0200

----------------------------------------------------------------------
 .../camel/component/ActiveMQRouteTest.java      | 39 ++------------------
 1 file changed, 3 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/548403ad/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQRouteTest.java
----------------------------------------------------------------------
diff --git a/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQRouteTest.java b/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQRouteTest.java
index ffc8d11..73c693c 100644
--- a/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQRouteTest.java
+++ b/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQRouteTest.java
@@ -16,8 +16,6 @@
  */
 package org.apache.activemq.camel.component;
 
-import java.util.concurrent.TimeUnit;
-
 import org.apache.camel.CamelContext;
 import org.apache.camel.builder.RouteBuilder;
 
@@ -33,17 +31,16 @@ import static org.apache.activemq.camel.component.ActiveMQComponent.activeMQComp
  *
  */
 public class ActiveMQRouteTest extends CamelTestSupport {
+    private static final String EXPECTED_BODY = "Hello there!"; 
     protected MockEndpoint resultEndpoint;
     protected String startEndpointUri = "activemq:queue:test.a";
 
     @Test
     public void testJmsRouteWithTextMessage() throws Exception {
-        String expectedBody = "Hello there!";
-
-        resultEndpoint.expectedBodiesReceived(expectedBody);
+        resultEndpoint.expectedBodiesReceived(EXPECTED_BODY);
         resultEndpoint.message(0).header("cheese").isEqualTo(123);
 
-        sendExchange(expectedBody);
+        sendExchange(EXPECTED_BODY);
 
         resultEndpoint.assertIsSatisfied();
     }
@@ -69,36 +66,6 @@ public class ActiveMQRouteTest extends CamelTestSupport {
         return camelContext;
     }
 
-    @Test
-    public void testInvalidDestinationOptionOnConsumer() throws Exception {
-        getMockEndpoint("mock:result").expectedMessageCount(0);
-        assertMockEndpointsSatisfied(1, TimeUnit.SECONDS);
-        try {
-            new RouteBuilder() {
-                public void configure() throws Exception {
-                    from("activemq:queue:foo?destination.consumer.exclusive=true&destination.consumer.unknown=foo")
-                        .to("mock:result");
-                }
-            };
-        } catch (Exception e) {
-            fail("Should not have accepted bad destination options.");
-        }
-    }
-
-    @Test
-    public void testInvalidDestinationOptionOnProducer() throws Exception {
-        try {
-            new RouteBuilder() {
-                public void configure() throws Exception {
-                    from("activemq:queue:foo")
-                        .to("activemq:queue:bar?destination.producer.exclusive=true");
-                }
-            };
-        } catch (Exception e) {
-            fail("Should not have accepted bad destination options.");
-        }
-    }
-
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {