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

Fixed & improved test cases.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@8790 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2007-07-23 02:06:30 +00:00 committed by gato
parent 52958e64f7
commit 5d9d7a7b80
6 changed files with 113 additions and 77 deletions

View file

@ -170,7 +170,9 @@ public class PresenceTest extends SmackTestCase {
*/
public void testMultipleResources() throws Exception {
// Create another connection for the same user of connection 1
XMPPConnection conn4 = new XMPPConnection(getServiceName());
ConnectionConfiguration connectionConfiguration =
new ConnectionConfiguration(getHost(), getPort(), getServiceName());
XMPPConnection conn4 = new XMPPConnection(connectionConfiguration);
conn4.connect();
conn4.login(getUsername(1), getUsername(1), "Home");
@ -252,8 +254,7 @@ public class PresenceTest extends SmackTestCase {
// Wait 500 ms
Thread.sleep(500);
Presence presence = getConnection(0).getRoster().getPresence(getBareJID(1));
assertTrue("Offline presence status not received.",
"Offline test".equals(presence.getStatus()));
assertEquals("Offline presence status not received.", "Offline test", presence.getStatus());
// Sign out of conn0.
getConnection(0).disconnect();