mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-25 12:08:00 +01:00
[sinttest] Inline createLockedMuc()
This method only had one call site and using such "helper" methods has the drawback that it is not immediatly obvious what it does when reading the integration test code. Therefore, we better inline it.
This commit is contained in:
parent
c87bb8aaa4
commit
eed707f39d
2 changed files with 4 additions and 13 deletions
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright 2021-2023 Florian Schmaus
|
||||
* Copyright 2021-2024 Florian Schmaus
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -189,17 +189,6 @@ public abstract class AbstractMultiUserChatIntegrationTest extends AbstractSmack
|
|||
muc.sendConfigurationForm(answerForm);
|
||||
}
|
||||
|
||||
static void createLockedMuc(MultiUserChat muc, Resourcepart resourceName) throws
|
||||
SmackException.NoResponseException, XMPPException.XMPPErrorException,
|
||||
InterruptedException, MultiUserChatException.MucAlreadyJoinedException,
|
||||
SmackException.NotConnectedException,
|
||||
MultiUserChatException.MissingMucCreationAcknowledgeException,
|
||||
MultiUserChatException.NotAMucServiceException {
|
||||
muc.create(resourceName);
|
||||
// Note the absence of handle.makeInstant() here. The room is still being created at this point, until a
|
||||
// configuration is set.
|
||||
}
|
||||
|
||||
static void setMaxUsers(MultiUserChat muc, int maxUsers) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, InterruptedException, SmackException.NotConnectedException {
|
||||
Form configForm = muc.getConfigurationForm();
|
||||
FillableForm answerForm = configForm.getFillableForm();
|
||||
|
|
|
@ -876,7 +876,9 @@ public class MultiUserChatOccupantIntegrationTest extends AbstractMultiUserChatI
|
|||
final Resourcepart nicknameOne = Resourcepart.from("one-" + randomString);
|
||||
final Resourcepart nicknameTwo = Resourcepart.from("two-" + randomString);
|
||||
|
||||
createLockedMuc(mucAsSeenByOne, nicknameOne);
|
||||
// Note the absence of handle.makeInstant() here. The room is still being created at this point, until a
|
||||
// configuration is set.
|
||||
mucAsSeenByOne.create(nicknameOne);
|
||||
|
||||
try {
|
||||
XMPPException.XMPPErrorException conflictErrorException = assertThrows(
|
||||
|
|
Loading…
Reference in a new issue