mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-27 00:32:07 +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:
parent
ebf6a77a2c
commit
1d25c35031
1 changed files with 21 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue