INT-1651 added support for default XMPP connection name and auto-discovery of that name by the XMPP adapters
This commit is contained in:
@@ -9,5 +9,8 @@
|
||||
|
||||
<int-xmpp:xmpp-connection id="connection"
|
||||
user="happy.user" password="blah" host="localhost" auto-startup="false"/>
|
||||
|
||||
|
||||
<int-xmpp:xmpp-connection user="happy.user" password="blah" host="localhost" auto-startup="false"/>
|
||||
|
||||
</beans>
|
||||
|
||||
@@ -19,6 +19,7 @@ package org.springframework.integration.xmpp.config;
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
import static junit.framework.Assert.assertFalse;
|
||||
import static junit.framework.Assert.assertNull;
|
||||
import static junit.framework.Assert.assertTrue;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -62,6 +63,12 @@ public class XmppConnectionParserTests {
|
||||
assertEquals("localhost", configuration.getHost());
|
||||
assertEquals(5222, configuration.getPort());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDefaultConnectionName() {
|
||||
ApplicationContext ac = new ClassPathXmlApplicationContext("XmppConnectionParserTests-simple.xml", this.getClass());
|
||||
assertTrue(ac.containsBean("xmppConnection"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCompleteConfiguration() {
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
<context:property-placeholder location="classpath:test.properties"/>
|
||||
|
||||
<int-xmpp:xmpp-connection
|
||||
id="testConnection"
|
||||
user="${user.1.login}"
|
||||
password="${user.1.password}"
|
||||
host="${user.1.host}"
|
||||
@@ -20,6 +19,6 @@
|
||||
|
||||
<int:channel id="xmppInput"/>
|
||||
|
||||
<int-xmpp:outbound-channel-adapter channel="xmppInput" xmpp-connection="testConnection"/>
|
||||
<int-xmpp:outbound-channel-adapter channel="xmppInput"/>
|
||||
|
||||
</beans>
|
||||
|
||||
Reference in New Issue
Block a user