Author: julien(a)jboss.com
Date: 2007-03-19 14:35:29 -0400 (Mon, 19 Mar 2007)
New Revision: 6755
Removed:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/SequenceRegistry.java
Log:
svn or idea forgot to delete a refactored class
Deleted:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/SequenceRegistry.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/SequenceRegistry.java 2007-03-19
18:35:09 UTC (rev 6754)
+++
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/SequenceRegistry.java 2007-03-19
18:35:29 UTC (rev 6755)
@@ -1,123 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.test.framework.portlet;
-
-import org.jboss.portal.common.test.info.TestInfo;
-import org.jboss.portal.common.test.info.TestContainerInfo;
-import org.jboss.portal.common.test.info.TestItemInfo;
-import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.common.test.driver.DriverCommand;
-import org.jboss.portal.common.test.driver.TestDriverException;
-import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
-import org.jboss.portal.test.framework.driver.http.HttpTestDriver;
-import org.jboss.portal.test.framework.driver.http.HttpTestContext;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Collections;
-
-/**
- * Registry of action sequences. Every sequence is binded with test id
- *
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
- * @version $Revision$
- */
-public class SequenceRegistry implements HttpTestDriver
-{
-
- /** . */
- private final Map entries;
-
- /** . */
- protected final TestContainerInfo container;
-
- public SequenceRegistry(String name)
- {
- entries = Collections.synchronizedMap(new HashMap());
- container = new TestContainerInfo(name);
- }
-
- /**
- * Adding sequence to registry. Sequence can be null as this will clear the binding
- *
- * @param testName
- * @param sequence
- */
- public void addSequence(String testName, Sequence sequence)
- {
- if (testName == null)
- {
- throw new IllegalArgumentException("Test name must be provided");
- }
- if (sequence == null)
- {
- throw new IllegalArgumentException("Sequence can't be null");
- }
- if (entries.containsKey(testName))
- {
- throw new IllegalArgumentException("Sequence cannot be bound twice");
- }
-
- //
- TestInfo test = new TestInfo(testName);
-
- //
- entries.put(testName, sequence);
- container.addChild(test);
- }
-
- public void removeSequence(String testName)
- {
- container.removeChild(testName);
- }
-
- public Sequence getSequence(String testName)
- {
- if (testName == null)
- {
- throw new IllegalArgumentException("Test name can't be null");
- }
- return (Sequence)entries.get(testName);
- }
-
- public TestItemInfo getInfo()
- {
- return container;
- }
-
- public DriverResponse invoke(String testId, DriverCommand command) throws
TestDriverException
- {
- TestInfo info = (TestInfo)getInfo().findItem(testId);
- return new InvokeGetResponse("/test/" + info.getName());
- }
-
- public void pushContext(String testId, HttpTestContext ctx)
- {
- PortletTestDriver.context = new PortletTestContext(ctx);
- }
-
- public HttpTestContext popContext(String testId)
- {
- return PortletTestDriver.context.httpTestContext;
- }
-}