diff options
author | Damian Minkov <damencho@jitsi.org> | 2007-04-06 09:08:30 +0000 |
---|---|---|
committer | Damian Minkov <damencho@jitsi.org> | 2007-04-06 09:08:30 +0000 |
commit | 75b88bb5a6b6ea924903fc1092f33caa21bd3ca7 (patch) | |
tree | 2e536282bc213854cdd6c6b8333507105c19c97d /test/net/java | |
parent | 7e2541331db6b6481b5cc66e2b6fbba1b9fc5a6c (diff) | |
download | jitsi-75b88bb5a6b6ea924903fc1092f33caa21bd3ca7.zip jitsi-75b88bb5a6b6ea924903fc1092f33caa21bd3ca7.tar.gz jitsi-75b88bb5a6b6ea924903fc1092f33caa21bd3ca7.tar.bz2 |
1. Added AwaitingAuthorization group
2. Support for Aim
Diffstat (limited to 'test/net/java')
-rw-r--r-- | test/net/java/sip/communicator/slick/protocol/icq/TestOperationSetPersistentPresence.java | 3 | ||||
-rw-r--r-- | test/net/java/sip/communicator/slick/protocol/icq/TestOperationSetPresence.java | 25 |
2 files changed, 22 insertions, 6 deletions
diff --git a/test/net/java/sip/communicator/slick/protocol/icq/TestOperationSetPersistentPresence.java b/test/net/java/sip/communicator/slick/protocol/icq/TestOperationSetPersistentPresence.java index 6f67b71..d992529 100644 --- a/test/net/java/sip/communicator/slick/protocol/icq/TestOperationSetPersistentPresence.java +++ b/test/net/java/sip/communicator/slick/protocol/icq/TestOperationSetPersistentPresence.java @@ -141,7 +141,8 @@ public class TestOperationSetPersistentPresence // the sever creates a group NotInContactList, // beacuse the buddy we are sending message to is not in // the contactlist. So this group must be ignored - if(!group.getGroupName().equals("NotInContactList")) + // all not persistent groups must be ignored + if(group.isPersistent()) { assertNotNull("Group " + group.getGroupName() + " was returned by " diff --git a/test/net/java/sip/communicator/slick/protocol/icq/TestOperationSetPresence.java b/test/net/java/sip/communicator/slick/protocol/icq/TestOperationSetPresence.java index 6ac2e30..9aa39a5 100644 --- a/test/net/java/sip/communicator/slick/protocol/icq/TestOperationSetPresence.java +++ b/test/net/java/sip/communicator/slick/protocol/icq/TestOperationSetPresence.java @@ -575,12 +575,27 @@ public class TestOperationSetPresence //don't want any more events operationSetPresence.removeSubscriptionListener(subEvtCollector); } - - assertEquals("Subscription event dispatching failed." - , 1, subEvtCollector.collectedEvents.size()); - EventObject evt = - (EventObject)subEvtCollector.collectedEvents.get(0); + // after adding awaitingAuthorization group here are catched 3 events + // 1 - creating unresolved contact + // 2 - move of the contact to awaitingAuthorization group + // 3 - move of the contact from awaitingAuthorization group to original group + assertTrue("Subscription event dispatching failed." + , subEvtCollector.collectedEvents.size() > 0); + + EventObject evt = null; + + Iterator events = subEvtCollector.collectedEvents.iterator(); + while (events.hasNext()) + { + Object elem = events.next(); + if(elem instanceof SubscriptionEvent) + { + if(((SubscriptionEvent)elem).getEventID() + == SubscriptionEvent.SUBSCRIPTION_CREATED) + evt = (SubscriptionEvent)elem; + } + } Object source = null; Contact srcContact = null; |