camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [1/6] camel git commit: Clean up the code of camel-spring-javaconfig
Date Fri, 05 Dec 2014 05:42:22 GMT
Repository: camel
Updated Branches:
  refs/heads/master 3114a7b06 -> 816461b45


Clean up the code of camel-spring-javaconfig


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

Branch: refs/heads/master
Commit: ef3473f5ba2abfeb959f0c6605b5111256be726a
Parents: 3114a7b
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Thu Dec 4 17:36:29 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Fri Dec 5 10:58:43 2014 +0800

----------------------------------------------------------------------
 .../camel/spring/javaconfig/BeanJavaConfigTest.java      | 10 +++++-----
 .../autowire/AutodetectNoRoutesConfigTest.java           | 10 +++++++---
 .../javaconfig/autowire/AutodetectingConfigTest.java     |  7 +++++--
 .../autowire/LoadingRawCamelConfigurationTest.java       | 11 +++++------
 .../camel/spring/javaconfig/patterns/FilterTest.java     | 10 ++++++----
 .../test/JavaConfigWithNestedConfigClassTest.java        | 10 +++++-----
 .../javaconfig/test/JavaConfigWithPostProcessorTest.java | 11 +++++------
 7 files changed, 38 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ef3473f5/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/BeanJavaConfigTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/BeanJavaConfigTest.java
b/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/BeanJavaConfigTest.java
index 1a48363..2f021a2 100644
--- a/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/BeanJavaConfigTest.java
+++ b/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/BeanJavaConfigTest.java
@@ -22,18 +22,18 @@ import org.apache.camel.Produce;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.spring.javaconfig.test.JavaConfigContextLoader;
+import org.apache.camel.test.spring.CamelSpringDelegatingTestContextLoader;
+import org.apache.camel.test.spring.CamelSpringJUnit4ClassRunner;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.test.annotation.DirtiesContext;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
 
-/**
- * @version 
- */
-@ContextConfiguration(locations = "org.apache.camel.spring.javaconfig.BeanJavaConfigTest$ContextConfig",
loader = JavaConfigContextLoader.class)
+@RunWith(CamelSpringJUnit4ClassRunner.class)
+@ContextConfiguration(classes = {BeanJavaConfigTest.ContextConfig.class}, loader = CamelSpringDelegatingTestContextLoader.class)
 public class BeanJavaConfigTest extends AbstractJUnit4SpringContextTests {
 
     @EndpointInject(uri = "mock:end")

http://git-wip-us.apache.org/repos/asf/camel/blob/ef3473f5/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/autowire/AutodetectNoRoutesConfigTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/autowire/AutodetectNoRoutesConfigTest.java
b/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/autowire/AutodetectNoRoutesConfigTest.java
index 419fda2..f3b0dd9 100644
--- a/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/autowire/AutodetectNoRoutesConfigTest.java
+++ b/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/autowire/AutodetectNoRoutesConfigTest.java
@@ -16,17 +16,21 @@
  */
 package org.apache.camel.spring.javaconfig.autowire;
 
-import static junit.framework.Assert.assertEquals;
 import org.apache.camel.CamelContext;
 import org.apache.camel.spring.javaconfig.CamelConfiguration;
-import org.apache.camel.spring.javaconfig.test.JavaConfigContextLoader;
+import org.apache.camel.test.spring.CamelSpringDelegatingTestContextLoader;
+import org.apache.camel.test.spring.CamelSpringJUnit4ClassRunner;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
 
-@ContextConfiguration(locations = "org.apache.camel.spring.javaconfig.autowire.NoRoutesConfig",
loader = JavaConfigContextLoader.class)
+import static org.junit.Assert.assertEquals;
+
+@RunWith(CamelSpringJUnit4ClassRunner.class)
+@ContextConfiguration(classes = {NoRoutesConfig.class}, loader = CamelSpringDelegatingTestContextLoader.class)
 public class AutodetectNoRoutesConfigTest extends AbstractJUnit4SpringContextTests {
 
     @Autowired

http://git-wip-us.apache.org/repos/asf/camel/blob/ef3473f5/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/autowire/AutodetectingConfigTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/autowire/AutodetectingConfigTest.java
b/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/autowire/AutodetectingConfigTest.java
index ef04b95..6300434 100644
--- a/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/autowire/AutodetectingConfigTest.java
+++ b/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/autowire/AutodetectingConfigTest.java
@@ -20,12 +20,15 @@ import org.apache.camel.EndpointInject;
 import org.apache.camel.Produce;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.spring.javaconfig.test.JavaConfigContextLoader;
+import org.apache.camel.test.spring.CamelSpringDelegatingTestContextLoader;
+import org.apache.camel.test.spring.CamelSpringJUnit4ClassRunner;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
 
-@ContextConfiguration(locations = "org.apache.camel.spring.javaconfig.autowire.AutowiringContextConfig",
loader = JavaConfigContextLoader.class)
+@RunWith(CamelSpringJUnit4ClassRunner.class)
+@ContextConfiguration(classes = {AutowiringContextConfig.class}, loader = CamelSpringDelegatingTestContextLoader.class)
 public class AutodetectingConfigTest extends AbstractJUnit4SpringContextTests {
 
     @EndpointInject(uri = "mock:autowire")

http://git-wip-us.apache.org/repos/asf/camel/blob/ef3473f5/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/autowire/LoadingRawCamelConfigurationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/autowire/LoadingRawCamelConfigurationTest.java
b/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/autowire/LoadingRawCamelConfigurationTest.java
index 4a39769..676a7cb 100644
--- a/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/autowire/LoadingRawCamelConfigurationTest.java
+++ b/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/autowire/LoadingRawCamelConfigurationTest.java
@@ -16,22 +16,21 @@
  */
 package org.apache.camel.spring.javaconfig.autowire;
 
-import static junit.framework.Assert.assertNotNull;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.spring.javaconfig.test.JavaConfigContextLoader;
+import org.apache.camel.spring.javaconfig.CamelConfiguration;
+import org.apache.camel.test.spring.CamelSpringDelegatingTestContextLoader;
 import org.junit.Test;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
-
+import static org.junit.Assert.assertNotNull;
 
 @ContextConfiguration(
-        locations = {"org.apache.camel.spring.javaconfig.CamelConfiguration",
-        "org.apache.camel.spring.javaconfig.autowire.AdditionalRouteConfiguration"},
-        loader = JavaConfigContextLoader.class)
+        classes = {CamelConfiguration.class, AdditionalRouteConfiguration.class}, 
+        loader = CamelSpringDelegatingTestContextLoader.class)
 public class LoadingRawCamelConfigurationTest extends AbstractJUnit4SpringContextTests {
 
     @EndpointInject(uri = "mock:rawConfigTest")

http://git-wip-us.apache.org/repos/asf/camel/blob/ef3473f5/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/patterns/FilterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/patterns/FilterTest.java
b/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/patterns/FilterTest.java
index a98d15e..cb70902 100644
--- a/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/patterns/FilterTest.java
+++ b/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/patterns/FilterTest.java
@@ -22,8 +22,10 @@ import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.spring.javaconfig.SingleRouteCamelConfiguration;
-import org.apache.camel.spring.javaconfig.test.JavaConfigContextLoader;
+import org.apache.camel.test.spring.CamelSpringDelegatingTestContextLoader;
+import org.apache.camel.test.spring.CamelSpringJUnit4ClassRunner;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.test.annotation.DirtiesContext;
@@ -36,9 +38,9 @@ import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
  * @version 
  */
 // START SNIPPET: example
-@ContextConfiguration(
-        locations = "org.apache.camel.spring.javaconfig.patterns.FilterTest$ContextConfig",
-        loader = JavaConfigContextLoader.class)
+
+@RunWith(CamelSpringJUnit4ClassRunner.class)
+@ContextConfiguration(classes = {FilterTest.ContextConfig.class}, loader = CamelSpringDelegatingTestContextLoader.class)
 public class FilterTest extends AbstractJUnit4SpringContextTests {
 
     @EndpointInject(uri = "mock:result")

http://git-wip-us.apache.org/repos/asf/camel/blob/ef3473f5/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithNestedConfigClassTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithNestedConfigClassTest.java
b/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithNestedConfigClassTest.java
index 3901751..d9cb757 100644
--- a/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithNestedConfigClassTest.java
+++ b/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithNestedConfigClassTest.java
@@ -16,19 +16,19 @@
  */
 package org.apache.camel.spring.javaconfig.test;
 
+import org.apache.camel.test.spring.CamelSpringDelegatingTestContextLoader;
+import org.apache.camel.test.spring.CamelSpringJUnit4ClassRunner;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.stereotype.Component;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
-
 import static org.junit.Assert.assertEquals;
 
-/**
- * @version 
- */
-@ContextConfiguration(locations = "org.apache.camel.spring.javaconfig.test.JavaConfigWithNestedConfigClassTest$ContextConfig",
loader = JavaConfigContextLoader.class)
+@RunWith(CamelSpringJUnit4ClassRunner.class)
+@ContextConfiguration(classes = {JavaConfigWithNestedConfigClassTest.ContextConfig.class},
loader = CamelSpringDelegatingTestContextLoader.class)
 @Component
 public class JavaConfigWithNestedConfigClassTest extends AbstractJUnit4SpringContextTests
implements Cheese {
     private boolean doCheeseCalled;

http://git-wip-us.apache.org/repos/asf/camel/blob/ef3473f5/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithPostProcessorTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithPostProcessorTest.java
b/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithPostProcessorTest.java
index 3ca1c26..0ea202e 100644
--- a/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithPostProcessorTest.java
+++ b/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithPostProcessorTest.java
@@ -16,18 +16,17 @@
  */
 package org.apache.camel.spring.javaconfig.test;
 
+import org.apache.camel.test.spring.CamelSpringDelegatingTestContextLoader;
+import org.apache.camel.test.spring.CamelSpringJUnit4ClassRunner;
 import org.junit.Test;
-
+import org.junit.runner.RunWith;
 import org.springframework.stereotype.Component;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
-
 import static org.junit.Assert.assertEquals;
 
-/**
- * @version 
- */
-@ContextConfiguration(locations = "org.apache.camel.spring.javaconfig.test.MyConfig", loader
= JavaConfigContextLoader.class)
+@RunWith(CamelSpringJUnit4ClassRunner.class)
+@ContextConfiguration(classes = {MyConfig.class}, loader = CamelSpringDelegatingTestContextLoader.class)
 @Component
 public class JavaConfigWithPostProcessorTest extends AbstractJUnit4SpringContextTests implements
Cheese {
     private boolean doCheeseCalled;


Mime
View raw message