Author: julien(a)jboss.com
Date: 2007-03-19 14:12:24 -0400 (Mon, 19 Mar 2007)
New Revision: 6752
Added:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTest.java
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestParameters.java
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestSuite.java
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/TestDriverRegistryAccess.java
Removed:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestDriver.java
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/Sequence.java
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/SequenceRegistryBuilder.java
Modified:
trunk/portlet-server/src/main/org/jboss/portal/portlet/test/PortletController.java
trunk/portlet-server/src/resources/test-sar/META-INF/jboss-service.xml
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/BasicTestSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/classes/SequenceRegistryBuilderTestCase.java
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/classes/SequenceRegistryTestCase.java
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/classes/SequenceTestCase.java
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/classes/TestBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/components/AbstractTestGenericPortlet.java
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/components/AbstractTestPortlet.java
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/components/AbstractUniversalTestPortlet.java
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/components/AbstractUniversalTestServlet.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/SessionSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ActionRequestSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/ActionResponseSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalContextSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletConfigSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/PortletModeSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/PortletPreferencesSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/PortletSessionSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/PortletSessionUtilSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/PortletURLSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/RenderRequestSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/RenderResponseSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/WindowStateSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractCacheSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/DispatcherSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/NoCacheSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/PortletConfigSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/PortletModeSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/PortletRequestsSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletresponses/PortletResponsesSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/PreferencesSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/SessionSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/misc/log4j/Log4jSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/DispatcherSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletconfig/PortletConfigSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/PortletContextSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/PortletInterfaceSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletmode/PortletModeSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/PortletRequestsSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/PortletResponsesSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/PortletSessionSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/PortletUrlSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/PreferencesSequenceBuilder.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/windowstates/WindowStatesSequenceBuilder.java
trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestContext.java
trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverClient.java
trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverServer.java
trunk/test/src/main/org/jboss/portal/test/framework/runner/BaseRunner.java
Log:
allows portlet container tests to setup test parameters
Copied: trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTest.java
(from rev 6720,
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/Sequence.java)
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTest.java
(rev 0)
+++
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTest.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -0,0 +1,145 @@
+/******************************************************************************
+ * 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.test.framework.server.NodeId;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * Keeps sequents of TestActions for one test. Actions are binded to specific request
counts with Jointcuts
+ *
+ * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision$
+ */
+public class PortletTest
+{
+
+ /** . */
+ private Map actionMap;
+
+ /** . */
+ Set parameters;
+
+ public PortletTest()
+ {
+ actionMap = new HashMap();
+ parameters = new HashSet();
+ }
+
+ public void addParameter(String parameterName)
+ {
+ parameters.add(parameterName);
+ }
+
+ public void addAction(int requestCount, Joinpoint joinpoint, TestAction action)
+ {
+ addAction(requestCount, NodeId.DEFAULT, joinpoint, action);
+ }
+
+ public void addAction(int requestCount, NodeId nodeId, Joinpoint joinpoint, TestAction
action)
+ {
+ if (action == null)
+ {
+ throw new IllegalArgumentException("Action can't be null");
+ }
+ Key key = new Key(requestCount, nodeId, joinpoint);
+ if (actionMap.containsKey(key))
+ {
+ throw new IllegalStateException("Action for this joinpoint already defined
in provided request count");
+ }
+ else
+ {
+ actionMap.put(key, action);
+ }
+ }
+
+ public TestAction getAction(int requestCount, Joinpoint joinpoint)
+ {
+ return getAction(requestCount, NodeId.DEFAULT, joinpoint);
+ }
+
+ public TestAction getAction(int requestCount, NodeId nodeId, Joinpoint joinpoint)
+ {
+ Key key = new Key(requestCount, nodeId, joinpoint);
+ return (TestAction)actionMap.get(key);
+ }
+
+ private static class Key
+ {
+
+ /** . */
+ private final int requestCount;
+
+ /** . */
+ private final NodeId nodeId;
+
+ /** . */
+ private final Joinpoint joinpoint;
+
+ public Key(int requestCount, NodeId nodeId, Joinpoint joinpoint)
+ {
+ if (requestCount < 0)
+ {
+ throw new IllegalArgumentException("Request Number must be
positive");
+ }
+ if (nodeId == null)
+ {
+ throw new IllegalArgumentException("No node id provided");
+ }
+ if (joinpoint == null)
+ {
+ throw new IllegalArgumentException("Joinpoint can't be null");
+ }
+ this.requestCount = requestCount;
+ this.nodeId = nodeId;
+ this.joinpoint = joinpoint;
+ }
+
+ public boolean equals(Object o)
+ {
+ if (this == o)
+ {
+ return true;
+ }
+ if (o instanceof Key)
+ {
+ Key that = (Key)o;
+ return this.requestCount == that.requestCount &&
this.joinpoint.equals(that.joinpoint) && this.nodeId.equals(that.nodeId);
+ }
+ return false;
+ }
+
+ public int hashCode()
+ {
+ int result;
+ result = requestCount;
+ result = 29 * result + nodeId.hashCode();
+ result = 29 * result + joinpoint.hashCode();
+ return result;
+ }
+ }
+}
Property changes on:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTest.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Deleted:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestDriver.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestDriver.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestDriver.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -1,75 +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.driver.TestDriverRegistry;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class PortletTestDriver
-{
-
- /** . */
- private TestDriverRegistry testDriverRegistry;
-
- /** . */
- public static PortletTestContext context;
-
- /** . */
- private static PortletTestDriver instance;
-
- public TestDriverRegistry getTestDriverRegistry()
- {
- return testDriverRegistry;
- }
-
- public void setTestDriverRegistry(TestDriverRegistry testDriverRegistry)
- {
- this.testDriverRegistry = testDriverRegistry;
- }
-
- public void start() throws Exception
- {
- if (instance != null)
- {
- throw new IllegalStateException("A sequence registry already exist");
- }
- instance = this;
- }
-
- public void stop() throws Exception
- {
- instance = null;
- }
-
- public static PortletTestDriver getInstance() throws IllegalStateException
- {
- if (instance == null)
- {
- throw new IllegalStateException("No existing instance");
- }
- return instance;
- }
-}
Added:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestParameters.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestParameters.java
(rev 0)
+++
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestParameters.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -0,0 +1,42 @@
+/******************************************************************************
+ * 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;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PortletTestParameters
+{
+
+ /**
+ * Defines the behavior of the portal with respect to the state management behavior
+ * when the portal calls the portlet container. Legal values are "mutable"
and "immutable".
+ * The "mutable" literal means that the portal will allow the portlet
container to modify
+ * the state and take in account any clone operation done during the request. The
"immutable"
+ * literal means that the portal will call the portlet container without allowing him
to
+ * perform cloning operations.
+ */
+ public static final String PORTAL_PORTLET_STATE_MANAGEMENT =
"portal.portlet_state_management";
+
+}
Copied:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestSuite.java (from
rev 6720,
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/SequenceRegistryBuilder.java)
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestSuite.java
(rev 0)
+++
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestSuite.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -0,0 +1,128 @@
+/******************************************************************************
+ * 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.apache.log4j.Logger;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.Arrays;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.regex.Pattern;
+
+/**
+ * Builder is invoked when web application initialization process is starting. It builds
sequence of tests for this
+ * action
+ *
+ * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
+ * @version $Revision$
+ */
+public abstract class PortletTestSuite implements ServletContextListener
+{
+
+ /** . */
+ private final Logger log = Logger.getLogger(getClass());
+
+ /** Defines pattern for method names like createXXX. */
+ public static String METHOD_PATTERN = "create.*";
+
+ /** . */
+ private final PortletTestDriver driver;
+
+ protected PortletTestSuite()
+ {
+ this.driver = new PortletTestDriver(getClass().getName());
+ }
+
+ /**
+ * Finds all methods matching pattern in current instance and invokes them. Methods
add Sequence into
+ * SequenceRegistry. Then SequenceRegistry is injected into ServletContext
+ *
+ * @param sce
+ */
+ public void contextInitialized(ServletContextEvent sce)
+ {
+
+ log.info("PortletTestSuite invoked with instance of: '" +
this.getClass().getName() + "' class");
+
+ // We invoke all createXXX methods to fill seqenceRegistry
+ List methods = introspectMethods(METHOD_PATTERN);
+ for (int i = 0; i < methods.size(); i++)
+ {
+ Method m = (Method)methods.get(i);
+ try
+ {
+ log.info("Invoking method: '" + m.getName() + "'
");
+ m.invoke(this, new Object[]{driver});
+ }
+ catch (IllegalAccessException e)
+ {
+ log.info("Error during '" + m.getName() + "' method
invokation: " + e.getMessage());
+ e.printStackTrace();
+ }
+ catch (InvocationTargetException e)
+ {
+ log.info("Error during '" + m.getName() + "' method
invokation: " + e.getMessage());
+ e.printStackTrace();
+ }
+ }
+
+ //
+ sce.getServletContext().setAttribute("SequenceRegistry", driver);
+ TestDriverRegistryAccess.getInstance().getTestDriverRegistry().register(driver);
+ }
+
+ public void contextDestroyed(ServletContextEvent sce)
+ {
+ sce.getServletContext().removeAttribute("SequenceRegistry");
+ TestDriverRegistryAccess.getInstance().getTestDriverRegistry().unregister(driver);
+ }
+
+ /**
+ * Returning List of Method objects matching given name pattern
+ *
+ * @param namePattern
+ * @return List of Method objects
+ */
+ private List introspectMethods(String namePattern)
+ {
+ List allMethods = Arrays.asList(getClass().getMethods());
+ List methods = new ArrayList(allMethods.size());
+ for (int i = 0; i < allMethods.size(); i++)
+ {
+ Method m = (Method)allMethods.get(i);
+ if (Pattern.matches(namePattern, m.getName()) &&
+ m.getParameterTypes().length == 1 &&
+ m.getParameterTypes()[0].equals(PortletTestDriver.class) &&
+ Modifier.isPublic(m.getModifiers()))
+ {
+ methods.add(m);
+ }
+ }
+ return methods;
+ }
+}
Property changes on:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestSuite.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Deleted: trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/Sequence.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/Sequence.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/Sequence.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -1,135 +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.test.framework.portlet.TestAction;
-import org.jboss.portal.test.framework.server.NodeId;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Keeps sequents of TestActions for one test. Actions are binded to specific request
counts with Jointcuts
- *
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
- * @version $Revision$
- */
-public class Sequence
-{
-
- /** . */
- private Map actionMap;
-
- public Sequence()
- {
- actionMap = new HashMap();
- }
-
- public void addAction(int requestCount, Joinpoint joinpoint, TestAction action)
- {
- addAction(requestCount, NodeId.DEFAULT, joinpoint, action);
- }
-
- public void addAction(int requestCount, NodeId nodeId, Joinpoint joinpoint, TestAction
action)
- {
- if (action == null)
- {
- throw new IllegalArgumentException("Action can't be null");
- }
- Key key = new Key(requestCount, nodeId, joinpoint);
- if (actionMap.containsKey(key))
- {
- throw new IllegalStateException("Action for this joinpoint already defined
in provided request count");
- }
- else
- {
- actionMap.put(key, action);
- }
- }
-
- public TestAction getAction(int requestCount, Joinpoint joinpoint)
- {
- return getAction(requestCount, NodeId.DEFAULT, joinpoint);
- }
-
- public TestAction getAction(int requestCount, NodeId nodeId, Joinpoint joinpoint)
- {
- Key key = new Key(requestCount, nodeId, joinpoint);
- return (TestAction)actionMap.get(key);
- }
-
- private static class Key
- {
-
- /** . */
- private final int requestCount;
-
- /** . */
- private final NodeId nodeId;
-
- /** . */
- private final Joinpoint joinpoint;
-
- public Key(int requestCount, NodeId nodeId, Joinpoint joinpoint)
- {
- if (requestCount < 0)
- {
- throw new IllegalArgumentException("Request Number must be
positive");
- }
- if (nodeId == null)
- {
- throw new IllegalArgumentException("No node id provided");
- }
- if (joinpoint == null)
- {
- throw new IllegalArgumentException("Joinpoint can't be null");
- }
- this.requestCount = requestCount;
- this.nodeId = nodeId;
- this.joinpoint = joinpoint;
- }
-
- public boolean equals(Object o)
- {
- if (this == o)
- {
- return true;
- }
- if (o instanceof Key)
- {
- Key that = (Key)o;
- return this.requestCount == that.requestCount &&
this.joinpoint.equals(that.joinpoint) && this.nodeId.equals(that.nodeId);
- }
- return false;
- }
-
- public int hashCode()
- {
- int result;
- result = requestCount;
- result = 29 * result + nodeId.hashCode();
- result = 29 * result + joinpoint.hashCode();
- return result;
- }
- }
-}
Deleted:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/SequenceRegistryBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/SequenceRegistryBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/SequenceRegistryBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -1,128 +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.apache.log4j.Logger;
-
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletContextListener;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.Arrays;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.regex.Pattern;
-
-/**
- * Builder is invoked when web application initialization process is starting. It builds
sequence of tests for this
- * action
- *
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
- * @version $Revision$
- */
-public abstract class SequenceRegistryBuilder implements ServletContextListener
-{
-
- /** . */
- private final Logger log = Logger.getLogger(getClass());
-
- /** Defines pattern for method names like createXXX. */
- public static String METHOD_PATTERN = "create.*";
-
- /** . */
- private final SequenceRegistry registry;
-
- protected SequenceRegistryBuilder()
- {
- this.registry = new SequenceRegistry(getClass().getName());
- }
-
- /**
- * Finds all methods matching pattern in current instance and invokes them. Methods
add Sequence into
- * SequenceRegistry. Then SequenceRegistry is injected into ServletContext
- *
- * @param sce
- */
- public void contextInitialized(ServletContextEvent sce)
- {
-
- log.info("RegistryBuilder invoked with instance of: '" +
this.getClass().getName() + "' class");
-
- // We invoke all createXXX methods to fill seqenceRegistry
- List methods = introspectMethods(SequenceRegistryBuilder.METHOD_PATTERN);
- for (int i = 0; i < methods.size(); i++)
- {
- Method m = (Method)methods.get(i);
- try
- {
- log.info("Invoking method: '" + m.getName() + "'
");
- m.invoke(this, new Object[]{registry});
- }
- catch (IllegalAccessException e)
- {
- log.info("Error during '" + m.getName() + "' method
invokation: " + e.getMessage());
- e.printStackTrace();
- }
- catch (InvocationTargetException e)
- {
- log.info("Error during '" + m.getName() + "' method
invokation: " + e.getMessage());
- e.printStackTrace();
- }
- }
-
- //
- sce.getServletContext().setAttribute("SequenceRegistry", registry);
- PortletTestDriver.getInstance().getTestDriverRegistry().register(registry);
- }
-
- public void contextDestroyed(ServletContextEvent sce)
- {
- sce.getServletContext().removeAttribute("SequenceRegistry");
- PortletTestDriver.getInstance().getTestDriverRegistry().unregister(registry);
- }
-
- /**
- * Returning List of Method objects matching given name pattern
- *
- * @param namePattern
- * @return List of Method objects
- */
- private List introspectMethods(String namePattern)
- {
- List allMethods = Arrays.asList(getClass().getMethods());
- List methods = new ArrayList(allMethods.size());
- for (int i = 0; i < allMethods.size(); i++)
- {
- Method m = (Method)allMethods.get(i);
- if (Pattern.matches(namePattern, m.getName()) &&
- m.getParameterTypes().length == 1 &&
- m.getParameterTypes()[0].equals(SequenceRegistry.class) &&
- Modifier.isPublic(m.getModifiers()))
- {
- methods.add(m);
- }
- }
- return methods;
- }
-}
Copied:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/TestDriverRegistryAccess.java
(from rev 6720,
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestDriver.java)
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/TestDriverRegistryAccess.java
(rev 0)
+++
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/TestDriverRegistryAccess.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -0,0 +1,72 @@
+/******************************************************************************
+ * 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.driver.TestDriverRegistry;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestDriverRegistryAccess
+{
+
+ /** . */
+ private static TestDriverRegistry testDriverRegistry;
+
+ /** . */
+ private static TestDriverRegistryAccess instance;
+
+ public TestDriverRegistry getTestDriverRegistry()
+ {
+ return testDriverRegistry;
+ }
+
+ public void setTestDriverRegistry(TestDriverRegistry testDriverRegistry)
+ {
+ this.testDriverRegistry = testDriverRegistry;
+ }
+
+ public void start() throws Exception
+ {
+ if (instance != null)
+ {
+ throw new IllegalStateException("A sequence registry already exist");
+ }
+ instance = this;
+ }
+
+ public void stop() throws Exception
+ {
+ instance = null;
+ }
+
+ public static TestDriverRegistryAccess getInstance() throws IllegalStateException
+ {
+ if (instance == null)
+ {
+ throw new IllegalStateException("No existing instance");
+ }
+ return instance;
+ }
+}
Modified:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/BasicTestSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/BasicTestSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/BasicTestSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -26,9 +26,9 @@
import org.jboss.portal.common.test.driver.response.FailureResponse;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
@@ -46,12 +46,12 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class BasicTestSequenceBuilder extends SequenceRegistryBuilder
+public class BasicTestSequenceBuilder extends PortletTestSuite
{
- public void createOnePortletTestCase(SequenceRegistry registry)
+ public void createOnePortletTestCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("OnePortlet", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -62,9 +62,9 @@
});
}
- public void createFailurePortletTestCase(SequenceRegistry registry)
+ public void createFailurePortletTestCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("FailurePortlet", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -75,9 +75,9 @@
});
}
- public void createFailAssertPortletTestCase(SequenceRegistry registry)
+ public void createFailAssertPortletTestCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("FailAssertPortlet", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -89,9 +89,9 @@
});
}
- public void createFailAssertInActionPortletTestCase(SequenceRegistry registry)
+ public void createFailAssertInActionPortletTestCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("FailAssertInActionPortlet", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -120,9 +120,9 @@
});
}
- public void createTwoPortletTestCase(SequenceRegistry registry)
+ public void createTwoPortletTestCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("TwoPortlet", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -142,9 +142,9 @@
});
}
- public void createTwoResultPortletTestCase(SequenceRegistry registry)
+ public void createTwoResultPortletTestCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("TwoResultPortlet", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/classes/SequenceRegistryBuilderTestCase.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/classes/SequenceRegistryBuilderTestCase.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/classes/SequenceRegistryBuilderTestCase.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -23,7 +23,7 @@
package org.jboss.portal.test.framework.portlet.basictests.classes;
import junit.framework.TestCase;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
import java.util.LinkedList;
import java.util.List;
@@ -36,7 +36,7 @@
{
public void testBuilder()
{
- final SequenceRegistry sr = new SequenceRegistry("toto");
+ final PortletTestDriver sr = new PortletTestDriver("toto");
final List invoked = new LinkedList();
Modified:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/classes/SequenceRegistryTestCase.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/classes/SequenceRegistryTestCase.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/classes/SequenceRegistryTestCase.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -23,8 +23,8 @@
package org.jboss.portal.test.framework.portlet.basictests.classes;
import junit.framework.TestCase;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
/**
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
@@ -34,11 +34,11 @@
{
public void testSequenceRegistry()
{
- Sequence sequence = new Sequence();
+ PortletTest portletTest = new PortletTest();
- SequenceRegistry sr = new SequenceRegistry("toto");
+ PortletTestDriver sr = new PortletTestDriver("toto");
- sr.addSequence("testA", sequence);
+ sr.addSequence("testA", portletTest);
assertNull(sr.getSequence("blah"));
assertNull(sr.getSequence(""));
Modified:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/classes/SequenceTestCase.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/classes/SequenceTestCase.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/classes/SequenceTestCase.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -26,7 +26,7 @@
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
import org.jboss.portal.test.framework.portlet.Joinpoint;
-import org.jboss.portal.test.framework.portlet.Sequence;
+import org.jboss.portal.test.framework.portlet.PortletTest;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.TestAction;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
@@ -43,7 +43,7 @@
{
public void testSequence()
{
- Sequence sequence = new Sequence();
+ PortletTest portletTest = new PortletTest();
Joinpoint joinpoint = new Joinpoint("PortletA",
Joinpoint.PORTLET_RENDER);
TestAction action = new PortletRenderTestAction()
{
@@ -54,16 +54,16 @@
};
- sequence.addAction(1, joinpoint, action);
+ portletTest.addAction(1, joinpoint, action);
- assertNull(sequence.getAction(2, joinpoint));
- assertNull(sequence.getAction(0, joinpoint));
- assertNotNull(sequence.getAction(1, joinpoint));
+ assertNull(portletTest.getAction(2, joinpoint));
+ assertNull(portletTest.getAction(0, joinpoint));
+ assertNotNull(portletTest.getAction(1, joinpoint));
- assertTrue(sequence.getAction(1, joinpoint) instanceof PortletRenderTestAction);
+ assertTrue(portletTest.getAction(1, joinpoint) instanceof
PortletRenderTestAction);
- sequence.addAction(1, joinpoint, null);
- assertNull(sequence.getAction(1, joinpoint));
+ portletTest.addAction(1, joinpoint, null);
+ assertNull(portletTest.getAction(1, joinpoint));
}
Modified:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/classes/TestBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/classes/TestBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/classes/TestBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.framework.portlet.basictests.classes;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import javax.servlet.ServletContext;
@@ -31,22 +31,22 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class TestBuilder extends SequenceRegistryBuilder
+public class TestBuilder extends PortletTestSuite
{
public int counter = 0;
- public void createOne(SequenceRegistry registry)
+ public void createOne(PortletTestDriver registry)
{
counter++;
}
- public void createTwo(SequenceRegistry registry)
+ public void createTwo(PortletTestDriver registry)
{
counter++;
}
- protected void saveRegistry(SequenceRegistry registry, ServletContext context)
+ protected void saveRegistry(PortletTestDriver registry, ServletContext context)
{
//nothing
}
Modified:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/components/AbstractTestGenericPortlet.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/components/AbstractTestGenericPortlet.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/components/AbstractTestGenericPortlet.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.framework.portlet.components;
+import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.PortletTestDriver;
-import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.common.util.Tools;
import org.jboss.portal.common.test.driver.DriverResponse;
import org.jboss.portal.common.test.driver.response.FailureResponse;
@@ -66,7 +66,7 @@
public void processAction(ActionRequest req, ActionResponse resp) throws
PortletException, IOException
{
- PortletTestContext context = PortletTestDriver.context;
+ PortletTestContext context = PortletTestDriver.getPortletTestContext();
if (testName.equals(context.getTestName()))
{
DriverResponse response;
@@ -93,7 +93,7 @@
public void render(RenderRequest req, RenderResponse resp) throws PortletException,
IOException
{
- PortletTestContext context = PortletTestDriver.context;
+ PortletTestContext context = PortletTestDriver.getPortletTestContext();
if (testName.equals(context.getTestName()))
{
DriverResponse response;
Modified:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/components/AbstractTestPortlet.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/components/AbstractTestPortlet.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/components/AbstractTestPortlet.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.framework.portlet.components;
+import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.PortletTestDriver;
-import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.common.test.driver.DriverResponse;
import org.jboss.portal.common.test.driver.response.FailureResponse;
import org.jboss.portal.common.test.driver.response.ErrorResponse;
@@ -103,7 +103,7 @@
public final void processAction(ActionRequest req, ActionResponse resp) throws
PortletException, IOException
{
- PortletTestContext context = PortletTestDriver.context;
+ PortletTestContext context = PortletTestDriver.getPortletTestContext();
if (testName.equals(context.getTestName()))
{
DriverResponse response;
@@ -130,7 +130,7 @@
public final void render(RenderRequest req, RenderResponse resp) throws
PortletException, IOException
{
- PortletTestContext context = PortletTestDriver.context;
+ PortletTestContext context = PortletTestDriver.getPortletTestContext();
if (testName.equals(context.getTestName()))
{
DriverResponse response;
Modified:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/components/AbstractUniversalTestPortlet.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/components/AbstractUniversalTestPortlet.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/components/AbstractUniversalTestPortlet.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -26,12 +26,11 @@
import org.jboss.portal.common.test.driver.response.FailureResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
import org.jboss.portal.test.framework.portlet.Joinpoint;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.TestAction;
-import org.jboss.portal.test.framework.portlet.PortletTestDriver;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.server.NodeId;
@@ -135,7 +134,7 @@
*/
public final void processAction(ActionRequest req, ActionResponse resp) throws
PortletException, IOException
{
- PortletTestContext ctx = PortletTestDriver.context;
+ PortletTestContext ctx = PortletTestDriver.getPortletTestContext();
//
log.debug("Component '" + getComponentId() + "'
processAction() method invoked for '"
@@ -143,13 +142,13 @@
+ctx.getRequestCount() + "' request count");
//
- Sequence sequence = getSequence(ctx.getTestName());
+ PortletTest portletTest = getSequence(ctx.getTestName());
//
- if (sequence != null)
+ if (portletTest != null)
{
//
- TestAction action = sequence.getAction(ctx.getRequestCount(), NodeId.locate(),
actionJoinpoint);
+ TestAction action = portletTest.getAction(ctx.getRequestCount(),
NodeId.locate(), actionJoinpoint);
//
if (action == null)
@@ -185,7 +184,7 @@
*/
public final void render(RenderRequest req, RenderResponse resp) throws
PortletException, IOException
{
- PortletTestContext ctx = PortletTestDriver.context;
+ PortletTestContext ctx = PortletTestDriver.getPortletTestContext();
//
log.debug("Component '" + getComponentId() + "' render()
method invoked for '"
@@ -201,10 +200,10 @@
// Get the action
TestAction action = null;
- Sequence sequence = getSequence(ctx.getTestName());
- if (sequence != null)
+ PortletTest portletTest = getSequence(ctx.getTestName());
+ if (portletTest != null)
{
- action = sequence.getAction(ctx.getRequestCount(), NodeId.locate(),
renderJoinpoint);
+ action = portletTest.getAction(ctx.getRequestCount(), NodeId.locate(),
renderJoinpoint);
}
@@ -252,9 +251,9 @@
*
* @return SequenceRegistry
*/
- private SequenceRegistry getSequenceRegistry()
+ private PortletTestDriver getSequenceRegistry()
{
- return
(SequenceRegistry)getPortletContext().getAttribute("SequenceRegistry");
+ return
(PortletTestDriver)getPortletContext().getAttribute("SequenceRegistry");
}
/**
@@ -263,9 +262,9 @@
* @return
* @throws PortletException if there is no SequenceRegistry
*/
- private Sequence getSequence(String testId) throws PortletException
+ private PortletTest getSequence(String testId) throws PortletException
{
- SequenceRegistry registry = getSequenceRegistry();
+ PortletTestDriver registry = getSequenceRegistry();
if (registry == null)
{
log.error("No SequenceRegistry object found in current context");
Modified:
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/components/AbstractUniversalTestServlet.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/components/AbstractUniversalTestServlet.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/components/AbstractUniversalTestServlet.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -25,11 +25,10 @@
import org.apache.log4j.Logger;
import org.jboss.portal.common.test.driver.DriverResponse;
import org.jboss.portal.test.framework.portlet.Joinpoint;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
import org.jboss.portal.test.framework.portlet.TestAction;
-import org.jboss.portal.test.framework.portlet.PortletTestDriver;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.server.NodeId;
@@ -94,7 +93,7 @@
*/
protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
- PortletTestContext ctx = PortletTestDriver.context;
+ PortletTestContext ctx = PortletTestDriver.getPortletTestContext();
//
log.info("Component '" + getComponentId() + "' service()
method invoked for '"
@@ -107,10 +106,10 @@
reset();
}
- Sequence sequence = getSequence(ctx.getTestName());
- if (sequence != null)
+ PortletTest portletTest = getSequence(ctx.getTestName());
+ if (portletTest != null)
{
- TestAction action = sequence.getAction(ctx.getRequestCount(), NodeId.locate(),
getServiceJointpoint());
+ TestAction action = portletTest.getAction(ctx.getRequestCount(),
NodeId.locate(), getServiceJointpoint());
if (action != null && action instanceof ServletServiceTestAction)
{
log.info("Found Action for this jointpoint");
@@ -143,9 +142,9 @@
*
* @return SequenceRegistry
*/
- private SequenceRegistry getSequenceRegistry()
+ private PortletTestDriver getSequenceRegistry()
{
- return
(SequenceRegistry)getServletContext().getAttribute("SequenceRegistry");
+ return
(PortletTestDriver)getServletContext().getAttribute("SequenceRegistry");
}
/**
@@ -154,9 +153,9 @@
* @return
* @throws javax.servlet.ServletException if there is no SequenceRegistry
*/
- protected Sequence getSequence(String testId) throws ServletException
+ protected PortletTest getSequence(String testId) throws ServletException
{
- SequenceRegistry registry = getSequenceRegistry();
+ PortletTestDriver registry = getSequenceRegistry();
if (registry == null)
{
log.info("No SequenceRegistry object found in current context");
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/SessionSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/SessionSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/SessionSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -26,9 +26,9 @@
import org.jboss.portal.common.test.driver.DriverResponse;
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.common.util.Tools;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
@@ -48,11 +48,11 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
*/
-public class SessionSequenceBuilder extends SequenceRegistryBuilder
+public class SessionSequenceBuilder extends PortletTestSuite
{
- public void createTestReplicateImmutableValue(SequenceRegistry registry)
+ public void createTestReplicateImmutableValue(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("TestReplicateImmutableValue", seq);
seq.addAction(0, NodeId.PORTS_01, UTP1.RENDER_JOINPOINT, new
PortletRenderTestAction()
{
@@ -79,9 +79,9 @@
});
}
- public void createTestReplicateMutableValue(SequenceRegistry registry)
+ public void createTestReplicateMutableValue(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("TestReplicateMutableValue", seq);
seq.addAction(0, NodeId.PORTS_01, UTP1.RENDER_JOINPOINT, new
PortletRenderTestAction()
{
@@ -110,9 +110,9 @@
});
}
- public void
createTestModifyExistingAttributeWithoutExplicitSetDoesNotReplicate(SequenceRegistry
registry)
+ public void
createTestModifyExistingAttributeWithoutExplicitSetDoesNotReplicate(PortletTestDriver
registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("TestModifyExistingAttributeWithoutExplicitSetDoesNotReplicate",
seq);
seq.addAction(0, NodeId.PORTS_01, UTP1.RENDER_JOINPOINT, new
PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ActionRequestSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ActionRequestSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ActionRequestSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -25,9 +25,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
@@ -43,7 +43,7 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class ActionRequestSequenceBuilder extends SequenceRegistryBuilder
+public class ActionRequestSequenceBuilder extends PortletTestSuite
{
//********************************
@@ -54,9 +54,9 @@
* ActionRequest.BASIC_AUTH ActionRequest.CLIENT_CERT_AUTH ActionRequest.DIGEST_AUTH
ActionRequest.FORM_AUTH
* ActionRequest.USER_INFO
*/
- public void createConstantsCase(SequenceRegistry registry)
+ public void createConstantsCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Constants", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -74,9 +74,9 @@
}
/** ActionRequest.getProperty() ActionRequest.getProperties() */
- public void createPropertyCase(SequenceRegistry registry)
+ public void createPropertyCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Property", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -121,9 +121,9 @@
}
/** ActionRequest.getAttribute() ActionRequest.setAttribute()
ActionRequest.removeAttribute() */
- public void createAttributeCase(SequenceRegistry registry)
+ public void createAttributeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Attribute", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
@@ -178,9 +178,9 @@
}
/** ActionRequest.getParameter() ActionRequest.getParameterValues() */
- public void createParameterCase(SequenceRegistry registry)
+ public void createParameterCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Parameter", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/ActionResponseSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/ActionResponseSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/ActionResponseSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -25,9 +25,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
@@ -45,13 +45,13 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class ActionResponseSequenceBuilder extends SequenceRegistryBuilder
+public class ActionResponseSequenceBuilder extends PortletTestSuite
{
/** ActionResponse.setRenderParameter() ActionResponse.setRenderParameter()
ActionResponse.setRenderParameters() */
- public void createRenderParameterCase(SequenceRegistry registry)
+ public void createRenderParameterCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("RenderParameter", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
@@ -200,9 +200,9 @@
//************************
/** ActionResponse.setProperty() ActionResponse.addProperty() */
- public void createPropertyCase(SequenceRegistry registry)
+ public void createPropertyCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Property", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
@@ -247,9 +247,9 @@
}
/** ActionResponse.encodeURL() */
- public void createEncodeURLCase(SequenceRegistry registry)
+ public void createEncodeURLCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("EncodeURL", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalContextSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalContextSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalContextSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -24,9 +24,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
@@ -44,12 +44,12 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortalContextSequenceBuilder extends SequenceRegistryBuilder
+public class PortalContextSequenceBuilder extends PortletTestSuite
{
/** PortalContext.getSupportedPortletModes() */
- public void createSupportedPortletModesCase(SequenceRegistry registry)
+ public void createSupportedPortletModesCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("SupportedPortletModes", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -76,9 +76,9 @@
}
/** PortalContext.getSupportedWindowStates() */
- public void createSupportedWindowStatesCase(SequenceRegistry registry)
+ public void createSupportedWindowStatesCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("SupportedWindowStates", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -106,9 +106,9 @@
}
/** PortalContext.getPortalInfo() */
- public void createPortalInfoCase(SequenceRegistry registry)
+ public void createPortalInfoCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("PortalInfo", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -125,9 +125,9 @@
}
/** PortalContext.getProperty() */
- public void createPropertyCase(SequenceRegistry registry)
+ public void createPropertyCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Property", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletConfigSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletConfigSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletConfigSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -24,9 +24,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
@@ -46,13 +46,13 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortletConfigSequenceBuilder extends SequenceRegistryBuilder
+public class PortletConfigSequenceBuilder extends PortletTestSuite
{
/** @portlet.api assert="PortletConfig.getPortletName()" */
- public void createPortletNameCase(SequenceRegistry registry)
+ public void createPortletNameCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("PortletName", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
@@ -69,9 +69,9 @@
}
/** @portlet.api assert="PortletConfig.getPortletContext()" */
- public void createPortletContextCase(SequenceRegistry registry)
+ public void createPortletContextCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("PortletContext", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -92,9 +92,9 @@
}
/** @portlet.api assert="PortletConfig.getInitParameter()" */
- public void createInitParameterCase(SequenceRegistry registry)
+ public void createInitParameterCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("InitParameter", seq);
seq.addAction(0, UTP2.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -129,9 +129,9 @@
}
/** @portlet.api assert="PortletConfig.getInitParameterNames()" */
- public void createInitParameterNamesCase(SequenceRegistry registry)
+ public void createInitParameterNamesCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("InitParameterNames", seq);
//this portlet has no init params defined
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -24,9 +24,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.TestContants;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
@@ -44,7 +44,7 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortletContextSequenceBuilder extends SequenceRegistryBuilder
+public class PortletContextSequenceBuilder extends PortletTestSuite
{
/** . */
@@ -54,9 +54,9 @@
private static final Pattern VERSION_PATTERN = Pattern.compile(VERSION_REGEX,
Pattern.CASE_INSENSITIVE);
/** PortletContext.getServerInfo() */
- public void createServerInfoCase(SequenceRegistry registry)
+ public void createServerInfoCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ServerInfo", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -72,9 +72,9 @@
}
/** PortletContext.getRequestDispatcher() PortletContext.getNamedDispatcher() */
- public void createDispatcherCase(SequenceRegistry registry)
+ public void createDispatcherCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Dispatcher", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -92,9 +92,9 @@
}
/** PortletContext.getMinorVersion() PortletContext.getMajorVersion() */
- public void createVersionCase(SequenceRegistry registry)
+ public void createVersionCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Version", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -110,9 +110,9 @@
}
/** PortletContext.getMimeType() */
- public void createMimeTypeCase(SequenceRegistry registry)
+ public void createMimeTypeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("MimeType", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -127,9 +127,9 @@
}
/** PortletContext.getResourcePaths() */
- public void createResourcePathsCase(SequenceRegistry registry)
+ public void createResourcePathsCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ResourcePaths", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -149,9 +149,9 @@
}
/** PortletContext.getResource() */
- public void createResourceCase(SequenceRegistry registry)
+ public void createResourceCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Resource", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -188,9 +188,9 @@
}
/** PortletContext.getAttribute() PortletContext.removeAttribute()
PortletContext.setAttribute() */
- public void createAttributeCase(SequenceRegistry registry)
+ public void createAttributeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Attribute", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -236,9 +236,9 @@
}
/** PortletContext.getInitParameter() */
- public void createInitParameterCase(SequenceRegistry registry)
+ public void createInitParameterCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("InitParameter", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -265,9 +265,9 @@
}
/** PortletContext.getPortletContextName() */
- public void createPortletContextNameCase(SequenceRegistry registry)
+ public void createPortletContextNameCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("PortletContextName", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/PortletModeSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/PortletModeSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/PortletModeSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -24,9 +24,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
@@ -40,13 +40,13 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortletModeSequenceBuilder extends SequenceRegistryBuilder
+public class PortletModeSequenceBuilder extends PortletTestSuite
{
/** @portlet.api assert="PortletMode.EDIT, PortletMode.HELP,
PortletMode.VIEW" */
- public void createModesCase(SequenceRegistry registry)
+ public void createModesCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Modes", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -62,9 +62,9 @@
}
/** @portlet.api assert="PortletMode.PortletMode()" */
- public void createConstructorCase(SequenceRegistry registry)
+ public void createConstructorCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Constructor", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -82,9 +82,9 @@
}
/** @portlet.api assert="PortletConfig.equals()" */
- public void createEqualsCase(SequenceRegistry registry)
+ public void createEqualsCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Equals", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -106,9 +106,9 @@
}
/** @portlet.api assert="PortletConfig.hashCode()" */
- public void createHashCodeCase(SequenceRegistry registry)
+ public void createHashCodeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("HashCode", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/PortletPreferencesSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/PortletPreferencesSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/PortletPreferencesSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -25,9 +25,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
@@ -49,13 +49,13 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortletPreferencesSequenceBuilder extends SequenceRegistryBuilder
+public class PortletPreferencesSequenceBuilder extends PortletTestSuite
{
/** PortletPreferences.isReadOnly() */
- public void createReadOnlyCase(SequenceRegistry registry)
+ public void createReadOnlyCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ReadOnly", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -80,9 +80,9 @@
* PortletPreferences.getValue() PortletPreferences.getValues()
PortletPreferences.setValue()
* PortletPreferences.setValues()
*/
- public void createValueCase(SequenceRegistry registry)
+ public void createValueCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Value", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
@@ -195,9 +195,9 @@
}
/** PortletPreferences.reset() */
- public void createResetNullKeyThrowsNPE(SequenceRegistry registry)
+ public void createResetNullKeyThrowsNPE(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ResetNullKeyThrowsNPE", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -220,9 +220,9 @@
/**
*
*/
- public void createZeroLengthArrayValue(SequenceRegistry registry)
+ public void createZeroLengthArrayValue(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ZeroLengthArrayValue", seq);
seq.addAction(0, UTP2.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/PortletSessionSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/PortletSessionSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/PortletSessionSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -24,9 +24,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
@@ -40,13 +40,13 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortletSessionSequenceBuilder extends SequenceRegistryBuilder
+public class PortletSessionSequenceBuilder extends PortletTestSuite
{
/** PortletSession.APPLICATION_SCOPE PortletSession.PORTLET_SCOPE */
- public void createConstantsCase(SequenceRegistry registry)
+ public void createConstantsCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Constants", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -60,9 +60,9 @@
}
/** PortletSession.getAttribute() */
- public void createGetAttributeCase(SequenceRegistry registry)
+ public void createGetAttributeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("GetAttribute", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -117,9 +117,9 @@
}
/** PortletSession.getAttributeNames() */
- public void createAttributeNamesCase(SequenceRegistry registry)
+ public void createAttributeNamesCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("AttributeNames", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -159,9 +159,9 @@
}
/** PortletSession.getCreationTime() */
- public void createCreationTimeCase(SequenceRegistry registry)
+ public void createCreationTimeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("CreationTime", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -189,9 +189,9 @@
}
/** PortletSession.invalidate() */
- public void createInvalidateCase(SequenceRegistry registry)
+ public void createInvalidateCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Invalidate", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -217,9 +217,9 @@
}
/** PortletSession.isNew() */
- public void createNewCase(SequenceRegistry registry)
+ public void createNewCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("New", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -247,9 +247,9 @@
}
/** PortletSession.removeAttribute() */
- public void createRemoveAttributeCase(SequenceRegistry registry)
+ public void createRemoveAttributeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("RemoveAttribute", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -307,9 +307,9 @@
}
/** PortletSession.setAttribute() */
- public void createSetAttributeCase(SequenceRegistry registry)
+ public void createSetAttributeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("SetAttribute", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/PortletSessionUtilSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/PortletSessionUtilSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/PortletSessionUtilSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -24,9 +24,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
@@ -41,11 +41,11 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortletSessionUtilSequenceBuilder extends SequenceRegistryBuilder
+public class PortletSessionUtilSequenceBuilder extends PortletTestSuite
{
- public void createDecodeAttributeNameCase(SequenceRegistry registry)
+ public void createDecodeAttributeNameCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("DecodeAttributeName", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -69,9 +69,9 @@
});
}
- public void createDecodeScopeCase(SequenceRegistry registry)
+ public void createDecodeScopeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("DecodeScope", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/PortletURLSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/PortletURLSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/PortletURLSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -24,9 +24,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
@@ -42,13 +42,13 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortletURLSequenceBuilder extends SequenceRegistryBuilder
+public class PortletURLSequenceBuilder extends PortletTestSuite
{
/** PortletURL.setParameter() PortletURL.setParameter() PortletURL.setParameters() */
- public void createParameterCase(SequenceRegistry registry)
+ public void createParameterCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Parameter", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/RenderRequestSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/RenderRequestSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/RenderRequestSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -24,9 +24,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
@@ -39,7 +39,7 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class RenderRequestSequenceBuilder extends SequenceRegistryBuilder
+public class RenderRequestSequenceBuilder extends PortletTestSuite
{
//********************************
//PortletRequest interface Asserts
@@ -49,9 +49,9 @@
* RenderRequest.BASIC_AUTH RenderRequest.CLIENT_CERT_AUTH RenderRequest.DIGEST_AUTH
RenderRequest.FORM_AUTH
* RenderRequest.USER_INFO
*/
- public void createConstantsCase(SequenceRegistry registry)
+ public void createConstantsCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Constants", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -69,9 +69,9 @@
}
/** RenderRequest.getProperty() RenderRequest.getProperties() */
- public void createPropertyCase(SequenceRegistry registry)
+ public void createPropertyCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Property", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -102,9 +102,9 @@
}
/** RenderRequest.getAttribute() RenderRequest.setAttribute()
RenderRequest.removeAttribute() */
- public void createAttributeCase(SequenceRegistry registry)
+ public void createAttributeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Attribute", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -143,9 +143,9 @@
}
/** RenderRequest.getParameter() RenderRequest.getParameterValues() */
- public void createParameterCase(SequenceRegistry registry)
+ public void createParameterCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Parameter", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/RenderResponseSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/RenderResponseSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/RenderResponseSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -24,9 +24,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
@@ -39,13 +39,13 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class RenderResponseSequenceBuilder extends SequenceRegistryBuilder
+public class RenderResponseSequenceBuilder extends PortletTestSuite
{
/** RenderResponse.EXPIRATION_CACHE */
- public void createConstantsCase(SequenceRegistry registry)
+ public void createConstantsCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Constants", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -58,9 +58,9 @@
}
/** RenderResponse.setContentType() */
- public void createContentTypeCase(SequenceRegistry registry)
+ public void createContentTypeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ContentType", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -85,9 +85,9 @@
//************************
/** RenderResponse.setProperty() RenderResponse.addProperty() */
- public void createPropertyCase(SequenceRegistry registry)
+ public void createPropertyCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Property", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
@@ -117,9 +117,9 @@
}
/** RenderResponse.encodeURL() */
- public void createEncodeURLCase(SequenceRegistry registry)
+ public void createEncodeURLCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("EncodeURL", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/WindowStateSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/WindowStateSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/WindowStateSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -24,9 +24,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
@@ -40,13 +40,13 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class WindowStateSequenceBuilder extends SequenceRegistryBuilder
+public class WindowStateSequenceBuilder extends PortletTestSuite
{
/** @portlet.api assert="WindowState.MINIMIZED WindowState.MAXIMIZED
WindowState.NORMAL" */
- public void createStatesCase(SequenceRegistry registry)
+ public void createStatesCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("States", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -62,9 +62,9 @@
}
/** @portlet.api assert="WindowState.WindowState()" */
- public void createConstructorCase(SequenceRegistry registry)
+ public void createConstructorCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Constructor", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -82,9 +82,9 @@
}
/** @portlet.api assert="WindowState.equals()" */
- public void createEqualsCase(SequenceRegistry registry)
+ public void createEqualsCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Equals", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -106,9 +106,9 @@
}
/** @portlet.api assert="WindowState.hashCode()" */
- public void createHashCodeCase(SequenceRegistry registry)
+ public void createHashCodeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("HashCode", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractCacheSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractCacheSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractCacheSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -22,10 +22,10 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr168.ext.common;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
import org.jboss.portal.test.framework.portlet.Joinpoint;
-import org.jboss.portal.test.framework.portlet.Sequence;
+import org.jboss.portal.test.framework.portlet.PortletTest;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
@@ -53,7 +53,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class AbstractCacheSequenceBuilder extends SequenceRegistryBuilder
+public class AbstractCacheSequenceBuilder extends PortletTestSuite
{
protected final AbstractCacheSequenceBuilder.NavigationalStateConfigurator
renderParameterConfigurator = new
AbstractCacheSequenceBuilder.NavigationalStateConfigurator()
@@ -101,10 +101,10 @@
/**
* Overriding the expiration cache to 0 disable the cache on a render or an
action/render.
*/
- protected void createDisableDuringRender(String testName, SequenceRegistry registry,
Joinpoint renderjp, Joinpoint actionjp)
+ protected void createDisableDuringRender(String testName, PortletTestDriver registry,
Joinpoint renderjp, Joinpoint actionjp)
{
final Set calls = new HashSet();
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence(testName, seq);
//
@@ -174,7 +174,7 @@
*/
protected void createCacheMarkup(
String testName,
- SequenceRegistry registry,
+ PortletTestDriver registry,
Joinpoint p1renderjp,
Joinpoint p1actionjp,
Joinpoint p2renderjp,
@@ -182,7 +182,7 @@
{
final Set calls = new HashSet();
final String[] url = new String[1];
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence(testName, seq);
//
@@ -317,14 +317,14 @@
*/
protected void createActionInvalidates(
String testName,
- SequenceRegistry registry,
+ PortletTestDriver registry,
Joinpoint p1renderjp,
Joinpoint p1actionjp,
Joinpoint p2renderjp)
{
final Set calls = new HashSet();
final String[] url = new String[1];
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence(testName, seq);
//
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/DispatcherSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/DispatcherSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/DispatcherSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -26,9 +26,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
@@ -53,15 +53,15 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class DispatcherSequenceBuilder extends SequenceRegistryBuilder
+public class DispatcherSequenceBuilder extends PortletTestSuite
{
public static final String SERVLET_A_URI =
"/test-jsr168-ext-dispatcher/universalServletA";
public static final String SERVLET_B_URI =
"/test-jsr168-ext-dispatcher/universalServletB";
- public void createGetRequestURICase(SequenceRegistry registry)
+ public void createGetRequestURICase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("GetRequestURI", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -86,9 +86,9 @@
}
/** Show that we can access request headers from the portlet request properties. */
- public void createRequestHeaderAccess(SequenceRegistry registry)
+ public void createRequestHeaderAccess(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("RequestHeaderAccess", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -22,9 +22,9 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr168.ext.expiringcache;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
-import org.jboss.portal.test.framework.portlet.Sequence;
+import org.jboss.portal.test.framework.portlet.PortletTest;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.test.portlet.framework.UTP1;
@@ -60,27 +60,27 @@
public class ExpiringCacheSequenceBuilder extends AbstractCacheSequenceBuilder
{
- public void createDisableDuringRenderExpiringCache(SequenceRegistry registry)
+ public void createDisableDuringRenderExpiringCache(PortletTestDriver registry)
{
createDisableDuringRender("DisableDuringRenderExpiringCache", registry,
UTP1.RENDER_JOINPOINT, UTP1.ACTION_JOINPOINT);
}
- public void createActionInvalidatesExpiringCache(SequenceRegistry registry)
+ public void createActionInvalidatesExpiringCache(PortletTestDriver registry)
{
createActionInvalidates("ActionInvalidatesExpiringCache", registry,
UTP2.RENDER_JOINPOINT, UTP2.ACTION_JOINPOINT, UTP3.RENDER_JOINPOINT);
}
- public void createExpiringCacheWithRenderParameters(SequenceRegistry registry)
+ public void createExpiringCacheWithRenderParameters(PortletTestDriver registry)
{
createCacheMarkup("ExpiringCacheWithRenderParameters", registry,
UTP4.RENDER_JOINPOINT, UTP4.ACTION_JOINPOINT, UTP5.RENDER_JOINPOINT,
renderParameterConfigurator);
}
- public void createExpiringCacheWithWindowState(SequenceRegistry registry)
+ public void createExpiringCacheWithWindowState(PortletTestDriver registry)
{
createCacheMarkup("ExpiringCacheWithWindowState", registry,
UTP6.RENDER_JOINPOINT, UTP6.ACTION_JOINPOINT, UTP7.RENDER_JOINPOINT,
windowStateConfigurator);
}
- public void createExpiringCacheWithPortletMode(SequenceRegistry registry)
+ public void createExpiringCacheWithPortletMode(PortletTestDriver registry)
{
createCacheMarkup("ExpiringCacheWithPortletMode", registry,
UTP8.RENDER_JOINPOINT, UTP8.ACTION_JOINPOINT, UTP9.RENDER_JOINPOINT,
portletModeConfigurator);
}
@@ -88,11 +88,11 @@
/**
* Check that content is cached for at most 5 seconds in various situations.
*/
- public void createExpiringCache(SequenceRegistry registry)
+ public void createExpiringCache(PortletTestDriver registry)
{
final Set calls = new HashSet();
final String[] url = new String[1];
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ExpiringCache", seq);
//
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -32,7 +32,7 @@
import org.jboss.portal.test.portlet.framework.UTP7;
import org.jboss.portal.test.portlet.framework.UTP8;
import org.jboss.portal.test.portlet.framework.UTP9;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -41,27 +41,27 @@
public class NeverExpiringCacheSequenceBuilder extends AbstractCacheSequenceBuilder
{
- public void createDisableDuringRenderNeverExpiringCache(SequenceRegistry registry)
+ public void createDisableDuringRenderNeverExpiringCache(PortletTestDriver registry)
{
createDisableDuringRender("DisableDuringRenderNeverExpiringCache",
registry, UTP1.RENDER_JOINPOINT, UTP1.ACTION_JOINPOINT);
}
- public void createActionInvalidatesNeverExpiringCache(SequenceRegistry registry)
+ public void createActionInvalidatesNeverExpiringCache(PortletTestDriver registry)
{
createActionInvalidates("ActionInvalidatesNeverExpiringCache", registry,
UTP2.RENDER_JOINPOINT, UTP2.ACTION_JOINPOINT, UTP3.RENDER_JOINPOINT);
}
- public void createNeverExpiringCacheWithRenderParameters(SequenceRegistry registry)
+ public void createNeverExpiringCacheWithRenderParameters(PortletTestDriver registry)
{
createCacheMarkup("NeverExpiringCacheWithRenderParameters", registry,
UTP4.RENDER_JOINPOINT, UTP4.ACTION_JOINPOINT, UTP5.RENDER_JOINPOINT,
renderParameterConfigurator);
}
- public void createNeverExpiringCacheWithWindowState(SequenceRegistry registry)
+ public void createNeverExpiringCacheWithWindowState(PortletTestDriver registry)
{
createCacheMarkup("NeverExpiringCacheWithWindowState", registry,
UTP6.RENDER_JOINPOINT, UTP6.ACTION_JOINPOINT, UTP7.RENDER_JOINPOINT,
windowStateConfigurator);
}
- public void createNeverExpiringCacheWithPortletMode(SequenceRegistry registry)
+ public void createNeverExpiringCacheWithPortletMode(PortletTestDriver registry)
{
createCacheMarkup("NeverExpiringCacheWithPortletMode", registry,
UTP8.RENDER_JOINPOINT, UTP8.ACTION_JOINPOINT, UTP9.RENDER_JOINPOINT,
portletModeConfigurator);
}
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/NoCacheSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/NoCacheSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/NoCacheSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -22,9 +22,9 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr168.ext.nocache;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.Sequence;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTest;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.Joinpoint;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
@@ -34,7 +34,6 @@
import org.jboss.portal.test.portlet.framework.UTP2;
import org.jboss.portal.test.portlet.framework.UTP3;
import org.jboss.portal.test.portlet.framework.UTP4;
-import org.jboss.portal.test.portlet.framework.UTP5;
import org.jboss.portal.common.test.driver.DriverResponse;
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.common.test.driver.response.ErrorResponse;
@@ -46,7 +45,6 @@
import javax.portlet.PortletException;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
-import javax.portlet.PortletURL;
import java.util.Set;
import java.util.HashSet;
import java.io.IOException;
@@ -55,15 +53,15 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class NoCacheSequenceBuilder extends SequenceRegistryBuilder
+public class NoCacheSequenceBuilder extends PortletTestSuite
{
- public void createExplicitNoCache(SequenceRegistry registry)
+ public void createExplicitNoCache(PortletTestDriver registry)
{
create("ExplicitNoCache", registry, UTP1.RENDER_JOINPOINT,
UTP1.ACTION_JOINPOINT, UTP2.RENDER_JOINPOINT);
}
- public void createImplicitNoCache(SequenceRegistry registry)
+ public void createImplicitNoCache(PortletTestDriver registry)
{
create("ImplicitNoCache", registry, UTP3.RENDER_JOINPOINT,
UTP3.ACTION_JOINPOINT, UTP4.RENDER_JOINPOINT);
}
@@ -74,14 +72,14 @@
*/
private void create(
String testName,
- SequenceRegistry registry,
+ PortletTestDriver registry,
Joinpoint p1renderjp,
Joinpoint p1actionjp,
Joinpoint p2renderjp)
{
final Set calls = new HashSet();
final String[] url = new String[1];
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence(testName, seq);
//
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/PortletConfigSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/PortletConfigSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/PortletConfigSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -24,9 +24,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
@@ -46,11 +46,11 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortletConfigSequenceBuilder extends SequenceRegistryBuilder
+public class PortletConfigSequenceBuilder extends PortletTestSuite
{
- public void createGetResourceBundleDuringInit(SequenceRegistry registry)
+ public void createGetResourceBundleDuringInit(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("GetResourceBundleDuringInit", seq);
seq.addAction(0, GetResourceBundleDuringInitPortlet.RENDER_JOINPOINT, new
PortletRenderTestAction()
@@ -67,9 +67,9 @@
}
- public void createResourceBundleCascade(SequenceRegistry registry)
+ public void createResourceBundleCascade(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ResourceBundleCascade", seq);
seq.addAction(0, ResourceBundleCascadePortlet.RENDER_JOINPOINT, new
PortletRenderTestAction()
@@ -142,9 +142,9 @@
});
}
- public void createResourceBundle(SequenceRegistry registry)
+ public void createResourceBundle(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ResourceBundle", seq);
seq.addAction(0, ResourceBundlePortlet.RENDER_JOINPOINT, new
PortletRenderTestAction()
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/PortletModeSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/PortletModeSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/PortletModeSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -25,9 +25,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
@@ -47,11 +47,11 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortletModeSequenceBuilder extends SequenceRegistryBuilder
+public class PortletModeSequenceBuilder extends PortletTestSuite
{
- public void createTestActionWithPortletModeCase(SequenceRegistry registry)
+ public void createTestActionWithPortletModeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("TestActionWithPortletMode", seq);
seq.addAction(0, TestActionWithPortletModePortlet.RENDER_JOINPOINT, new
PortletRenderTestAction()
{
@@ -81,9 +81,9 @@
});
}
- public void createTestDuringActionCase(SequenceRegistry registry)
+ public void createTestDuringActionCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("TestDuringAction", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -114,9 +114,9 @@
}
- public void createTestDuringRenderCase(SequenceRegistry registry)
+ public void createTestDuringRenderCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("TestDuringRender", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/PortletRequestsSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/PortletRequestsSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/PortletRequestsSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -28,9 +28,9 @@
import org.jboss.portal.common.test.driver.DriverResponse;
import org.jboss.portal.common.http.HttpRequest;
import org.jboss.portal.test.framework.driver.http.response.InvokePostResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
@@ -58,7 +58,7 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortletRequestsSequenceBuilder extends SequenceRegistryBuilder
+public class PortletRequestsSequenceBuilder extends PortletTestSuite
{
private final byte[] byteContent = {65, 66, 67, 68, 69, 70};
@@ -67,9 +67,9 @@
* Test that a POST request having a content type set to x-www-form-urlencoded will
make the body content unavailable
* as an input stream or a reader and the parameters are decoded.
*/
- public void createActionRequestUseFormCase(SequenceRegistry registry)
+ public void createActionRequestUseFormCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ActionRequestUseForm", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -137,9 +137,9 @@
* Test that a POST request having a content type not set to x-www-form-urlencoded
will make the body content
* available as an input stream.
*/
- public void createActionRequestUseInputStreamCase(SequenceRegistry registry)
+ public void createActionRequestUseInputStreamCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ActionRequestUseInputStream", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -216,9 +216,9 @@
* Test that a POST request having a content type not set to x-www-form-urlencoded
will make the body content
* available as a reader.
*/
- public void createActionRequestUseReaderCase(SequenceRegistry registry)
+ public void createActionRequestUseReaderCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ActionRequestUseReader", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -292,9 +292,9 @@
* This case works with two portlets involved in the same render request. To pass the
test, the assert result of the
* two portlets must pass.
*/
- public void createRequestAttributeCase(SequenceRegistry registry)
+ public void createRequestAttributeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("RequestAttribute", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -327,9 +327,9 @@
* This case works with two portlets involved in the same render request. To pass the
test, the assert result of the
* two portlets must pass.
*/
- public void createRequestAttributeScopingCase(SequenceRegistry registry)
+ public void createRequestAttributeScopingCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("RequestAttributeScoping", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -342,9 +342,9 @@
});
}
- public void createRequestParameterCase(SequenceRegistry registry)
+ public void createRequestParameterCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("RequestParameter", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -396,9 +396,9 @@
/** Show that we can access request headers from the portlet request properties. */
- public void createRequestHeaderAccess(SequenceRegistry registry)
+ public void createRequestHeaderAccess(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("RequestHeaderAccess", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletresponses/PortletResponsesSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletresponses/PortletResponsesSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletresponses/PortletResponsesSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -24,9 +24,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
@@ -39,11 +39,11 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortletResponsesSequenceBuilder extends SequenceRegistryBuilder
+public class PortletResponsesSequenceBuilder extends PortletTestSuite
{
- public void createContentTypeCase(SequenceRegistry registry)
+ public void createContentTypeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ContentType", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/PreferencesSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/PreferencesSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/PreferencesSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -25,9 +25,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
@@ -51,7 +51,7 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PreferencesSequenceBuilder extends SequenceRegistryBuilder
+public class PreferencesSequenceBuilder extends PortletTestSuite
{
/**
@@ -59,11 +59,12 @@
*
* @param registry
*/
- public void createIsReadOnlyCase(SequenceRegistry registry)
+ public void createIsReadOnlyCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("IsReadOnly", seq);
+
seq.addAction(0, UTP2.RENDER_JOINPOINT, new PortletRenderTestAction()
{
protected DriverResponse run(Portlet portlet, RenderRequest request,
RenderResponse response, PortletTestContext context)
@@ -100,9 +101,9 @@
});
}
- public void createStoreMustPersistAllChangesCase(SequenceRegistry registry)
+ public void createStoreMustPersistAllChangesCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("StoreMustPersistAllChanges", seq);
seq.addAction(0, UTP4.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -169,9 +170,9 @@
});
}
- public void createMapCase(SequenceRegistry registry)
+ public void createMapCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("Map", seq);
seq.addAction(0, UTP3.RENDER_JOINPOINT, new PortletRenderTestAction()
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/SessionSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/SessionSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/SessionSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -25,9 +25,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
@@ -54,7 +54,7 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class SessionSequenceBuilder extends SequenceRegistryBuilder
+public class SessionSequenceBuilder extends PortletTestSuite
{
/**
@@ -62,9 +62,9 @@
*
* @param registry
*/
- public void createSessionDoesNotExistBeforeItIsRequested(SequenceRegistry registry)
+ public void createSessionDoesNotExistBeforeItIsRequested(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("SessionDoesNotExistBeforeItIsRequested", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -82,9 +82,9 @@
*
* @param registry
*/
- public void createObtainNonNullSessionUsingCreateEqualsFalse(SequenceRegistry
registry)
+ public void createObtainNonNullSessionUsingCreateEqualsFalse(PortletTestDriver
registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ObtainNonNullSessionUsingCreateEqualsFalse", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -127,9 +127,9 @@
* 1/ portlet put key=value in the http session 2/ portlet ask the client to perform
get on /servlet 3/ servlet check
* that key=value
*/
- public void createCrossContextSessionAttributeCase(SequenceRegistry registry)
+ public void createCrossContextSessionAttributeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("CrossContextSessionAttribute", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/misc/log4j/Log4jSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/misc/log4j/Log4jSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/misc/log4j/Log4jSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -25,9 +25,9 @@
import org.apache.log4j.Logger;
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
@@ -39,11 +39,11 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision: 5113 $
*/
-public class Log4jSequenceBuilder extends SequenceRegistryBuilder
+public class Log4jSequenceBuilder extends PortletTestSuite
{
- public void createLog4j(SequenceRegistry registry)
+ public void createLog4j(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("TestLog4j", seq);
seq.addAction(0, LoggingPortlet.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/DispatcherSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/DispatcherSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/DispatcherSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -25,9 +25,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
@@ -57,7 +57,7 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class DispatcherSequenceBuilder extends SequenceRegistryBuilder
+public class DispatcherSequenceBuilder extends PortletTestSuite
{
public static final String SERVLET_A_URI =
"/test-jsr168-dispatcher/universalServletA";
@@ -71,9 +71,9 @@
* name of a servlet known to the PortletContext of the portlet application. If no
resource can be resolved based on
* the given path or name the methods must return null"
*/
- public void createObtainingDispatcherCase(SequenceRegistry registry)
+ public void createObtainingDispatcherCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ObtainingDispatcher", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -124,9 +124,9 @@
* @portlet.specification assert="SPEC:123 - The parameters associated with a
PortletRequestDispatcher are scoped to
* apply only for the duration of the include call."
*/
- public void createQueryStringInRequestDispatcherCase(SequenceRegistry registry)
+ public void createQueryStringInRequestDispatcherCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("QueryStringInRequestDispatcher", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
@@ -184,9 +184,9 @@
* @portlet.specification assert="SPEC:125 - The portlet container must ensure
that the servlet or JSP called through
* a PortletRequestDispatcher is called in the same thread as the
PortletRequestDispatcher include invocation."
*/
- public void createDispatchedRequestCase(SequenceRegistry registry)
+ public void createDispatchedRequestCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("DispatchedRequest", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
@@ -225,9 +225,9 @@
* @portlet.specification assert="SPEC:126 - Servlets and JSPs included from
portlets must be handled as HTTP GET
* requests."
*/
- public void createGETMethodCase(SequenceRegistry registry)
+ public void createGETMethodCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("GETMethod", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
@@ -266,9 +266,9 @@
* javax.servlet.include.context_path javax.servlet.include.servlet_path,
javax.servlet.include.path_info,
* javax.servlet.include.query_string"
*/
- public void createIncludedRequestParametersCase(SequenceRegistry registry)
+ public void createIncludedRequestParametersCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("IncludedRequestParameters", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -368,9 +368,9 @@
* @portlet.specification assert="SPEC:128 - javax.portlet.config,
javax.portlet.request, javax.portlet.response.
* These attributes must be the same Portlet API objects accessible to the portlet
doing the include call."
*/
- public void createIncludedRequestAttributesCase(SequenceRegistry registry)
+ public void createIncludedRequestAttributesCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("IncludedRequestAttributes", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -445,9 +445,9 @@
* @portlet.specification assert="SPEC:137 - The getMethod method of the
HttpServletRequest must always return
* �GET�"
*/
- public void createRequestObjectCase(SequenceRegistry registry)
+ public void createRequestObjectCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("RequestObject", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -576,9 +576,9 @@
* @portlet.specification assert="SPEC:141 - The getLocale method of the
HttpServletResponse must be based on the
* getLocale method of the RenderResponse."
*/
- public void createResponseObjectCase(SequenceRegistry registry)
+ public void createResponseObjectCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ResponseObject", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -623,9 +623,9 @@
* a PortletException. The root cause of the exception must be set to the original
exception before being
* propagated."
*/
- public void createErrorHandlingCase(SequenceRegistry registry)
+ public void createErrorHandlingCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ErrorHandling", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletconfig/PortletConfigSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletconfig/PortletConfigSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletconfig/PortletConfigSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -24,9 +24,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
@@ -45,11 +45,11 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortletConfigSequenceBuilder extends SequenceRegistryBuilder
+public class PortletConfigSequenceBuilder extends PortletTestSuite
{
- public void createInlineValuesNotInResourceBundle(SequenceRegistry registry)
+ public void createInlineValuesNotInResourceBundle(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("InlineValuesNotInResourceBundle", seq);
seq.addAction(0, InlineValuesNotInResourceBundlePortlet.RENDER_JOINPOINT, new
PortletRenderTestAction()
@@ -73,9 +73,9 @@
});
}
- public void createInlineValuesWithNoResourceBundleDefined(SequenceRegistry registry)
+ public void createInlineValuesWithNoResourceBundleDefined(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("InlineValuesWithNoResourceBundleDefined", seq);
seq.addAction(0, InlineValuesWithNoResourceBundleDefinedPortlet.RENDER_JOINPOINT,
new PortletRenderTestAction()
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/PortletContextSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/PortletContextSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/PortletContextSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -25,9 +25,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
import org.jboss.portal.common.util.Tools;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
@@ -49,7 +49,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
-import java.util.ArrayList;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.List;
@@ -58,7 +57,7 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortletContextSequenceBuilder extends SequenceRegistryBuilder
+public class PortletContextSequenceBuilder extends PortletTestSuite
{
@@ -66,9 +65,9 @@
* @portlet.specification assert="SPEC:43 - The initialization parameters
accessible through the PortletContext must
* be the same that are accessible through the ServletContext of the portlet
application."
*/
- public void createInitializationParametersCase(SequenceRegistry registry)
+ public void createInitializationParametersCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("InitializationParameters", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -115,9 +114,9 @@
* ServletContext of the portlet application. A direct consequence of this is that
data stored in the ServletContext
* by servlets or JSPs is accessible to portlets through the PortletContext and vice
versa."
*/
- public void createContextAttributesCase(SequenceRegistry registry)
+ public void createContextAttributesCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ContextAttributes", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -164,9 +163,9 @@
* @portlet.specification assert="SPEC:45 - The PortletContext must offer access
to the same set of resources the
* ServletContext exposes."
*/
- public void createAccessSameSetOfResourcesCase(SequenceRegistry registry)
+ public void createAccessSameSetOfResourcesCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("AccessSameSetOfResources", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -236,9 +235,9 @@
* ServletContext handles. It must be accessible as a context attribute using the same
constant defined in the
* Servlet Specification 2.3 SVR 3 Servlet Context Chapter,
javax.servlet.context.tempdir."
*/
- public void createTempDirCase(SequenceRegistry registry)
+ public void createTempDirCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("TempDir", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/PortletInterfaceSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/PortletInterfaceSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/PortletInterfaceSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -26,9 +26,9 @@
import org.jboss.portal.common.test.driver.response.FailureResponse;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
@@ -58,16 +58,16 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortletInterfaceSequenceBuilder extends SequenceRegistryBuilder
+public class PortletInterfaceSequenceBuilder extends PortletTestSuite
{
/**
* @portlet.specification assert="SPEC:4 - After the portlet object is
instantiated, the portlet container must
* initialize the portlet before invoking it to handle requests"
*/
- public void createInitializeBeforeHandleCase(SequenceRegistry registry)
+ public void createInitializeBeforeHandleCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("InitializeBeforeHandle", seq);
seq.addAction(0, InitializeBeforeHandlePortlet.RENDER_JOINPOINT, new
PortletRenderTestAction()
{
@@ -88,9 +88,9 @@
* @portlet.specification assert="SPEC:8 - A RuntimeException thrown during
initialization must be handled as a
* PortletException."
*/
- public void createExceptionsOnInitCase(SequenceRegistry registry)
+ public void createExceptionsOnInitCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ExceptionsOnInit", seq);
//PortletExceptionDuringInitPortlet
seq.addAction(0, PortletExceptionDuringInitPortlet.RENDER_JOINPOINT, new
PortletRenderTestAction()
@@ -163,9 +163,9 @@
* portal/portlet-container must first trigger the action request by invoking the
processAction method of the
* targeted portlet."
*/
- public void createInvokeActionFirstCase(SequenceRegistry registry)
+ public void createInvokeActionFirstCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("InvokeActionFirst", seq);
final Boolean[] actionInvoked= new Boolean[1];
@@ -201,9 +201,9 @@
* Then, the portal/portlet-container must trigger the render request by invoking the
render method for all the
* portlets in the portal page with the possible exception of portlets for which their
content is being cached."
*/
- public void createInvokeRenderAfterActionURLCase(SequenceRegistry registry)
+ public void createInvokeRenderAfterActionURLCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("InvokeRenderAfterActionURL", seq);
final Boolean[] actionInvoked= new Boolean[1];
@@ -279,9 +279,9 @@
* portal/portlet-container must invoke the render method for all the portlets in the
portal page with the possible
* exception of portlets for which their content is being cached."
*/
- public void createInvokeRenderAfterRenderURLCase(SequenceRegistry registry)
+ public void createInvokeRenderAfterRenderURLCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("InvokeRenderAfterRenderURL", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
@@ -326,9 +326,9 @@
* portal/portlet-container to redirect the user to a specific URL. If the portlet
issues a redirection, when the
* processAction method concludes, the portal/portlet-container must send the
redirection back to the user agent"
*/
- public void createSendRedirectDuringActionCase(SequenceRegistry registry)
+ public void createSendRedirectDuringActionCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("SendRedirectDuringAction", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -365,9 +365,9 @@
});
}
- public void createMinimizedStateDontRenderPortlet(SequenceRegistry registry)
+ public void createMinimizedStateDontRenderPortlet(PortletTestDriver registry)
{
- registry.addSequence("MinimizedStateDontRenderPortlet", new Sequence());
+ registry.addSequence("MinimizedStateDontRenderPortlet", new
PortletTest());
}
/**
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletmode/PortletModeSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletmode/PortletModeSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletmode/PortletModeSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -25,9 +25,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
@@ -44,15 +44,15 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortletModeSequenceBuilder extends SequenceRegistryBuilder
+public class PortletModeSequenceBuilder extends PortletTestSuite
{
/**
* @portlet.specification assert="SPEC:38 - The portlet must not be invoked in a
portlet mode that has not been
* declared as supported for a given markup type"
*/
- public void createNotInvokeModeDeclaredForNotSupportedMarkupCase(SequenceRegistry
registry)
+ public void createNotInvokeModeDeclaredForNotSupportedMarkupCase(PortletTestDriver
registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
seq.addAction(0,
NotInvokeModeDeclaredForNotSupportedMarkupHelperPortlet.RENDER_JOINPOINT, new
PortletRenderTestAction()
{
@@ -119,8 +119,8 @@
// registry.addSequence("NotInvokeModeDeclaredForNotSupportedMarkup",
seq);
}
- public void createRequestDispatchingDependingOnModePortlet(SequenceRegistry registry)
+ public void createRequestDispatchingDependingOnModePortlet(PortletTestDriver
registry)
{
- registry.addSequence("RequestDispatchingDependingOnModePortlet", new
Sequence());
+ registry.addSequence("RequestDispatchingDependingOnModePortlet", new
PortletTest());
}
}
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/PortletRequestsSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/PortletRequestsSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/PortletRequestsSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -25,9 +25,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
@@ -47,7 +47,7 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortletRequestsSequenceBuilder extends SequenceRegistryBuilder
+public class PortletRequestsSequenceBuilder extends PortletTestSuite
{
private final byte[] byteContent = {65, 66, 67, 68, 69, 70};
@@ -56,9 +56,9 @@
* @portlet.specification assert="SPEC:50 - The portlet-container must not
propagate parameters received in an action
* request to subsequent render requests of the portlet."
*/
- public void createActionToRequestParametersNotPropagatedCase(SequenceRegistry
registry)
+ public void createActionToRequestParametersNotPropagatedCase(PortletTestDriver
registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ActionToRequestParametersNotPropagated", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -98,9 +98,9 @@
* part of the same client request, the parameters received with render request must
be the render parameters set
* during the action request."
*/
- public void createActionToRenderParametersCase(SequenceRegistry registry)
+ public void createActionToRenderParametersCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ActionToRenderParameters", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -139,9 +139,9 @@
* previous render request."
* @portlet.specification assert="SPEC:54 - A portlet must not see any parameter
targeted to other portlets."
*/
- public void createParametersDuringRenderNotTargetedCase(SequenceRegistry registry)
+ public void createParametersDuringRenderNotTargetedCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ParametersDuringRenderNotTargeted", seq);
final String[] urls = new String[1];
seq.addAction(0, UTP2.RENDER_JOINPOINT, new PortletRenderTestAction()
@@ -228,9 +228,9 @@
* @portlet.specification assert="SPEC:56 - If there is a single parameter value
associated with a parameter name the
* method returns must return an array of size one containing the parameter
value"
*/
- public void createParameterAccessMethodstCase(SequenceRegistry registry)
+ public void createParameterAccessMethodstCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ParameterAccessMethodst", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -275,9 +275,9 @@
* @portlet.specification assert="SPEC:59 - "Otherwise, it must be the path
the portlet application is rooted to, the
* path must start with a '/' and it must not end with a '/'
character."
*/
- public void createContextPathCase(SequenceRegistry registry)
+ public void createContextPathCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ContextPath", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -327,9 +327,9 @@
* @portlet.specification assert="SPEC:60 - If the user is not authenticated the
getAuthType method must return
* null"
*/
- public void createAuthTypeCase(SequenceRegistry registry)
+ public void createAuthTypeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("AuthType", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -367,9 +367,9 @@
* supports in order of preference. The first element of the enumeration must be the
same content type returned by
* the getResponseContentType method."
*/
- public void createContentTypeCase(SequenceRegistry registry)
+ public void createContentTypeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ContentType", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -407,9 +407,9 @@
* IllegalStateException. Similarly, if the reader is obtained, a call to the
getPortletInputStream must throw an
* IllegalStateException."
*/
- public void createObtainingInputStreamAndReaderCase(SequenceRegistry registry)
+ public void createObtainingInputStreamAndReaderCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ObtainingInputStreamAndReader", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/PortletResponsesSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/PortletResponsesSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/PortletResponsesSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -26,9 +26,9 @@
import org.jboss.portal.common.test.driver.response.FailureResponse;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
@@ -62,16 +62,16 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortletResponsesSequenceBuilder extends SequenceRegistryBuilder
+public class PortletResponsesSequenceBuilder extends PortletTestSuite
{
/**
* @portlet.specification assert="SPEC:65 - The sendRedirect method instructs the
portal/portlet-container to set the
* appropriate headers and content body to redirect the user to a different URL. A
fully qualified URL or a full path
* URL must be specified. If a relative path URL is given, an IllegalArgumentException
must be thrown."
*/
- public void createSendRedirectWithRelativeURLCase(SequenceRegistry registry)
+ public void createSendRedirectWithRelativeURLCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("SendRedirectWithRelativeURL", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -112,9 +112,9 @@
* setWindowState, setRenderParameter or setRenderParameters methods of the
ActionResponse interface, an
* IllegalStateException must be thrown and the redirection must not be
executed"
*/
- public void createSendRedirectAfterChangeStateMethodsCase(SequenceRegistry registry)
+ public void createSendRedirectAfterChangeStateMethodsCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("SendRedirectAfterChangeStateMethods", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -236,9 +236,9 @@
* mode. The new portlet mode would be effective in the following render request. If a
portlet attempts to set a
* portlet mode that is not allowed to switch to, a PortletModeException must be
thrown."
*/
- public void createNotAllowedModeCase(SequenceRegistry registry)
+ public void createNotAllowedModeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("NotAllowedMode", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -279,9 +279,9 @@
* state. The new window state would be effective in the following render request. If
a portlet attempts to set a
* window state that it is not allowed to switch to, a WindowStateException must be
thrown."
*/
- public void createNotSupportedWindowStateCase(SequenceRegistry registry)
+ public void createNotSupportedWindowStateCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("NotSupportedWindowState", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -323,9 +323,9 @@
* @portlet.specification assert="SPEC:70 - If the exception is caught by the
portlet, the redirection must be
* executed."
*/
- public void createStateChangesAfterRedirectionSendCase(SequenceRegistry registry)
+ public void createStateChangesAfterRedirectionSendCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("StateChangesAfterRedirectionSend", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -388,9 +388,9 @@
* @portlet.specification assert="SPEC:73 - If no render parameters are set
during the processAction invocation, the
* render request must not contain any request parameters."
*/
- public void createRenderParametersCase(SequenceRegistry registry)
+ public void createRenderParametersCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("RenderParameters", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -448,9 +448,9 @@
* @portlet.specification assert="SPEC:75 - If the exception is caught by the
portlet, the redirection must be
* executed. If the exception is propagated back to the portlet-container, the
redirection must not be executed."
*/
- public void createParametersSetAfterSendRedirectCase(SequenceRegistry registry)
+ public void createParametersSetAfterSendRedirectCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ParametersSetAfterSendRedirect", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -514,9 +514,9 @@
* IllegalArgumentException if the content type set does not match (including wildcard
matching) any of the content
* types returned by the getResponseContentType method of the PortleRequest
object"
*/
- public void createSetNotSupportedContentTypeCase(SequenceRegistry registry)
+ public void createSetNotSupportedContentTypeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("SetNotSupportedContentType", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -540,9 +540,9 @@
* @portlet.specification assert="SPEC:77 - If the getWriter or
getPortletOutputStream methods are called before the
* setContentType method, they must throw an IllegalStateException."
*/
- public void createSetContentTypeBeforeOutputStreamOrWriterCase(SequenceRegistry
registry)
+ public void createSetContentTypeBeforeOutputStreamOrWriterCase(PortletTestDriver
registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("SetContentTypeBeforeOutputStreamOrWriter", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -583,9 +583,9 @@
* @portlet.specification assert="SPEC:78 - If the portlet has set a content
type, the getContentType method must
* return it. Otherwise, the getContentType method must return null."
*/
- public void createGetContentTypeCase(SequenceRegistry registry)
+ public void createGetContentTypeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("GetContentType", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -615,9 +615,9 @@
* the Writer of the RenderResponse object. A portlet must use only one of these
objects. The portlet container must
* throw an IllegalStateException if a portlet attempts to use both."
*/
- public void createOutputStreamOrWriterCase(SequenceRegistry registry)
+ public void createOutputStreamOrWriterCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("OutputStreamOrWriter", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -676,9 +676,9 @@
* @portlet.specification assert="SPEC:88 - The getNamespace method must return a
valid identifier as defined in the
* 3.8 Identifier Section of the Java Language Specification Second Edition."
*/
- public void createNamespaceEncodingCase(SequenceRegistry registry)
+ public void createNamespaceEncodingCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("NamespaceEncoding", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -729,9 +729,9 @@
* sendRedirect method has been called an IllegalStateException must be thrown. (...)
If the exception is propagated
* back to the portlet-container, the redirection must not be executed."
*/
- public void _createIllegalStateExceptionAfterSendRedirectCase(SequenceRegistry
registry)
+ public void _createIllegalStateExceptionAfterSendRedirectCase(PortletTestDriver
registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("IllegalStateExceptionAfterSendRedirect", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -778,9 +778,9 @@
* setBufferSize method. The buffer assigned is not required to be the size requested
by the portlet, but must be at
* least as large as the size requested."
*/
- public void createBufferSizeCase(SequenceRegistry registry)
+ public void createBufferSizeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("BufferSize", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -805,9 +805,9 @@
* @portlet.specification assert="SPEC:83 - If the response is committed and the
reset or resetBuffer method is
* called, an IllegalStateException must be thrown."
*/
- public void createBufferResetCase(SequenceRegistry registry)
+ public void createBufferResetCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("BufferReset", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/PortletSessionSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/PortletSessionSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/PortletSessionSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -25,9 +25,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
@@ -59,7 +59,7 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortletSessionSequenceBuilder extends SequenceRegistryBuilder
+public class PortletSessionSequenceBuilder extends PortletTestSuite
{
/**
@@ -69,9 +69,9 @@
* @portlet.specification assert="SPEC:107 - In addition, if within these portlet
requests more than one portlet
* creates a session, the session object must be the same for all the portlets in the
same portlet application"
*/
- public void createSessionCreateCase(SequenceRegistry registry)
+ public void createSessionCreateCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("SessionCreate", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -121,9 +121,9 @@
* @portlet.specification assert="SPEC:119 - The variant of these methods that
does not receive a scope must be
* treated as PORTLET_SCOPE."
*/
- public void createSessionAttributesCase(SequenceRegistry registry)
+ public void createSessionAttributesCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("SessionAttributes", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -219,9 +219,9 @@
* @portlet.specification assert="SPEC:114 - Conversely, data stored by portlets
in the PortletSession in the portlet
* application scope is accessible to servlets and JSPs through the
HttpSession."
*/
- public void createHttpSessionRelationsCase(SequenceRegistry registry)
+ public void createHttpSessionRelationsCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("HttpSessionRelations", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -267,9 +267,9 @@
* @portlet.specification assert="SPEC:115 - If the HttpSession object is
invalidated, the PortletSession object must
* also be invalidated by the portlet container."
*/
- public void createHttpSessionInvalidatesPortletSession(SequenceRegistry registry)
+ public void createHttpSessionInvalidatesPortletSession(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("HttpSessionInvalidatesPortletSession", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -312,9 +312,9 @@
* @portlet.specification assert="SPEC:116 - If the PortletSession object is
invalidated by a portlet, the portlet
* container must invalidate the associated HttpSession object."
*/
- public void createPortletSessionInvalidatesHttpSession(SequenceRegistry registry)
+ public void createPortletSessionInvalidatesHttpSession(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("PortletSessionInvalidatesHttpSession", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/PortletUrlSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/PortletUrlSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/PortletUrlSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -25,9 +25,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
@@ -50,15 +50,15 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PortletUrlSequenceBuilder extends SequenceRegistryBuilder
+public class PortletUrlSequenceBuilder extends PortletTestSuite
{
/**
* @portlet.specification assert="SPEC:26 - A render URL is an optimization for a
special type of action URLs. The
* portal/portletcontainer must not invoke the processAction method of the targeted
portlet."
*/
- public void createRenderURLNotInvokeActionCase(SequenceRegistry registry)
+ public void createRenderURLNotInvokeActionCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("RenderURLNotInvokeAction", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -97,9 +97,9 @@
* @portlet.specification assert="SPEC:29 - All the parameters a portlet adds to
a PortletURL object must be made
* available to the portlet as request parameters"
*/
- public void createPortletURLParametersCase(SequenceRegistry registry)
+ public void createPortletURLParametersCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("PortletURLParameters", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -203,9 +203,9 @@
* defined as supported by the portlet or that the user it is not allowed to use. The
setPortletMode methods must
* throw a PortletModeException in that situation."
*/
- public void createPortletURLWithNotSupportedModeCase(SequenceRegistry registry)
+ public void createPortletURLWithNotSupportedModeCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("PortletURLWithNotSupportedMode", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -232,9 +232,9 @@
* supported by the portlet container. The setWindowState method must throw a
WindowStateException if that is the
* case"
*/
- public void createPortletURLWithNotSupportedStateCase(SequenceRegistry registry)
+ public void createPortletURLWithNotSupportedStateCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("PortletURLWithNotSupportedState", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -260,9 +260,9 @@
* indicate if the portlet URL has to be a secure URL or not (i.e. HTTPS or HTTP). If
the setSecure method is not
* used, the portlet URL must be of the same security level of the current
request."
*/
- public void createSecurityLevelCase(SequenceRegistry registry)
+ public void createSecurityLevelCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("SecurityLevel", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/PreferencesSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/PreferencesSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/PreferencesSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -25,9 +25,9 @@
import org.jboss.portal.common.test.driver.response.EndTestResponse;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
@@ -57,7 +57,7 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class PreferencesSequenceBuilder extends SequenceRegistryBuilder
+public class PreferencesSequenceBuilder extends PortletTestSuite
{
@@ -65,9 +65,9 @@
* @portlet.specification assert="SPEC:90 Preference attributes are String array
objects. Preferences attributes can
* be set to null."
*/
- public void createPreferencesCanBeSetToNullCase(SequenceRegistry registry)
+ public void createPreferencesCanBeSetToNullCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("PreferencesCanBeSetToNull", seq);
seq.addAction(0, UTP2.RENDER_JOINPOINT, new PortletRenderTestAction()
@@ -142,9 +142,9 @@
* values containing all current preference values. Preferences values must not be
modified if the values in the Map
* are altered."
*/
- public void
createPreferencesMapModificationDoesNotModifyPreferencesValuesCase(SequenceRegistry
registry)
+ public void
createPreferencesMapModificationDoesNotModifyPreferencesValuesCase(PortletTestDriver
registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("PreferencesMapModificationDoesNotModifyPreferencesValues",
seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
@@ -195,9 +195,9 @@
* <p/>
* Does not cover restore to default test yet.
*/
- public void createResetPreferenceHavingNoDefaultValueDeletesItCase(SequenceRegistry
registry)
+ public void createResetPreferenceHavingNoDefaultValueDeletesItCase(PortletTestDriver
registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ResetPreferenceHavingNoDefaultValueDeletesIt",
seq);
seq.addAction(0, UTP4.RENDER_JOINPOINT, new PortletRenderTestAction()
@@ -294,9 +294,9 @@
* @portlet.specification assert="SPEC:93 - If a preference attribute is read
only, the setValue, setValues and reset
* methods must throw a ReadOnlyException when the portlet is in any of the standard
modes"
*/
- public void createReadOnlyPreferenceCannotBeModifiedCase(SequenceRegistry registry)
+ public void createReadOnlyPreferenceCannotBeModifiedCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ReadOnlyPreferenceCannotBeModified", seq);
seq.addAction(0, UTP5.RENDER_JOINPOINT, new PortletRenderTestAction()
@@ -393,9 +393,9 @@
* @portlet.specification assert="SPEC:96 - All changes made to
PortletPreferences object not followed by a call to
* the store method must be discarded when the portlet finishes the 20 processAction
method."
*/
- public void createChangesMadeButNotStoredAreDiscardedCase(SequenceRegistry registry)
+ public void createChangesMadeButNotStoredAreDiscardedCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ChangesMadeButNotStoredAreDiscarded", seq);
seq.addAction(0, UTP3.RENDER_JOINPOINT, new PortletRenderTestAction()
@@ -469,9 +469,9 @@
* @portlet.specification assert="SPEC:97 - If the store method is invoked within
the scope of a render method
* invocation, it must throw an IllegalStateException."
*/
- public void
createStoreCalledDuringRenderThrowsIllegalArgumentExceptionCase(SequenceRegistry
registry)
+ public void
createStoreCalledDuringRenderThrowsIllegalArgumentExceptionCase(PortletTestDriver
registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("StoreCalledDuringRenderThrowsIllegalArgumentException",
seq);
seq.addAction(0, UTP4.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -499,9 +499,9 @@
* element set to true, the preference attribute is modifiable when the portlet is
processing an action request in
* any of the standard portlet modes (VIEW, EDIT or HELP)."
*/
- public void createCanModifyNonReadOnlyPreferenceCase(SequenceRegistry registry)
+ public void createCanModifyNonReadOnlyPreferenceCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("CanModifyNonReadOnlyPreference", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
@@ -576,9 +576,9 @@
* deployment descriptor. They can programmatically add preference attributes using
names not defined in the
* deployment descriptor. These preferences attributes must be treated as modifiable
attributes."
*/
- public void
createDynamicPreferenceTreatedLikeModifiablePreferenceCase(SequenceRegistry registry)
+ public void
createDynamicPreferenceTreatedLikeModifiablePreferenceCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("DynamicPreferenceTreatedLikeModifiablePreference",
seq);
seq.addAction(0, UTP4.RENDER_JOINPOINT, new PortletRenderTestAction()
@@ -687,9 +687,9 @@
* @portlet.specification assert="SPEC:101 - If a portlet definition includes a
validator, the portlet container must
* create a single validator instance per portlet definition. (according to spec:
Testable=false ;)"
*/
- public void createCreateASingleInstanceOfValidatorCase(SequenceRegistry registry)
+ public void createCreateASingleInstanceOfValidatorCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("CreateASingleInstanceOfValidator", seq);
seq.addAction(0, UTP6.RENDER_JOINPOINT, new PortletRenderTestAction()
{
@@ -708,9 +708,9 @@
* validator before writing the changes to the persistent store."
* @portlet.specification assert="SPEC:105 - If the validation is successful, the
store operation must be completed"
*/
- public void createValidationStoresCase(SequenceRegistry registry)
+ public void createValidationStoresCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("ValidationStores", seq);
seq.addAction(0, UTP8.RENDER_JOINPOINT, new PortletRenderTestAction()
@@ -788,9 +788,9 @@
* throw a ValidatorException. If a ValidatorException is thrown, the portlet
container must cancel the store
* operation and it must propagate the exception to the portlet"
*/
- public void createInvalidationCancelsStoreCase(SequenceRegistry registry)
+ public void createInvalidationCancelsStoreCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("InvalidationCancelsStore", seq);
seq.addAction(0, UTP7.RENDER_JOINPOINT, new PortletRenderTestAction()
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/windowstates/WindowStatesSequenceBuilder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/windowstates/WindowStatesSequenceBuilder.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/windowstates/WindowStatesSequenceBuilder.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -26,9 +26,9 @@
import org.jboss.portal.common.test.driver.response.FailureResponse;
import org.jboss.portal.test.framework.driver.http.response.InvokeGetResponse;
import org.jboss.portal.common.test.driver.DriverResponse;
-import org.jboss.portal.test.framework.portlet.Sequence;
-import org.jboss.portal.test.framework.portlet.SequenceRegistry;
-import org.jboss.portal.test.framework.portlet.SequenceRegistryBuilder;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestDriver;
+import org.jboss.portal.test.framework.portlet.PortletTestSuite;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
@@ -45,16 +45,16 @@
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw
Dawidowicz</a>
* @version $Revision$
*/
-public class WindowStatesSequenceBuilder extends SequenceRegistryBuilder
+public class WindowStatesSequenceBuilder extends PortletTestSuite
{
/**
* @portlet.specification assert="SPEC:40 - If a custom window state defined in
the deployment descriptor is not
* mapped to a custom window state provided by the portal, portlets must not be
invoked in that window state."
*/
- public void _createCustomStateNotMappedNotInvokedCase(SequenceRegistry registry)
+ public void _createCustomStateNotMappedNotInvokedCase(PortletTestDriver registry)
{
- Sequence seq = new Sequence();
+ PortletTest seq = new PortletTest();
registry.addSequence("CustomStateNotMappedNotInvoked", seq);
seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
{
Modified:
trunk/portlet-server/src/main/org/jboss/portal/portlet/test/PortletController.java
===================================================================
---
trunk/portlet-server/src/main/org/jboss/portal/portlet/test/PortletController.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/portlet-server/src/main/org/jboss/portal/portlet/test/PortletController.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -123,6 +123,9 @@
public void handle(ServerInvocation invocation) throws ServerException
{
+
+// PortletTestDriver.getInstance().
+
try
{
String requestPath = invocation.getServerContext().getPortalRequestPath();
Modified: trunk/portlet-server/src/resources/test-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/portlet-server/src/resources/test-sar/META-INF/jboss-service.xml 2007-03-19
18:10:54 UTC (rev 6751)
+++ trunk/portlet-server/src/resources/test-sar/META-INF/jboss-service.xml 2007-03-19
18:12:24 UTC (rev 6752)
@@ -46,7 +46,7 @@
<!-- -->
<mbean
- code="org.jboss.portal.test.framework.portlet.PortletTestDriver"
+ code="org.jboss.portal.test.framework.portlet.TestDriverRegistryAccess"
name="portal:service=PortletTestDriver"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
Modified:
trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestContext.java
===================================================================
---
trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestContext.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestContext.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -25,6 +25,7 @@
import org.jboss.portal.test.framework.server.NodeId;
import org.jboss.portal.test.framework.agent.TestAgent;
import org.jboss.portal.common.test.driver.DriverResponse;
+import org.jboss.portal.common.test.TestParametrization;
import org.jboss.deployment.DeploymentException;
import java.io.Serializable;
@@ -87,6 +88,9 @@
/** The test agent, normally only valid in the server side for now. */
private TestAgent testAgent;
+ /** The test parametrization. */
+ private TestParametrization parametrization;
+
/**
* Copy constructor.
*/
@@ -98,13 +102,19 @@
this.response = that.response;
}
- public HttpTestContext(String testName, int requestCount, String archivePath)
+ public HttpTestContext(String testName, int requestCount, String archivePath,
TestParametrization parametrization)
{
this.testName = testName;
this.requestCount = requestCount;
this.archivePath = archivePath;
+ this.parametrization = parametrization;
}
+ public TestParametrization getParametrization()
+ {
+ return parametrization;
+ }
+
public String getArchivePath()
{
return archivePath;
Modified:
trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverClient.java
===================================================================
---
trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverClient.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverClient.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -39,6 +39,7 @@
import org.jboss.portal.common.test.driver.response.ErrorResponse;
import org.jboss.portal.common.test.driver.response.FailureResponse;
import org.jboss.portal.common.test.info.TestItemInfo;
+import org.jboss.portal.common.test.TestParametrization;
import org.jboss.portal.common.http.HttpHeader;
import org.jboss.portal.common.http.HttpHeaders;
import org.jboss.portal.common.http.HttpRequest;
@@ -181,6 +182,9 @@
/** The request count for that session. */
int requestCount;
+ /** The test parametrization. */
+ TestParametrization parametrization;
+
public TestConversation(String testId, Node node)
{
this.testId = testId;
@@ -339,6 +343,7 @@
else if (cmd instanceof StartTestCommand)
{
requestCount = -1;
+ parametrization = ((StartTestCommand)cmd).getParametrization();
pushContext();
DriverResponse response = getServer(node).invoke(testId, cmd);
requestCount = 0;
@@ -456,8 +461,7 @@
private void pushContext()
{
- HttpTestContext ctx = new HttpTestContext(testId, requestCount, archivePath);
-
+ HttpTestContext ctx = new HttpTestContext(testId, requestCount, archivePath,
parametrization);
log.info("# Updating test case context of : " + node + " : "
+ ctx);
HttpTestDriver agent = getServer(node);
agent.pushContext(testId, ctx);
Modified:
trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverServer.java
===================================================================
---
trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverServer.java 2007-03-19
18:10:54 UTC (rev 6751)
+++
trunk/test/src/main/org/jboss/portal/test/framework/driver/http/HttpTestDriverServer.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -61,7 +61,7 @@
HttpTestDriver httpDriver = (HttpTestDriver)driver;
TestItemInfo item = _container.findItem(testId);
String newId = item.getId(httpDriver.getInfo());
- HttpTestContext ctx2 = new HttpTestContext(newId, ctx.getRequestCount(),
ctx.getArchivePath());
+ HttpTestContext ctx2 = new HttpTestContext(newId, ctx.getRequestCount(),
ctx.getArchivePath(), ctx.getParametrization());
ctx2.setTestAgent(getAgent());
httpDriver.pushContext(newId, ctx2);
}
Modified: trunk/test/src/main/org/jboss/portal/test/framework/runner/BaseRunner.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/runner/BaseRunner.java 2007-03-19
18:10:54 UTC (rev 6751)
+++ trunk/test/src/main/org/jboss/portal/test/framework/runner/BaseRunner.java 2007-03-19
18:12:24 UTC (rev 6752)
@@ -29,6 +29,7 @@
import org.jboss.portal.test.framework.ServiceLookup;
import org.jboss.portal.test.framework.driver.http.HttpTestDriverClient;
import org.jboss.portal.common.test.junit.JUnitAdapter;
+import org.jboss.portal.common.test.TestParametrization;
import org.apache.log4j.Logger;
import org.apache.log4j.Appender;
import org.apache.log4j.SimpleLayout;
@@ -175,16 +176,18 @@
{
startContext();
- //
+ // Create driver
HttpTestDriverClient driver = new HttpTestDriverClient();
driver.setInitialNodeId(nodeIds[0]);
driver.setArchivePath(archivePath);
driver.setNodeManager(nodeManager);
driver.setServerLookup(httpTestDriverServerLookup);
+ // Get optional parametrization
+ TestParametrization parametrization = JUnitAdapter.getParametrization();
+
//
- adapter = new JUnitAdapter(driver);
-
+ adapter = new JUnitAdapter(driver, parametrization);
state = STARTED;
}
finally