1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-27 04:57:59 +01:00

Changed #testCreateReservedRoom to set the default value as the answer of the form fields and also to specify the JID of the room owner.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2392 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2004-10-22 20:53:15 +00:00 committed by gaston
parent 4815fbbb7f
commit b7bf4ad782

View file

@ -94,15 +94,14 @@ public class MultiUserChatCreationTest extends SmackTestCase {
FormField field = (FormField) fields.next();
if (!FormField.TYPE_HIDDEN.equals(field.getType())
&& field.getVariable() != null) {
// Add the field values to a List
List values = new ArrayList();
for (Iterator it = field.getValues(); it.hasNext();) {
values.add((String) it.next());
}
// Sets the new answer to form to submit
submitForm.setAnswer(field.getVariable(), values);
// Sets the default value as the answer
submitForm.setDefaultAnswer(field.getVariable());
}
}
List owners = new ArrayList();
owners.add(getBareJID(0));
submitForm.setAnswer("muc#owner_roomowners", owners);
// Update the new room's configuration
muc.sendConfigurationForm(submitForm);
@ -111,6 +110,7 @@ public class MultiUserChatCreationTest extends SmackTestCase {
}
catch (XMPPException e) {
e.printStackTrace();
fail(e.getMessage());
}
}
@ -133,6 +133,7 @@ public class MultiUserChatCreationTest extends SmackTestCase {
muc.destroy("The room has almost no activity...", null);
}
catch (XMPPException e) {
e.printStackTrace();
fail(e.getMessage());
}
}