mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-25 21:42:07 +01:00
[sinttest] Add MultiUserChatIntegrationTest.mucTestChangeRoomName
This commit is contained in:
parent
b2331aaacf
commit
5cbcd67645
1 changed files with 26 additions and 0 deletions
|
@ -193,4 +193,30 @@ public class MultiUserChatIntegrationTest extends AbstractMultiUserChatIntegrati
|
|||
tryDestroy(mucAsSeenByOne);
|
||||
}
|
||||
}
|
||||
|
||||
@SmackIntegrationTest
|
||||
public void mucTestChangeRoomName() throws XmppStringprepException, MucAlreadyJoinedException,
|
||||
MissingMucCreationAcknowledgeException, NotAMucServiceException, NoResponseException,
|
||||
XMPPErrorException, NotConnectedException, InterruptedException, TestNotPossibleException {
|
||||
final EntityBareJid mucAddress = getRandomRoom("smack-inttest-change-room-name");
|
||||
final MultiUserChat mucAsSeenByOne = mucManagerOne.getMultiUserChat(mucAddress);
|
||||
final Resourcepart nicknameOne = Resourcepart.from("one-" + randomString);
|
||||
|
||||
createMuc(mucAsSeenByOne, nicknameOne);
|
||||
try {
|
||||
String initialRoomName = "Initial Room Name";
|
||||
mucAsSeenByOne.getConfigFormManager().setRoomName(initialRoomName).submitConfigurationForm();
|
||||
RoomInfo roomInfo = mucManagerOne.getRoomInfo(mucAddress);
|
||||
assertEquals(initialRoomName, roomInfo.getName());
|
||||
|
||||
String newRoomName = "New Room Name";
|
||||
mucAsSeenByOne.getConfigFormManager().setRoomName(newRoomName).submitConfigurationForm();
|
||||
roomInfo = mucManagerOne.getRoomInfo(mucAddress);
|
||||
assertEquals(newRoomName, roomInfo.getName());
|
||||
} catch (MucConfigurationNotSupportedException e) {
|
||||
throw new TestNotPossibleException(e);
|
||||
} finally {
|
||||
tryDestroy(mucAsSeenByOne);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue