1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-06 11:01:16 +01:00

Phase 1 of large refactoring. Removing dead code, bug fixes, updates to JDK 1.5.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@4511 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2006-07-17 08:39:08 +00:00 committed by matt
parent 1a08715f67
commit bbbfe09c31
62 changed files with 291 additions and 3524 deletions

View file

@ -37,10 +37,10 @@ public class PresencePriorityTest extends SmackTestCase {
conn = new XMPPConnection(getHost(), getPort());
conn.login(getUsername(1), getUsername(1), "OtherPlace");
// Change the presence priorities of User_1
getConnection(1).sendPacket(new Presence(Presence.Type.AVAILABLE, null, 1,
Presence.Mode.AVAILABLE));
conn.sendPacket(new Presence(Presence.Type.AVAILABLE, null, 2,
Presence.Mode.AVAILABLE));
getConnection(1).sendPacket(new Presence(Presence.Type.available, null, 1,
Presence.Mode.available));
conn.sendPacket(new Presence(Presence.Type.available, null, 2,
Presence.Mode.available));
Thread.sleep(150);
// Create the chats between the participants
Chat chat0 = new Chat(getConnection(0), getBareJID(1));
@ -55,10 +55,10 @@ public class PresencePriorityTest extends SmackTestCase {
chat1.nextMessage(1000));
// Invert the presence priorities of User_1
getConnection(1).sendPacket(new Presence(Presence.Type.AVAILABLE, null, 2,
Presence.Mode.AVAILABLE));
conn.sendPacket(new Presence(Presence.Type.AVAILABLE, null, 1,
Presence.Mode.AVAILABLE));
getConnection(1).sendPacket(new Presence(Presence.Type.available, null, 2,
Presence.Mode.available));
conn.sendPacket(new Presence(Presence.Type.available, null, 1,
Presence.Mode.available));
Thread.sleep(150);
// Test delivery of message to the presence with highest priority
@ -78,14 +78,14 @@ public class PresencePriorityTest extends SmackTestCase {
assertNotNull("Resource with highest priority didn't receive the message",
chat1.nextMessage(2000));
getConnection(1).sendPacket(new Presence(Presence.Type.AVAILABLE, null, 2,
Presence.Mode.AVAILABLE));
getConnection(1).sendPacket(new Presence(Presence.Type.available, null, 2,
Presence.Mode.available));
// User_1 will log in again using another resource
conn = new XMPPConnection(getHost(), getPort());
conn.login(getUsername(1), getUsername(1), "OtherPlace");
conn.sendPacket(new Presence(Presence.Type.AVAILABLE, null, 1,
Presence.Mode.AVAILABLE));
conn.sendPacket(new Presence(Presence.Type.available, null, 1,
Presence.Mode.available));
chat2 = new Chat(conn, getBareJID(0), chat0.getThreadID());
Thread.sleep(150);
@ -97,10 +97,10 @@ public class PresencePriorityTest extends SmackTestCase {
chat2.nextMessage(1000));
// Invert the presence priorities of User_1
getConnection(1).sendPacket(new Presence(Presence.Type.AVAILABLE, null, 1,
Presence.Mode.AVAILABLE));
conn.sendPacket(new Presence(Presence.Type.AVAILABLE, null, 2,
Presence.Mode.AVAILABLE));
getConnection(1).sendPacket(new Presence(Presence.Type.available, null, 1,
Presence.Mode.available));
conn.sendPacket(new Presence(Presence.Type.available, null, 2,
Presence.Mode.available));
Thread.sleep(150);
// Test delivery of message to the presence with highest priority