mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-27 00:32:07 +01:00
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@11571 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
f9399d894e
commit
5718a52133
1 changed files with 32 additions and 0 deletions
|
@ -0,0 +1,32 @@
|
||||||
|
package org.jivesoftware.smackx.pubsub;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jivesoftware.smack.XMPPException;
|
||||||
|
import org.jivesoftware.smackx.pubsub.test.PubSubTestCase;
|
||||||
|
|
||||||
|
public class MultiUserSubscriptionUseCases extends PubSubTestCase
|
||||||
|
{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getMaxConnections()
|
||||||
|
{
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testGetItemsWithSingleSubscription() throws XMPPException
|
||||||
|
{
|
||||||
|
LeafNode node = getRandomPubnode(getManager(0), true, false);
|
||||||
|
node.send((Item)null);
|
||||||
|
node.send((Item)null);
|
||||||
|
node.send((Item)null);
|
||||||
|
node.send((Item)null);
|
||||||
|
node.send((Item)null);
|
||||||
|
|
||||||
|
LeafNode user2Node = (LeafNode) getManager(1).getNode(node.getId());
|
||||||
|
user2Node.subscribe(getBareJID(1));
|
||||||
|
|
||||||
|
Collection<? extends Item> items = user2Node.getItems();
|
||||||
|
assertTrue(items.size() == 5);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue