mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-05 18:41:11 +01:00
Updates to SmackTestCase to properly provide the username and password for each connection. Test cases manually logging in now use these methods instead of wrongly assuming the username/password pattern.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13453 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
d1e9d81769
commit
8c0b062629
6 changed files with 70 additions and 39 deletions
|
|
@ -20,11 +20,11 @@
|
|||
|
||||
package org.jivesoftware.smack;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.jivesoftware.smack.packet.Presence;
|
||||
import org.jivesoftware.smack.test.SmackTestCase;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
/**
|
||||
* Ensure that the server is delivering messages to the correct client based on the client's
|
||||
* presence priority.
|
||||
|
|
@ -95,7 +95,7 @@ public class PresenceTest extends SmackTestCase {
|
|||
// User_1 will log in again using another resource
|
||||
conn = createConnection();
|
||||
conn.connect();
|
||||
conn.login(getUsername(1), getUsername(1), "OtherPlace");
|
||||
conn.login(getUsername(1), getPassword(1), "OtherPlace");
|
||||
conn.sendPacket(new Presence(Presence.Type.available, null, 1,
|
||||
Presence.Mode.available));
|
||||
chat2 = conn.getChatManager().createChat(getBareJID(0), chat0.getThreadID(), null);
|
||||
|
|
@ -147,7 +147,7 @@ public class PresenceTest extends SmackTestCase {
|
|||
// User_1 will log in again using another resource (that is going to be available)
|
||||
XMPPConnection conn = createConnection();
|
||||
conn.connect();
|
||||
conn.login(getUsername(1), getUsername(1), "OtherPlace");
|
||||
conn.login(getUsername(1), getPassword(1), "OtherPlace");
|
||||
|
||||
// Create chats between participants
|
||||
Chat chat0 = getConnection(0).getChatManager().createChat(getFullJID(1), null);
|
||||
|
|
@ -174,7 +174,7 @@ public class PresenceTest extends SmackTestCase {
|
|||
new ConnectionConfiguration(getHost(), getPort(), getServiceName());
|
||||
XMPPConnection conn4 = new XMPPConnection(connectionConfiguration);
|
||||
conn4.connect();
|
||||
conn4.login(getUsername(1), getUsername(1), "Home");
|
||||
conn4.login(getUsername(1), getPassword(1), "Home");
|
||||
|
||||
// Add a new roster entry
|
||||
Roster roster = getConnection(0).getRoster();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue