You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/04/16 08:40:15 UTC
[2/6] camel git commit: Use a shorter name for the Camel @RunWith so
its easier to remember
Use a shorter name for the Camel @RunWith so its easier to remember
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0a69e327
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0a69e327
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0a69e327
Branch: refs/heads/master
Commit: 0a69e327c832c0e0a41b949f60b19c1de40da037
Parents: 0ee67aa
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Apr 16 08:15:27 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Apr 16 08:17:58 2016 +0200
----------------------------------------------------------------------
.../CamelSpringBootJUnit4ClassRunner.java | 51 ++------
.../test/spring/CamelSpringBootRunner.java | 67 ++++++++++
.../spring/CamelSpringJUnit4ClassRunner.java | 55 ++------
.../camel/test/spring/CamelSpringRunner.java | 70 ++++++++++
.../spring/CamelSpringActiveProfileTest.java | 2 +-
...ssRunnerDisableJmxInheritedOverrideTest.java | 32 -----
...Unit4ClassRunnerDisableJmxInheritedTest.java | 21 ---
...elSpringJUnit4ClassRunnerDisableJmxTest.java | 33 -----
...pringJUnit4ClassRunnerExcludeRoutesTest.java | 29 -----
...LoadTypeConvertersInheritedOverrideTest.java | 33 -----
...nnerLazyLoadTypeConvertersInheritedTest.java | 21 ---
...t4ClassRunnerLazyLoadTypeConvertersTest.java | 33 -----
...nit4ClassRunnerMockEndpointsAndSkipTest.java | 56 --------
...pringJUnit4ClassRunnerMockEndpointsTest.java | 57 --------
.../CamelSpringJUnit4ClassRunnerPlainTest.java | 129 -------------------
...sRunnerProvidesBreakpointInherritedTest.java | 22 ----
...JUnit4ClassRunnerProvidesBreakpointTest.java | 67 ----------
...nerShutdownTimeoutInheritedOverrideTest.java | 34 -----
...ClassRunnerShutdownTimeoutInheritedTest.java | 22 ----
...ingJUnit4ClassRunnerShutdownTimeoutTest.java | 34 -----
...pringJUnit4ClassRunnerUseAdviceWithTest.java | 52 --------
.../CamelSpringOverridePropertiesTest.java | 2 +-
...ngRunnerDisableJmxInheritedOverrideTest.java | 32 +++++
...amelSpringRunnerDisableJmxInheritedTest.java | 21 +++
.../spring/CamelSpringRunnerDisableJmxTest.java | 33 +++++
.../CamelSpringRunnerExcludeRoutesTest.java | 29 +++++
...LoadTypeConvertersInheritedOverrideTest.java | 33 +++++
...nnerLazyLoadTypeConvertersInheritedTest.java | 21 +++
...lSpringRunnerLazyLoadTypeConvertersTest.java | 33 +++++
...melSpringRunnerMockEndpointsAndSkipTest.java | 56 ++++++++
.../CamelSpringRunnerMockEndpointsTest.java | 57 ++++++++
.../test/spring/CamelSpringRunnerPlainTest.java | 129 +++++++++++++++++++
...gRunnerProvidesBreakpointInherritedTest.java | 22 ++++
...CamelSpringRunnerProvidesBreakpointTest.java | 67 ++++++++++
...nerShutdownTimeoutInheritedOverrideTest.java | 34 +++++
...pringRunnerShutdownTimeoutInheritedTest.java | 22 ++++
.../CamelSpringRunnerShutdownTimeoutTest.java | 34 +++++
.../CamelSpringRunnerUseAdviceWithTest.java | 52 ++++++++
...SpringJUnit4ClassRunnerPlainTest-context.xml | 54 --------
.../CamelSpringRunnerPlainTest-context.xml | 54 ++++++++
40 files changed, 885 insertions(+), 820 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringBootJUnit4ClassRunner.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringBootJUnit4ClassRunner.java b/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringBootJUnit4ClassRunner.java
index fa0c0b5..260e086 100644
--- a/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringBootJUnit4ClassRunner.java
+++ b/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringBootJUnit4ClassRunner.java
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,51 +17,16 @@
package org.apache.camel.test.spring;
import org.junit.runners.model.InitializationError;
-import org.springframework.test.context.TestContextManager;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
- * An implementation bringing the functionality of {@link CamelSpringTestSupport} to
- * Spring Boot Test based test cases. This approach allows developers to implement tests
- * for their Spring Boot based applications/routes using the typical Spring Test conventions
- * for test development.
+ * The class {@link CamelSpringBootJUnit4ClassRunner} has been renamed to {@link CamelSpringBootRunner}
+ * which is a shorter and easier to remember name.
+ *
+ * @deprecated use {@link CamelSpringBootRunner}
*/
-public class CamelSpringBootJUnit4ClassRunner extends SpringJUnit4ClassRunner {
+public class CamelSpringBootJUnit4ClassRunner extends CamelSpringRunner {
public CamelSpringBootJUnit4ClassRunner(Class<?> clazz) throws InitializationError {
super(clazz);
}
-
- /**
- * Returns the specialized manager instance that provides tight integration between Camel testing
- * features and Spring.
- *
- * @return a new instance of {@link CamelTestContextManager}.
- */
- @Override
- protected TestContextManager createTestContextManager(Class<?> clazz) {
- return new CamelTestContextManager(clazz);
- }
-
- /**
- * An implementation providing additional integration between Spring Test and Camel
- * testing features.
- */
- public static final class CamelTestContextManager extends TestContextManager {
-
- public CamelTestContextManager(Class<?> testClass) {
- super(testClass);
-
- // turn off auto starting spring as we need to do this later
- System.setProperty("skipStartingCamelContext", "true");
-
- // inject Camel first, and then disable jmx and add the stop-watch
- registerTestExecutionListeners(new CamelSpringTestContextLoaderTestExecutionListener());
- registerTestExecutionListeners(new DisableJmxTestExecutionListener());
- registerTestExecutionListeners(new CamelSpringBootExecutionListener());
- registerTestExecutionListeners(new StopWatchTestExecutionListener());
- }
-
- }
-
}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringBootRunner.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringBootRunner.java b/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringBootRunner.java
new file mode 100644
index 0000000..34e3a05
--- /dev/null
+++ b/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringBootRunner.java
@@ -0,0 +1,67 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.spring;
+
+import org.junit.runners.model.InitializationError;
+import org.springframework.test.context.TestContextManager;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+/**
+ * An implementation bringing the functionality of {@link CamelSpringTestSupport} to
+ * Spring Boot Test based test cases. This approach allows developers to implement tests
+ * for their Spring Boot based applications/routes using the typical Spring Test conventions
+ * for test development.
+ */
+public class CamelSpringBootRunner extends SpringJUnit4ClassRunner {
+
+ public CamelSpringBootRunner(Class<?> clazz) throws InitializationError {
+ super(clazz);
+ }
+
+ /**
+ * Returns the specialized manager instance that provides tight integration between Camel testing
+ * features and Spring.
+ *
+ * @return a new instance of {@link CamelTestContextManager}.
+ */
+ @Override
+ protected TestContextManager createTestContextManager(Class<?> clazz) {
+ return new CamelTestContextManager(clazz);
+ }
+
+ /**
+ * An implementation providing additional integration between Spring Test and Camel
+ * testing features.
+ */
+ public static final class CamelTestContextManager extends TestContextManager {
+
+ public CamelTestContextManager(Class<?> testClass) {
+ super(testClass);
+
+ // turn off auto starting spring as we need to do this later
+ System.setProperty("skipStartingCamelContext", "true");
+
+ // inject Camel first, and then disable jmx and add the stop-watch
+ registerTestExecutionListeners(new CamelSpringTestContextLoaderTestExecutionListener());
+ registerTestExecutionListeners(new DisableJmxTestExecutionListener());
+ registerTestExecutionListeners(new CamelSpringBootExecutionListener());
+ registerTestExecutionListeners(new StopWatchTestExecutionListener());
+ }
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunner.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunner.java b/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunner.java
index 64d1721..0d201ac 100644
--- a/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunner.java
+++ b/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunner.java
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,55 +16,18 @@
*/
package org.apache.camel.test.spring;
-import java.util.List;
-
import org.junit.runners.model.InitializationError;
-import org.springframework.core.OrderComparator;
-import org.springframework.test.context.TestContextManager;
-import org.springframework.test.context.TestExecutionListener;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
- * An implementation bringing the functionality of {@link org.apache.camel.test.spring.CamelSpringTestSupport} to
- * Spring Test based test cases. This approach allows developers to implement tests
- * for their Spring based applications/routes using the typical Spring Test conventions
- * for test development.
+ * The class {@link CamelSpringJUnit4ClassRunner} has been renamed to {@link CamelSpringRunner}
+ * which is a shorter and easier to remember name.
+ *
+ * @deprecated use {@link CamelSpringRunner}
*/
-public class CamelSpringJUnit4ClassRunner extends SpringJUnit4ClassRunner {
+@Deprecated
+public class CamelSpringJUnit4ClassRunner extends CamelSpringRunner {
public CamelSpringJUnit4ClassRunner(Class<?> clazz) throws InitializationError {
super(clazz);
}
-
- /**
- * Returns the specialized manager instance that provides tight integration between Camel testing
- * features and Spring.
- *
- * @return a new instance of {@link CamelTestContextManager}.
- */
- @Override
- protected TestContextManager createTestContextManager(Class<?> clazz) {
- return new CamelTestContextManager(clazz);
- }
-
- /**
- * An implementation providing additional integration between Spring Test and Camel
- * testing features.
- */
- public static final class CamelTestContextManager extends TestContextManager {
-
- public CamelTestContextManager(Class<?> testClass) {
- super(testClass);
-
- // inject Camel first, and then disable jmx and add the stop-watch
- List<TestExecutionListener> list = getTestExecutionListeners();
- list.add(new CamelSpringTestContextLoaderTestExecutionListener());
- list.add(new DisableJmxTestExecutionListener());
- list.add(new StopWatchTestExecutionListener());
- OrderComparator.sort(list);
- registerTestExecutionListeners(list);
- }
-
- }
-
}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringRunner.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringRunner.java b/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringRunner.java
new file mode 100644
index 0000000..b689337
--- /dev/null
+++ b/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringRunner.java
@@ -0,0 +1,70 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.spring;
+
+import java.util.List;
+
+import org.junit.runners.model.InitializationError;
+import org.springframework.core.OrderComparator;
+import org.springframework.test.context.TestContextManager;
+import org.springframework.test.context.TestExecutionListener;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+/**
+ * An implementation bringing the functionality of {@link org.apache.camel.test.spring.CamelSpringTestSupport} to
+ * Spring Test based test cases. This approach allows developers to implement tests
+ * for their Spring based applications/routes using the typical Spring Test conventions
+ * for test development.
+ */
+public class CamelSpringRunner extends SpringJUnit4ClassRunner {
+
+ public CamelSpringRunner(Class<?> clazz) throws InitializationError {
+ super(clazz);
+ }
+
+ /**
+ * Returns the specialized manager instance that provides tight integration between Camel testing
+ * features and Spring.
+ *
+ * @return a new instance of {@link CamelTestContextManager}.
+ */
+ @Override
+ protected TestContextManager createTestContextManager(Class<?> clazz) {
+ return new CamelTestContextManager(clazz);
+ }
+
+ /**
+ * An implementation providing additional integration between Spring Test and Camel
+ * testing features.
+ */
+ public static final class CamelTestContextManager extends TestContextManager {
+
+ public CamelTestContextManager(Class<?> testClass) {
+ super(testClass);
+
+ // inject Camel first, and then disable jmx and add the stop-watch
+ List<TestExecutionListener> list = getTestExecutionListeners();
+ list.add(new CamelSpringTestContextLoaderTestExecutionListener());
+ list.add(new DisableJmxTestExecutionListener());
+ list.add(new StopWatchTestExecutionListener());
+ OrderComparator.sort(list);
+ registerTestExecutionListeners(list);
+ }
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringActiveProfileTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringActiveProfileTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringActiveProfileTest.java
index 2478bf0..347eb0b 100644
--- a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringActiveProfileTest.java
+++ b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringActiveProfileTest.java
@@ -36,7 +36,7 @@ import org.springframework.test.context.ContextConfiguration;
*/
@ContextConfiguration
@ActiveProfiles("test")
-@RunWith(CamelSpringJUnit4ClassRunner.class)
+@RunWith(CamelSpringRunner.class)
public class CamelSpringActiveProfileTest {
@Autowired
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerDisableJmxInheritedOverrideTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerDisableJmxInheritedOverrideTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerDisableJmxInheritedOverrideTest.java
deleted file mode 100644
index 89c1105..0000000
--- a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerDisableJmxInheritedOverrideTest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.test.spring;
-
-import org.apache.camel.management.DefaultManagementStrategy;
-
-import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-
-@DisableJmx
-public class CamelSpringJUnit4ClassRunnerDisableJmxInheritedOverrideTest
- extends CamelSpringJUnit4ClassRunnerDisableJmxTest {
-
- @Test
- public void testJmx() throws Exception {
- assertEquals(DefaultManagementStrategy.class, camelContext.getManagementStrategy().getClass());
- }
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerDisableJmxInheritedTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerDisableJmxInheritedTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerDisableJmxInheritedTest.java
deleted file mode 100644
index b0630e5..0000000
--- a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerDisableJmxInheritedTest.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.test.spring;
-
-public class CamelSpringJUnit4ClassRunnerDisableJmxInheritedTest
- extends CamelSpringJUnit4ClassRunnerDisableJmxTest {
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerDisableJmxTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerDisableJmxTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerDisableJmxTest.java
deleted file mode 100644
index 67cfd7b..0000000
--- a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerDisableJmxTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.test.spring;
-
-import org.apache.camel.management.ManagedManagementStrategy;
-
-import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-
-@DisableJmx(false)
-public class CamelSpringJUnit4ClassRunnerDisableJmxTest
- extends CamelSpringJUnit4ClassRunnerPlainTest {
-
- @Test
- @Override
- public void testJmx() throws Exception {
- assertEquals(ManagedManagementStrategy.class, camelContext.getManagementStrategy().getClass());
- }
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerExcludeRoutesTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerExcludeRoutesTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerExcludeRoutesTest.java
deleted file mode 100644
index 1d9d2ad..0000000
--- a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerExcludeRoutesTest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.test.spring;
-
-import static org.junit.Assert.assertNull;
-
-@ExcludeRoutes(TestRouteBuilder.class)
-public class CamelSpringJUnit4ClassRunnerExcludeRoutesTest
- extends CamelSpringJUnit4ClassRunnerPlainTest {
-
- @Override
- public void testExcludedRoute() {
- assertNull(camelContext.getRoute("excludedRoute"));
- }
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersInheritedOverrideTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersInheritedOverrideTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersInheritedOverrideTest.java
deleted file mode 100644
index 37d2c1d..0000000
--- a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersInheritedOverrideTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.test.spring;
-
-import org.junit.Test;
-import static org.junit.Assert.assertTrue;
-
-@SuppressWarnings("deprecation")
-@LazyLoadTypeConverters(true)
-public class CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersInheritedOverrideTest
- extends CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersInheritedTest {
-
- @Test
- @Override
- public void testLazyLoadTypeConverters() {
- assertTrue(camelContext.isLazyLoadTypeConverters());
- assertTrue(camelContext2.isLazyLoadTypeConverters());
- }
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersInheritedTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersInheritedTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersInheritedTest.java
deleted file mode 100644
index 229e3c9..0000000
--- a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersInheritedTest.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.test.spring;
-
-public class CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersInheritedTest
- extends CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersTest {
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersTest.java
deleted file mode 100644
index 20bc31a..0000000
--- a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.test.spring;
-
-import org.junit.Test;
-import static org.junit.Assert.assertFalse;
-
-@SuppressWarnings("deprecation")
-@LazyLoadTypeConverters(false)
-public class CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersTest
- extends CamelSpringJUnit4ClassRunnerPlainTest {
-
- @Test
- @Override
- public void testLazyLoadTypeConverters() {
- assertFalse(camelContext.isLazyLoadTypeConverters());
- assertFalse(camelContext2.isLazyLoadTypeConverters());
- }
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerMockEndpointsAndSkipTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerMockEndpointsAndSkipTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerMockEndpointsAndSkipTest.java
deleted file mode 100644
index 59191ad..0000000
--- a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerMockEndpointsAndSkipTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.test.spring;
-
-import org.apache.camel.EndpointInject;
-import org.apache.camel.ServiceStatus;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.component.seda.SedaEndpoint;
-import org.apache.camel.impl.InterceptSendToEndpoint;
-import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-@MockEndpointsAndSkip("{{mock.skip}}")
-public class CamelSpringJUnit4ClassRunnerMockEndpointsAndSkipTest
- extends CamelSpringJUnit4ClassRunnerPlainTest {
-
- @EndpointInject(uri = "mock:seda:context2.seda", context = "camelContext2")
- protected MockEndpoint mock;
-
- @EndpointInject(uri = "seda:context2.seda", context = "camelContext2")
- private InterceptSendToEndpoint original;
-
- @Test
- @Override
- public void testPositive() throws Exception {
- assertEquals(ServiceStatus.Started, camelContext.getStatus());
- assertEquals(ServiceStatus.Started, camelContext2.getStatus());
-
- mockA.expectedBodiesReceived("David");
- mockB.expectedBodiesReceived("Hello David");
- mock.expectedBodiesReceived("Hello David");
-
- start.sendBody("David");
- start2.sendBody("David");
-
- MockEndpoint.assertIsSatisfied(camelContext);
- MockEndpoint.assertIsSatisfied(camelContext2);
- assertTrue("Original endpoint was invoked", ((SedaEndpoint) original.getDelegate()).getExchanges().isEmpty());
- }
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerMockEndpointsTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerMockEndpointsTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerMockEndpointsTest.java
deleted file mode 100644
index 73dac9f..0000000
--- a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerMockEndpointsTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.test.spring;
-
-import org.apache.camel.EndpointInject;
-import org.apache.camel.ServiceStatus;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.component.seda.SedaEndpoint;
-import org.apache.camel.impl.InterceptSendToEndpoint;
-import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-@MockEndpoints("seda:context2.seda")
-public class CamelSpringJUnit4ClassRunnerMockEndpointsTest
- extends CamelSpringJUnit4ClassRunnerPlainTest {
-
- @EndpointInject(uri = "mock:seda:context2.seda", context = "camelContext2")
- protected MockEndpoint mock;
-
- @EndpointInject(uri = "seda:context2.seda", context = "camelContext2")
- private InterceptSendToEndpoint original;
-
- @Test
- @Override
- public void testPositive() throws Exception {
-
- assertEquals(ServiceStatus.Started, camelContext.getStatus());
- assertEquals(ServiceStatus.Started, camelContext2.getStatus());
-
- mockA.expectedBodiesReceived("David");
- mockB.expectedBodiesReceived("Hello David");
- mockC.expectedBodiesReceived("David");
- mock.expectedBodiesReceived("Hello David");
-
- start.sendBody("David");
- start2.sendBody("David");
-
- MockEndpoint.assertIsSatisfied(camelContext);
- MockEndpoint.assertIsSatisfied(camelContext2);
- assertTrue("Original endpoint should be invoked", ((SedaEndpoint) original.getDelegate()).getExchanges().size() == 1);
- }
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerPlainTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerPlainTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerPlainTest.java
deleted file mode 100644
index 1e21c11..0000000
--- a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerPlainTest.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.test.spring;
-
-import java.util.concurrent.TimeUnit;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.EndpointInject;
-import org.apache.camel.Produce;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.ServiceStatus;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.management.DefaultManagementStrategy;
-import org.apache.camel.util.StopWatch;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.annotation.DirtiesContext;
-import org.springframework.test.annotation.DirtiesContext.ClassMode;
-import org.springframework.test.context.BootstrapWith;
-import org.springframework.test.context.ContextConfiguration;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-// START SNIPPET: e1
-// tag::example[]
-@RunWith(CamelSpringJUnit4ClassRunner.class)
-// must tell Spring to bootstrap with Camel
-@BootstrapWith(CamelTestContextBootstrapper.class)
-@ContextConfiguration()
-// Put here to prevent Spring context caching across tests and test methods since some tests inherit
-// from this test and therefore use the same Spring context. Also because we want to reset the
-// Camel context and mock endpoints between test methods automatically.
-@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD)
-public class CamelSpringJUnit4ClassRunnerPlainTest {
-
- @Autowired
- protected CamelContext camelContext;
-
- @Autowired
- protected CamelContext camelContext2;
-
- @EndpointInject(uri = "mock:a", context = "camelContext")
- protected MockEndpoint mockA;
-
- @EndpointInject(uri = "mock:b", context = "camelContext")
- protected MockEndpoint mockB;
-
- @EndpointInject(uri = "mock:c", context = "camelContext2")
- protected MockEndpoint mockC;
-
- @Produce(uri = "direct:start", context = "camelContext")
- protected ProducerTemplate start;
-
- @Produce(uri = "direct:start2", context = "camelContext2")
- protected ProducerTemplate start2;
-
- @Test
- public void testPositive() throws Exception {
- assertEquals(ServiceStatus.Started, camelContext.getStatus());
- assertEquals(ServiceStatus.Started, camelContext2.getStatus());
-
- mockA.expectedBodiesReceived("David");
- mockB.expectedBodiesReceived("Hello David");
- mockC.expectedBodiesReceived("David");
-
- start.sendBody("David");
- start2.sendBody("David");
-
- MockEndpoint.assertIsSatisfied(camelContext);
- MockEndpoint.assertIsSatisfied(camelContext2);
- }
-
- @Test
- public void testJmx() throws Exception {
- assertEquals(DefaultManagementStrategy.class, camelContext.getManagementStrategy().getClass());
- }
-
- @Test
- public void testShutdownTimeout() throws Exception {
- assertEquals(10, camelContext.getShutdownStrategy().getTimeout());
- assertEquals(TimeUnit.SECONDS, camelContext.getShutdownStrategy().getTimeUnit());
- }
-
- @Test
- public void testStopwatch() {
- StopWatch stopWatch = StopWatchTestExecutionListener.getStopWatch();
-
- assertNotNull(stopWatch);
- assertTrue(stopWatch.taken() < 100);
- }
-
- @Test
- public void testExcludedRoute() {
- assertNotNull(camelContext.getRoute("excludedRoute"));
- }
-
- @Test
- public void testProvidesBreakpoint() {
- assertNull(camelContext.getDebugger());
- assertNull(camelContext2.getDebugger());
- }
-
- @SuppressWarnings("deprecation")
- @Test
- public void testLazyLoadTypeConverters() {
- assertTrue(camelContext.isLazyLoadTypeConverters());
- assertTrue(camelContext2.isLazyLoadTypeConverters());
- }
-}
-// end::example[]
-// END SNIPPET: e1
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerProvidesBreakpointInherritedTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerProvidesBreakpointInherritedTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerProvidesBreakpointInherritedTest.java
deleted file mode 100644
index 98d47e8..0000000
--- a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerProvidesBreakpointInherritedTest.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.test.spring;
-
-public class CamelSpringJUnit4ClassRunnerProvidesBreakpointInherritedTest
- extends CamelSpringJUnit4ClassRunnerProvidesBreakpointTest {
-
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerProvidesBreakpointTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerProvidesBreakpointTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerProvidesBreakpointTest.java
deleted file mode 100644
index ae2d637..0000000
--- a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerProvidesBreakpointTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.test.spring;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.impl.BreakpointSupport;
-import org.apache.camel.model.ProcessorDefinition;
-import org.apache.camel.spi.Breakpoint;
-
-import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-public class CamelSpringJUnit4ClassRunnerProvidesBreakpointTest
- extends CamelSpringJUnit4ClassRunnerPlainTest {
-
- @ProvidesBreakpoint
- public static Breakpoint createBreakpoint() {
- return new TestBreakpoint();
- }
-
- @Test
- @Override
- public void testProvidesBreakpoint() {
- assertNotNull(camelContext.getDebugger());
- assertNotNull(camelContext2.getDebugger());
-
- start.sendBody("David");
-
- assertNotNull(camelContext.getDebugger());
- assertNotNull(camelContext.getDebugger().getBreakpoints());
- assertEquals(1, camelContext.getDebugger().getBreakpoints().size());
-
- assertTrue(camelContext.getDebugger().getBreakpoints().get(0) instanceof TestBreakpoint);
- assertTrue(((TestBreakpoint) camelContext.getDebugger().getBreakpoints().get(0)).isBreakpointHit());
- }
-
- private static final class TestBreakpoint extends BreakpointSupport {
-
- private boolean breakpointHit;
-
- @Override
- public void beforeProcess(Exchange exchange, Processor processor, ProcessorDefinition<?> definition) {
- breakpointHit = true;
- }
-
- public boolean isBreakpointHit() {
- return breakpointHit;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerShutdownTimeoutInheritedOverrideTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerShutdownTimeoutInheritedOverrideTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerShutdownTimeoutInheritedOverrideTest.java
deleted file mode 100644
index c011d1f..0000000
--- a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerShutdownTimeoutInheritedOverrideTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.test.spring;
-
-import java.util.concurrent.TimeUnit;
-
-import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-
-@ShutdownTimeout
-public class CamelSpringJUnit4ClassRunnerShutdownTimeoutInheritedOverrideTest
- extends CamelSpringJUnit4ClassRunnerShutdownTimeoutTest {
-
- @Test
- @Override
- public void testShutdownTimeout() throws Exception {
- assertEquals(10, camelContext.getShutdownStrategy().getTimeout());
- assertEquals(TimeUnit.SECONDS, camelContext.getShutdownStrategy().getTimeUnit());
- }
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerShutdownTimeoutInheritedTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerShutdownTimeoutInheritedTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerShutdownTimeoutInheritedTest.java
deleted file mode 100644
index 9f66625..0000000
--- a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerShutdownTimeoutInheritedTest.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.test.spring;
-
-public class CamelSpringJUnit4ClassRunnerShutdownTimeoutInheritedTest
- extends CamelSpringJUnit4ClassRunnerShutdownTimeoutTest {
-
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerShutdownTimeoutTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerShutdownTimeoutTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerShutdownTimeoutTest.java
deleted file mode 100644
index 85a80ba..0000000
--- a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerShutdownTimeoutTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.test.spring;
-
-import java.util.concurrent.TimeUnit;
-
-import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-
-@ShutdownTimeout(value = 11, timeUnit = TimeUnit.MILLISECONDS)
-public class CamelSpringJUnit4ClassRunnerShutdownTimeoutTest
- extends CamelSpringJUnit4ClassRunnerPlainTest {
-
- @Test
- @Override
- public void testShutdownTimeout() throws Exception {
- assertEquals(11, camelContext.getShutdownStrategy().getTimeout());
- assertEquals(TimeUnit.MILLISECONDS, camelContext.getShutdownStrategy().getTimeUnit());
- }
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerUseAdviceWithTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerUseAdviceWithTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerUseAdviceWithTest.java
deleted file mode 100644
index 7cf5e06..0000000
--- a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringJUnit4ClassRunnerUseAdviceWithTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.test.spring;
-
-import org.apache.camel.ServiceStatus;
-import org.apache.camel.util.StopWatch;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-@UseAdviceWith
-public class CamelSpringJUnit4ClassRunnerUseAdviceWithTest extends CamelSpringJUnit4ClassRunnerPlainTest {
-
- @Before
- public void testContextStarted() throws Exception {
-
- assertEquals(ServiceStatus.Stopped, camelContext.getStatus());
- assertEquals(ServiceStatus.Stopped, camelContext2.getStatus());
- camelContext.start();
- camelContext2.start();
-
- // just sleep a little to simulate testing take a bit time
- Thread.sleep(1000);
- }
-
- @Test
- public void testStopwatch() {
- StopWatch stopWatch = StopWatchTestExecutionListener.getStopWatch();
-
- assertNotNull(stopWatch);
- long taken = stopWatch.taken();
- assertTrue(taken + " > 0, but was: " + taken, taken > 0);
- assertTrue(taken + " < 3000, but was: " + taken, taken < 3000);
- }
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringOverridePropertiesTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringOverridePropertiesTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringOverridePropertiesTest.java
index 0da0836..595c473 100644
--- a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringOverridePropertiesTest.java
+++ b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringOverridePropertiesTest.java
@@ -28,7 +28,7 @@ import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.BootstrapWith;
import org.springframework.test.context.ContextConfiguration;
-@RunWith(CamelSpringJUnit4ClassRunner.class)
+@RunWith(CamelSpringRunner.class)
@BootstrapWith(CamelTestContextBootstrapper.class)
@ContextConfiguration()
// Put here to prevent Spring context caching across tests and test methods since some tests inherit
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerDisableJmxInheritedOverrideTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerDisableJmxInheritedOverrideTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerDisableJmxInheritedOverrideTest.java
new file mode 100644
index 0000000..473ec04
--- /dev/null
+++ b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerDisableJmxInheritedOverrideTest.java
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.spring;
+
+import org.apache.camel.management.DefaultManagementStrategy;
+
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+
+@DisableJmx
+public class CamelSpringRunnerDisableJmxInheritedOverrideTest
+ extends CamelSpringRunnerDisableJmxTest {
+
+ @Test
+ public void testJmx() throws Exception {
+ assertEquals(DefaultManagementStrategy.class, camelContext.getManagementStrategy().getClass());
+ }
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerDisableJmxInheritedTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerDisableJmxInheritedTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerDisableJmxInheritedTest.java
new file mode 100644
index 0000000..8f70589
--- /dev/null
+++ b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerDisableJmxInheritedTest.java
@@ -0,0 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.spring;
+
+public class CamelSpringRunnerDisableJmxInheritedTest
+ extends CamelSpringRunnerDisableJmxTest {
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerDisableJmxTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerDisableJmxTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerDisableJmxTest.java
new file mode 100644
index 0000000..7d7bd91
--- /dev/null
+++ b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerDisableJmxTest.java
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.spring;
+
+import org.apache.camel.management.ManagedManagementStrategy;
+
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+
+@DisableJmx(false)
+public class CamelSpringRunnerDisableJmxTest
+ extends CamelSpringRunnerPlainTest {
+
+ @Test
+ @Override
+ public void testJmx() throws Exception {
+ assertEquals(ManagedManagementStrategy.class, camelContext.getManagementStrategy().getClass());
+ }
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerExcludeRoutesTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerExcludeRoutesTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerExcludeRoutesTest.java
new file mode 100644
index 0000000..bd69512
--- /dev/null
+++ b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerExcludeRoutesTest.java
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.spring;
+
+import static org.junit.Assert.assertNull;
+
+@ExcludeRoutes(TestRouteBuilder.class)
+public class CamelSpringRunnerExcludeRoutesTest
+ extends CamelSpringRunnerPlainTest {
+
+ @Override
+ public void testExcludedRoute() {
+ assertNull(camelContext.getRoute("excludedRoute"));
+ }
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerLazyLoadTypeConvertersInheritedOverrideTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerLazyLoadTypeConvertersInheritedOverrideTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerLazyLoadTypeConvertersInheritedOverrideTest.java
new file mode 100644
index 0000000..3800ca7
--- /dev/null
+++ b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerLazyLoadTypeConvertersInheritedOverrideTest.java
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.spring;
+
+import org.junit.Test;
+import static org.junit.Assert.assertTrue;
+
+@SuppressWarnings("deprecation")
+@LazyLoadTypeConverters(true)
+public class CamelSpringRunnerLazyLoadTypeConvertersInheritedOverrideTest
+ extends CamelSpringRunnerLazyLoadTypeConvertersInheritedTest {
+
+ @Test
+ @Override
+ public void testLazyLoadTypeConverters() {
+ assertTrue(camelContext.isLazyLoadTypeConverters());
+ assertTrue(camelContext2.isLazyLoadTypeConverters());
+ }
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerLazyLoadTypeConvertersInheritedTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerLazyLoadTypeConvertersInheritedTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerLazyLoadTypeConvertersInheritedTest.java
new file mode 100644
index 0000000..5f793fe
--- /dev/null
+++ b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerLazyLoadTypeConvertersInheritedTest.java
@@ -0,0 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.spring;
+
+public class CamelSpringRunnerLazyLoadTypeConvertersInheritedTest
+ extends CamelSpringRunnerLazyLoadTypeConvertersTest {
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerLazyLoadTypeConvertersTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerLazyLoadTypeConvertersTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerLazyLoadTypeConvertersTest.java
new file mode 100644
index 0000000..ff11dd6
--- /dev/null
+++ b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerLazyLoadTypeConvertersTest.java
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.spring;
+
+import org.junit.Test;
+import static org.junit.Assert.assertFalse;
+
+@SuppressWarnings("deprecation")
+@LazyLoadTypeConverters(false)
+public class CamelSpringRunnerLazyLoadTypeConvertersTest
+ extends CamelSpringRunnerPlainTest {
+
+ @Test
+ @Override
+ public void testLazyLoadTypeConverters() {
+ assertFalse(camelContext.isLazyLoadTypeConverters());
+ assertFalse(camelContext2.isLazyLoadTypeConverters());
+ }
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerMockEndpointsAndSkipTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerMockEndpointsAndSkipTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerMockEndpointsAndSkipTest.java
new file mode 100644
index 0000000..eb00573
--- /dev/null
+++ b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerMockEndpointsAndSkipTest.java
@@ -0,0 +1,56 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.spring;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.ServiceStatus;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.component.seda.SedaEndpoint;
+import org.apache.camel.impl.InterceptSendToEndpoint;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+@MockEndpointsAndSkip("{{mock.skip}}")
+public class CamelSpringRunnerMockEndpointsAndSkipTest
+ extends CamelSpringRunnerPlainTest {
+
+ @EndpointInject(uri = "mock:seda:context2.seda", context = "camelContext2")
+ protected MockEndpoint mock;
+
+ @EndpointInject(uri = "seda:context2.seda", context = "camelContext2")
+ private InterceptSendToEndpoint original;
+
+ @Test
+ @Override
+ public void testPositive() throws Exception {
+ assertEquals(ServiceStatus.Started, camelContext.getStatus());
+ assertEquals(ServiceStatus.Started, camelContext2.getStatus());
+
+ mockA.expectedBodiesReceived("David");
+ mockB.expectedBodiesReceived("Hello David");
+ mock.expectedBodiesReceived("Hello David");
+
+ start.sendBody("David");
+ start2.sendBody("David");
+
+ MockEndpoint.assertIsSatisfied(camelContext);
+ MockEndpoint.assertIsSatisfied(camelContext2);
+ assertTrue("Original endpoint was invoked", ((SedaEndpoint) original.getDelegate()).getExchanges().isEmpty());
+ }
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerMockEndpointsTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerMockEndpointsTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerMockEndpointsTest.java
new file mode 100644
index 0000000..5c31ced
--- /dev/null
+++ b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerMockEndpointsTest.java
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.spring;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.ServiceStatus;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.component.seda.SedaEndpoint;
+import org.apache.camel.impl.InterceptSendToEndpoint;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+@MockEndpoints("seda:context2.seda")
+public class CamelSpringRunnerMockEndpointsTest
+ extends CamelSpringRunnerPlainTest {
+
+ @EndpointInject(uri = "mock:seda:context2.seda", context = "camelContext2")
+ protected MockEndpoint mock;
+
+ @EndpointInject(uri = "seda:context2.seda", context = "camelContext2")
+ private InterceptSendToEndpoint original;
+
+ @Test
+ @Override
+ public void testPositive() throws Exception {
+
+ assertEquals(ServiceStatus.Started, camelContext.getStatus());
+ assertEquals(ServiceStatus.Started, camelContext2.getStatus());
+
+ mockA.expectedBodiesReceived("David");
+ mockB.expectedBodiesReceived("Hello David");
+ mockC.expectedBodiesReceived("David");
+ mock.expectedBodiesReceived("Hello David");
+
+ start.sendBody("David");
+ start2.sendBody("David");
+
+ MockEndpoint.assertIsSatisfied(camelContext);
+ MockEndpoint.assertIsSatisfied(camelContext2);
+ assertTrue("Original endpoint should be invoked", ((SedaEndpoint) original.getDelegate()).getExchanges().size() == 1);
+ }
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerPlainTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerPlainTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerPlainTest.java
new file mode 100644
index 0000000..337b3bf
--- /dev/null
+++ b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerPlainTest.java
@@ -0,0 +1,129 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.spring;
+
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Produce;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.ServiceStatus;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.management.DefaultManagementStrategy;
+import org.apache.camel.util.StopWatch;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.annotation.DirtiesContext;
+import org.springframework.test.annotation.DirtiesContext.ClassMode;
+import org.springframework.test.context.BootstrapWith;
+import org.springframework.test.context.ContextConfiguration;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+// START SNIPPET: e1
+// tag::example[]
+@RunWith(CamelSpringRunner.class)
+// must tell Spring to bootstrap with Camel
+@BootstrapWith(CamelTestContextBootstrapper.class)
+@ContextConfiguration()
+// Put here to prevent Spring context caching across tests and test methods since some tests inherit
+// from this test and therefore use the same Spring context. Also because we want to reset the
+// Camel context and mock endpoints between test methods automatically.
+@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD)
+public class CamelSpringRunnerPlainTest {
+
+ @Autowired
+ protected CamelContext camelContext;
+
+ @Autowired
+ protected CamelContext camelContext2;
+
+ @EndpointInject(uri = "mock:a", context = "camelContext")
+ protected MockEndpoint mockA;
+
+ @EndpointInject(uri = "mock:b", context = "camelContext")
+ protected MockEndpoint mockB;
+
+ @EndpointInject(uri = "mock:c", context = "camelContext2")
+ protected MockEndpoint mockC;
+
+ @Produce(uri = "direct:start", context = "camelContext")
+ protected ProducerTemplate start;
+
+ @Produce(uri = "direct:start2", context = "camelContext2")
+ protected ProducerTemplate start2;
+
+ @Test
+ public void testPositive() throws Exception {
+ assertEquals(ServiceStatus.Started, camelContext.getStatus());
+ assertEquals(ServiceStatus.Started, camelContext2.getStatus());
+
+ mockA.expectedBodiesReceived("David");
+ mockB.expectedBodiesReceived("Hello David");
+ mockC.expectedBodiesReceived("David");
+
+ start.sendBody("David");
+ start2.sendBody("David");
+
+ MockEndpoint.assertIsSatisfied(camelContext);
+ MockEndpoint.assertIsSatisfied(camelContext2);
+ }
+
+ @Test
+ public void testJmx() throws Exception {
+ assertEquals(DefaultManagementStrategy.class, camelContext.getManagementStrategy().getClass());
+ }
+
+ @Test
+ public void testShutdownTimeout() throws Exception {
+ assertEquals(10, camelContext.getShutdownStrategy().getTimeout());
+ assertEquals(TimeUnit.SECONDS, camelContext.getShutdownStrategy().getTimeUnit());
+ }
+
+ @Test
+ public void testStopwatch() {
+ StopWatch stopWatch = StopWatchTestExecutionListener.getStopWatch();
+
+ assertNotNull(stopWatch);
+ assertTrue(stopWatch.taken() < 100);
+ }
+
+ @Test
+ public void testExcludedRoute() {
+ assertNotNull(camelContext.getRoute("excludedRoute"));
+ }
+
+ @Test
+ public void testProvidesBreakpoint() {
+ assertNull(camelContext.getDebugger());
+ assertNull(camelContext2.getDebugger());
+ }
+
+ @SuppressWarnings("deprecation")
+ @Test
+ public void testLazyLoadTypeConverters() {
+ assertTrue(camelContext.isLazyLoadTypeConverters());
+ assertTrue(camelContext2.isLazyLoadTypeConverters());
+ }
+}
+// end::example[]
+// END SNIPPET: e1
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerProvidesBreakpointInherritedTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerProvidesBreakpointInherritedTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerProvidesBreakpointInherritedTest.java
new file mode 100644
index 0000000..9abf380
--- /dev/null
+++ b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerProvidesBreakpointInherritedTest.java
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.spring;
+
+public class CamelSpringRunnerProvidesBreakpointInherritedTest
+ extends CamelSpringRunnerProvidesBreakpointTest {
+
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/0a69e327/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerProvidesBreakpointTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerProvidesBreakpointTest.java b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerProvidesBreakpointTest.java
new file mode 100644
index 0000000..5bd8bc3
--- /dev/null
+++ b/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerProvidesBreakpointTest.java
@@ -0,0 +1,67 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.spring;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.impl.BreakpointSupport;
+import org.apache.camel.model.ProcessorDefinition;
+import org.apache.camel.spi.Breakpoint;
+
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+public class CamelSpringRunnerProvidesBreakpointTest
+ extends CamelSpringRunnerPlainTest {
+
+ @ProvidesBreakpoint
+ public static Breakpoint createBreakpoint() {
+ return new TestBreakpoint();
+ }
+
+ @Test
+ @Override
+ public void testProvidesBreakpoint() {
+ assertNotNull(camelContext.getDebugger());
+ assertNotNull(camelContext2.getDebugger());
+
+ start.sendBody("David");
+
+ assertNotNull(camelContext.getDebugger());
+ assertNotNull(camelContext.getDebugger().getBreakpoints());
+ assertEquals(1, camelContext.getDebugger().getBreakpoints().size());
+
+ assertTrue(camelContext.getDebugger().getBreakpoints().get(0) instanceof TestBreakpoint);
+ assertTrue(((TestBreakpoint) camelContext.getDebugger().getBreakpoints().get(0)).isBreakpointHit());
+ }
+
+ private static final class TestBreakpoint extends BreakpointSupport {
+
+ private boolean breakpointHit;
+
+ @Override
+ public void beforeProcess(Exchange exchange, Processor processor, ProcessorDefinition<?> definition) {
+ breakpointHit = true;
+ }
+
+ public boolean isBreakpointHit() {
+ return breakpointHit;
+ }
+ }
+}