org.jivesoftware.smack
Class PresenceTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jivesoftware.smack.test.SmackTestCase
              extended by org.jivesoftware.smack.PresenceTest
All Implemented Interfaces:
junit.framework.Test

public class PresenceTest
extends SmackTestCase

Ensure that the server is delivering messages to the correct client based on the client's presence priority.

Author:
Gaston Dombiak

Constructor Summary
PresenceTest(java.lang.String arg0)
           
 
Method Summary
 void testMessageToHighestPriority()
          Connection(0) will send messages to the bareJID of Connection(1) where the user of Connection(1) has logged from two different places with different presence priorities.
 void testMultipleResources()
          User1 is connected from 2 resources.
 void testNotAvailablePresence()
          User1 logs from 2 resources but only one is available.
 void testOfflineStatusPresence()
          User1 logs in, then sets offline presence information (presence with status text).
 
Methods inherited from class org.jivesoftware.smack.test.SmackTestCase
assertEquals
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, run, run, runBare, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PresenceTest

public PresenceTest(java.lang.String arg0)
Method Detail

testMessageToHighestPriority

public void testMessageToHighestPriority()
Connection(0) will send messages to the bareJID of Connection(1) where the user of Connection(1) has logged from two different places with different presence priorities.


testNotAvailablePresence

public void testNotAvailablePresence()
                              throws XMPPException
User1 logs from 2 resources but only one is available. User0 sends a message to the full JID of the unavailable resource. User1 in the not available resource should receive the message. TODO Fix this in Wildfire but before check if XMPP spec requests this feature

Throws:
XMPPException

testMultipleResources

public void testMultipleResources()
                           throws java.lang.Exception
User1 is connected from 2 resources. User1 adds User0 to his roster. Ensure that presences are correctly retrieved for User1. User1 logs off from one resource and ensure that presences are still correct for User1.

Throws:
java.lang.Exception

testOfflineStatusPresence

public void testOfflineStatusPresence()
                               throws java.lang.Exception
User1 logs in, then sets offline presence information (presence with status text). User2 logs in and checks to see if offline presence is returned.

Throws:
java.lang.Exception - if an exception occurs.