Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

INTDSLGROOVY-12

  • Loading branch information...
commit 65b581f6b9603596bcd283d00f84d2ea51086197 1 parent c5b5490
David Turanski authored
View
4 ...ain/groovy/org/springframework/integration/dsl/groovy/amqp/builder/RabbitConnectionFactoryFactory.groovy
@@ -26,7 +26,7 @@ class RabbitConnectionFactoryFactory extends SpringXmlComponentFactory {
*/
@Override
protected Object doNewInstance(FactoryBuilderSupport builder, Object name, Object value, Map attributes) {
- def id = attributes.name ?:'connectionFactory'
- builder.springXml{"rabbit:connection-factory"(id:id)}
+ attributes.id = attributes.id ?: (attributes.remove('name')?:'connectionFactory')
+ builder.springXml{"rabbit:connection-factory"(attributes)}
}
}
View
5 ...roovy-amqp/src/test/groovy/org/springframework/integration/dsl/groovy/amqp/builder/AmqpUsageTests.groovy
@@ -68,19 +68,22 @@ class AmqpUsageTests {
void testOutboundGateway() {
builder.doWithSpringIntegration {
doWithRabbit {
- connectionFactory()
+ connectionFactory(host: 'localhost', port: '5672', username: 'guest', password: 'guest')
template 'myRabbitTemplate'
}
messageFlow {
amqpSend amqpTemplate:'myRabbitTemplate'
}
}
+
+ //builder.messageFlows[0].send("hello")
}
@Test
//TODO: Not easy to test without running rabbit broker
void testInboundGateway() {
builder.doWithSpringIntegration {
+
doWithRabbit {
connectionFactory()
queue 'q1'
View
8 ...e/src/test/groovy/org/springframework/integration/dsl/groovy/builder/dom/XMLNamespaceSupportTests.groovy
@@ -14,6 +14,7 @@ package org.springframework.integration.dsl.groovy.builder.dom
import static org.junit.Assert.*
import org.junit.*
+import org.springframework.integration.dsl.groovy.builder.IntegrationBuilder
/**
* @author David Turanski
@@ -21,6 +22,13 @@ import org.junit.*
*/
class XMLNamespaceSupportTests {
def namespaceSupport = new XMLNamespaceSupport()
+
+ @Test
+ void testMultipleNamespaces () {
+ new IntegrationBuilder().doWithSpringIntegration {
+ namespaces("int-twitter,rabbit")
+ }
+ }
@Test
void testAddIntegrationNamespace() {
Please sign in to comment.
Something went wrong with that request. Please try again.