Index: TestHarness4LAMS2/src/org/lamsfoundation/testharness/MockUser.java =================================================================== diff -u -r883c4cc054a636dc8017da1b244b89bdaf0ff974 -raa6023fdecba00eb9a7df76e834e681f7d58462d --- TestHarness4LAMS2/src/org/lamsfoundation/testharness/MockUser.java (.../MockUser.java) (revision 883c4cc054a636dc8017da1b244b89bdaf0ff974) +++ TestHarness4LAMS2/src/org/lamsfoundation/testharness/MockUser.java (.../MockUser.java) (revision aa6023fdecba00eb9a7df76e834e681f7d58462d) @@ -2,21 +2,21 @@ * Copyright (C) 2006 LAMS Foundation (http://lamsfoundation.org) * ============================================================= * License Information: http://lamsfoundation.org/licensing/lams/2.0/ - * + * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2.0 + * it under the terms of the GNU General Public License version 2.0 * as published by the Free Software Foundation. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA - * + * * http://www.gnu.org/licenses/gpl.txt * **************************************************************** */ @@ -92,7 +92,7 @@ /** * Login to the system. - * + * * @exception TestHarnessException * :failure */ @@ -129,7 +129,7 @@ try { int seconds = 0; if (test.getMaxDelay() <= test.getMinDelay()) {// to avoid IllegalArgumentException in nextInt method on - // Random object + // Random object seconds = test.getMinDelay(); } else { seconds = test.getMinDelay() @@ -146,8 +146,8 @@ } } - protected WebForm fillForm(WebResponse resp, int formIndex, Map params) throws SAXException, - IOException { + protected WebForm fillForm(WebResponse resp, int formIndex, Map params) + throws SAXException, IOException { WebForm[] forms = resp.getForms(); if ((forms == null) || (forms.length <= formIndex)) { MockUser.log.debug(resp.getText()); @@ -166,18 +166,20 @@ } else if (value instanceof UploadFileSpec[]) { form.setParameter(entry.getKey(), (UploadFileSpec[]) entry.getValue()); } else { - throw new TestHarnessException("Unsupported parameter value type:" - + entry.getValue().getClass().getName()); + throw new TestHarnessException( + "Unsupported parameter value type:" + entry.getValue().getClass().getName()); } } } return form; } + @Override public boolean equals(Object o) { return username.equals(((MockUser) o).username); } + @Override public int hashCode() { return username.hashCode(); }