1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 17:49:38 +02:00

Created new chat manager which handles the creation of Chats.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@6213 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Alex Wenckus 2006-11-22 22:55:37 +00:00 committed by alex
parent 18a35e4e8f
commit ae6065d7cc
36 changed files with 3964 additions and 714 deletions

View file

@ -65,10 +65,6 @@ import org.jivesoftware.smack.test.SmackTestCase;
*/
public class MessageEventTest extends SmackTestCase {
/**
* Constructor for MessageEventTest.
* @param name
*/
public MessageEventTest(String name) {
super(name);
}
@ -82,10 +78,10 @@ public class MessageEventTest extends SmackTestCase {
*/
public void testSendMessageEventRequest() {
// Create a chat for each connection
Chat chat1 = getConnection(0).createChat(getBareJID(1));
Chat chat1 = getConnection(0).getChatManager().createChat(getBareJID(1), null);
// Create the message to send with the roster
Message msg = chat1.createMessage();
Message msg = new Message();
msg.setSubject("Any subject you want");
msg.setBody("An interesting body comes here...");
// Create a MessageEvent Package and add it to the message
@ -118,7 +114,7 @@ public class MessageEventTest extends SmackTestCase {
*/
public void testSendMessageEventRequestAndDisplayNotifications() {
// Create a chat for each connection
Chat chat1 = getConnection(0).createChat(getBareJID(1));
Chat chat1 = getConnection(0).getChatManager().createChat(getBareJID(1), null);
// Create a Listener that listens for Messages with the extension "jabber:x:roster"
// This listener will listen on the conn2 and answer an ACK if everything is ok
@ -143,7 +139,7 @@ public class MessageEventTest extends SmackTestCase {
getConnection(0).addPacketListener(packetListener, packetFilter);
// Create the message to send with the roster
Message msg = chat1.createMessage();
Message msg = new Message();
msg.setSubject("Any subject you want");
msg.setBody("An interesting body comes here...");
// Create a MessageEvent Package and add it to the message