use of org.jivesoftware.smackx.packet.DiscoverItems in project Smack by igniterealtime.
the class EntityUseCases method testDiscoverNodeItems.
public void testDiscoverNodeItems() throws Exception {
LeafNode myNode = getRandomPubnode(getManager(), true, false);
myNode.send(new Item());
myNode.send(new Item());
myNode.send(new Item());
myNode.send(new Item());
DiscoverItems items = myNode.discoverItems();
int count = 0;
for (Iterator<DiscoverItems.Item> it = items.getItems(); it.hasNext(); it.next(), count++) ;
assertEquals(4, count);
}
Aggregations