From b7bf4ad782c67a92235697777d9ea68eb6b7e7cc Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Fri, 22 Oct 2004 20:53:15 +0000 Subject: [PATCH] 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 --- .../smackx/muc/MultiUserChatCreationTest.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/org/jivesoftware/smackx/muc/MultiUserChatCreationTest.java b/test/org/jivesoftware/smackx/muc/MultiUserChatCreationTest.java index 64687d132..e99f94c64 100644 --- a/test/org/jivesoftware/smackx/muc/MultiUserChatCreationTest.java +++ b/test/org/jivesoftware/smackx/muc/MultiUserChatCreationTest.java @@ -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()); } }