File Cleanup - ws to xmpp

This commit is contained in:
Gary Russell
2016-06-04 12:50:39 -04:00
parent dd1d2ecab4
commit 90e5457260
18 changed files with 54 additions and 42 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
* @author Mark Fisher
* @author Artem Bilan
* @author Gary Russell
* @since 2.0
*/
@ContextConfiguration
@@ -34,7 +35,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
public class ConsoleChatTests {
public static void main(String[] args) {
new ClassPathXmlApplicationContext("ConsoleChatTests-context.xml", ConsoleChatTests.class);
new ClassPathXmlApplicationContext("ConsoleChatTests-context.xml", ConsoleChatTests.class).close();
}
@Test

View File

@@ -15,14 +15,14 @@
<context:property-placeholder location="classpath:test.properties"/>
<beans:bean id="xmppProducer"
class="org.springframework.integration.xmpp.ignore.XmppMessageProducer"
p:recipient="${user.2.login}"/>
class="org.springframework.integration.xmpp.ignore.XmppMessageProducer"
p:recipient="${user.2.login}"/>
<xmpp:xmpp-connection id="testConnection"
user="${user.1.login}"
password="${user.1.password}"
host="${user.1.host}"
service-name="${user.1.service}"/>
<xmpp:xmpp-connection id="testConnection"
user="${user.1.login}"
password="${user.1.password}"
host="${user.1.host}"
service-name="${user.1.service}"/>
<inbound-channel-adapter ref="xmppProducer" channel="outboundChatChannel">
<poller fixed-rate="1000"/>

View File

@@ -19,7 +19,6 @@ package org.springframework.integration.xmpp.ignore;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
@@ -27,22 +26,26 @@ import org.springframework.messaging.support.GenericMessage;
/**
* @author Oleg Zhurakousky
* @author Gary Russell
*/
public class SmackMessageSampleTests {
@Test
@Ignore
public void validateSmackMessageSent() {
ApplicationContext ac = new ClassPathXmlApplicationContext("SmackMessageSampleTest-context.xml", this.getClass());
ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("SmackMessageSampleTest-context.xml",
this.getClass());
MessageChannel xmppInput = ac.getBean("xmppInput", MessageChannel.class);
org.jivesoftware.smack.packet.Message smackMessage = new org.jivesoftware.smack.packet.Message("springintegration@gmail.com");
org.jivesoftware.smack.packet.Message smackMessage = new org.jivesoftware.smack.packet.Message(
"springintegration@gmail.com");
smackMessage.setBody("Message sent as Smack Message");
Message<org.jivesoftware.smack.packet.Message> message =
new GenericMessage<org.jivesoftware.smack.packet.Message>(smackMessage);
xmppInput.send(message);
ac.close();
}
}

View File

@@ -3,4 +3,4 @@ user.2.login=user2@gmail.com
user.1.login=user1@gmail.com
user.1.password=password
user.1.host=talk.google.com
user.1.service=gmail.com
user.1.service=gmail.com