mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Added support for discovering the rooms hosted by a MUC service. SMACK-13
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2455 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
3fe4678384
commit
6af5705ae5
2 changed files with 30 additions and 0 deletions
|
@ -420,6 +420,14 @@ public class MultiUserChatTest extends SmackTestCase {
|
|||
try {
|
||||
Collection services = MultiUserChat.getServiceNames(getConnection(1));
|
||||
assertFalse("No MUC service was found", services.isEmpty());
|
||||
|
||||
// Discover the hosted rooms by the chat service.
|
||||
Collection rooms = MultiUserChat.getHostedRooms(getConnection(1),
|
||||
(String) services.toArray()[0]);
|
||||
// Check that we have discovered the room used by this test
|
||||
assertFalse("No room was found", rooms.isEmpty());
|
||||
// Check that we have discovered the room used by this test
|
||||
assertEquals("Wrong room JID found", room, ((HostedRoom)rooms.toArray()[0]).getJid());
|
||||
}
|
||||
catch (XMPPException e) {
|
||||
e.printStackTrace();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue