mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 10:37:59 +01:00
[sinttset] AbstractMultiUserChatIntegrationTest cleanups
This commit is contained in:
parent
56c66f17d8
commit
56ca31b156
1 changed files with 15 additions and 15 deletions
|
@ -55,9 +55,8 @@ public class AbstractMultiUserChatIntegrationTest extends AbstractSmackIntegrati
|
||||||
if (services.isEmpty()) {
|
if (services.isEmpty()) {
|
||||||
throw new TestNotPossibleException("No MUC (XEP-45) service found");
|
throw new TestNotPossibleException("No MUC (XEP-45) service found");
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
mucService = services.get(0);
|
mucService = services.get(0);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -94,10 +93,7 @@ public class AbstractMultiUserChatIntegrationTest extends AbstractSmackIntegrati
|
||||||
SmackException.NotConnectedException,
|
SmackException.NotConnectedException,
|
||||||
MultiUserChatException.MissingMucCreationAcknowledgeException,
|
MultiUserChatException.MissingMucCreationAcknowledgeException,
|
||||||
MultiUserChatException.NotAMucServiceException {
|
MultiUserChatException.NotAMucServiceException {
|
||||||
MultiUserChat.MucCreateConfigFormHandle handle = muc.create(resourceName);
|
muc.create(resourceName).makeInstant();
|
||||||
if (handle != null) {
|
|
||||||
handle.makeInstant();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void createMuc(MultiUserChat muc, String nickname) throws
|
static void createMuc(MultiUserChat muc, String nickname) throws
|
||||||
|
@ -116,10 +112,10 @@ public class AbstractMultiUserChatIntegrationTest extends AbstractSmackIntegrati
|
||||||
MultiUserChatException.MissingMucCreationAcknowledgeException,
|
MultiUserChatException.MissingMucCreationAcknowledgeException,
|
||||||
MultiUserChatException.MucConfigurationNotSupportedException,
|
MultiUserChatException.MucConfigurationNotSupportedException,
|
||||||
MultiUserChatException.NotAMucServiceException {
|
MultiUserChatException.NotAMucServiceException {
|
||||||
MultiUserChat.MucCreateConfigFormHandle handle = muc.create(resourceName);
|
muc.create(resourceName)
|
||||||
if (handle != null) {
|
.getConfigFormManager()
|
||||||
handle.getConfigFormManager().makeMembersOnly().submitConfigurationForm();
|
.makeMembersOnly()
|
||||||
}
|
.submitConfigurationForm();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void createModeratedMuc(MultiUserChat muc, Resourcepart resourceName)
|
static void createModeratedMuc(MultiUserChat muc, Resourcepart resourceName)
|
||||||
|
@ -128,8 +124,10 @@ public class AbstractMultiUserChatIntegrationTest extends AbstractSmackIntegrati
|
||||||
MultiUserChatException.MissingMucCreationAcknowledgeException,
|
MultiUserChatException.MissingMucCreationAcknowledgeException,
|
||||||
MultiUserChatException.NotAMucServiceException,
|
MultiUserChatException.NotAMucServiceException,
|
||||||
MultiUserChatException.MucConfigurationNotSupportedException {
|
MultiUserChatException.MucConfigurationNotSupportedException {
|
||||||
MultiUserChat.MucCreateConfigFormHandle handle = muc.create(resourceName);
|
muc.create(resourceName)
|
||||||
handle.getConfigFormManager().makeModerated().submitConfigurationForm();
|
.getConfigFormManager()
|
||||||
|
.makeModerated()
|
||||||
|
.submitConfigurationForm();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void createHiddenMuc(MultiUserChat muc, Resourcepart resourceName)
|
static void createHiddenMuc(MultiUserChat muc, Resourcepart resourceName)
|
||||||
|
@ -137,7 +135,9 @@ public class AbstractMultiUserChatIntegrationTest extends AbstractSmackIntegrati
|
||||||
MultiUserChatException.MucAlreadyJoinedException, SmackException.NotConnectedException,
|
MultiUserChatException.MucAlreadyJoinedException, SmackException.NotConnectedException,
|
||||||
MultiUserChatException.MissingMucCreationAcknowledgeException, MultiUserChatException.NotAMucServiceException, XmppStringprepException,
|
MultiUserChatException.MissingMucCreationAcknowledgeException, MultiUserChatException.NotAMucServiceException, XmppStringprepException,
|
||||||
MultiUserChatException.MucConfigurationNotSupportedException {
|
MultiUserChatException.MucConfigurationNotSupportedException {
|
||||||
MultiUserChat.MucCreateConfigFormHandle handle = muc.create(resourceName);
|
muc.create(resourceName)
|
||||||
handle.getConfigFormManager().makeHidden().submitConfigurationForm();
|
.getConfigFormManager()
|
||||||
|
.makeHidden()
|
||||||
|
.submitConfigurationForm();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue