1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-26 22:12:05 +01:00

Added test case for discovering room information. SMACK-11

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2426 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2004-12-15 01:44:43 +00:00 committed by gaston
parent ebf6a77a2c
commit 1d25c35031

View file

@ -315,6 +315,27 @@ public class MultiUserChatTest extends SmackTestCase {
assertTrue("Couldn't detect that user1 supports MUC", supports); assertTrue("Couldn't detect that user1 supports MUC", supports);
} }
public void testDiscoverRoomInfo() {
try {
makeRoomModerated();
RoomInfo info = MultiUserChat.getRoomInfo(getConnection(1), room);
assertFalse("Room is members-only", info.isMembersOnly());
assertTrue("Room is moderated", info.isModerated());
assertFalse("Room is Nonanonymous", info.isNonanonymous());
assertFalse("Room is PasswordProtected", info.isPasswordProtected());
assertFalse("Room is Persistent", info.isPersistent());
assertEquals("Room's description is incorrect", "fruta124", info.getDescription());
assertEquals("Room's subject is incorrect", "", info.getSubject());
assertEquals("Number of occupants is incorrect", 1, info.getOccupantsCount());
}
catch (XMPPException e) {
e.printStackTrace();
fail(e.getMessage());
}
}
public void testPrivateChat() { public void testPrivateChat() {
try { try {
// User2 joins the new room // User2 joins the new room