This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 038d78e Camel-AWS SDB: Use BindToRegistry annotation where possible
in tests
038d78e is described below
commit 038d78e35648b30e64097829c9176d3de39cbe60
Author: Andrea Cosentino <[email protected]>
AuthorDate: Tue Mar 19 10:44:13 2019 +0100
Camel-AWS SDB: Use BindToRegistry annotation where possible in tests
---
.../apache/camel/component/aws/sdb/SdbComponentTest.java | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git
a/components/camel-aws-sdb/src/test/java/org/apache/camel/component/aws/sdb/SdbComponentTest.java
b/components/camel-aws-sdb/src/test/java/org/apache/camel/component/aws/sdb/SdbComponentTest.java
index 654f464..e01b7ca 100644
---
a/components/camel-aws-sdb/src/test/java/org/apache/camel/component/aws/sdb/SdbComponentTest.java
+++
b/components/camel-aws-sdb/src/test/java/org/apache/camel/component/aws/sdb/SdbComponentTest.java
@@ -26,17 +26,18 @@ import
com.amazonaws.services.simpledb.model.ReplaceableAttribute;
import com.amazonaws.services.simpledb.model.ReplaceableItem;
import com.amazonaws.services.simpledb.model.UpdateCondition;
+import org.apache.camel.BindToRegistry;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultProducerTemplate;
-import org.apache.camel.impl.JndiRegistry;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Test;
public class SdbComponentTest extends CamelTestSupport {
- private AmazonSDBClientMock amazonSDBClient;
+ @BindToRegistry("amazonSDBClient")
+ private AmazonSDBClientMock amazonSDBClient = new AmazonSDBClientMock();
@Test
public void doesntCreateDomainOnStartIfExists() throws Exception {
@@ -279,16 +280,6 @@ public class SdbComponentTest extends CamelTestSupport {
}
@Override
- protected JndiRegistry createRegistry() throws Exception {
- JndiRegistry registry = super.createRegistry();
-
- amazonSDBClient = new AmazonSDBClientMock();
- registry.bind("amazonSDBClient", amazonSDBClient);
-
- return registry;
- }
-
- @Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@Override