JBoss Portal SVN: r8846 - in branches/JBoss_Portal_Branch_2_6/wsrp: src/main/org/jboss/portal/test/wsrp/consumer and 2 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-11-08 00:12:27 -0500 (Thu, 08 Nov 2007)
New Revision: 8846
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/build.xml
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/consumer/ProducerInfoTestCase.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java
branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml
Log:
- JBPORTAL-1783: Return "sane" values when possible when optional WSRP services are not available.
- JBPORTAL-1786: Cleaned-up Producer service definition to use portal:service=PortletInvoker,type=Producer for its PortletInvoker instead of defining a new one.
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-11-08 04:49:10 UTC (rev 8845)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-11-08 05:12:27 UTC (rev 8846)
@@ -158,7 +158,7 @@
<pathelement path="${jboss.deploy.lib.dir}/jbosssx.jar"/>
<pathelement path="${jboss.deploy.lib.dir}/jboss-transaction.jar"/>
<path refid="jboss.serialization.classpath"/>
- <path refid="jboss.remoting.classpath"/>
+ <path refid="jboss.remoting.classpath"/>
</path>
<!-- Configure modules -->
@@ -182,8 +182,8 @@
<property name="build.gen.classes" value="${build.gen}/generated"/>
<property name="jboss.endorsed.dir" location="${jboss.home}/lib/endorsed"/>
-
+
<path id="aop.classpath">
<!-- not directly available in AS -->
<pathelement path="${jbossas/core.libs.lib}/jboss-aspect-library.jar"/>
@@ -207,12 +207,12 @@
<property name="javadoc.private" value="true"/>
<property name="javadoc.protected" value="false"/>
- <property name="log.dir" value="${module.output}/logs"/>
+ <property name="log.dir" value="${module.output}/logs"/>
<property name="reports.dir" value="${module.output}/reports"/>
<property name="test.reports" value="${module.output}/tests"/>
<property name="build.resources.test" value="${build.resources}/tests"/>
<property name="build.lib.test" value="${build.lib}/tests"/>
- </target>
+ </target>
<target name="configure-jbossaop">
<path id="jbossaop.task.classpath">
@@ -228,15 +228,15 @@
classpathref="jbossaop.task.classpath"/>
</target>
- <target name="configure-explode">
+ <target name="configure-explode">
<path id="explode.task.classpath">
- <pathelement location="${project.tools}/lib/explode.jar"/>
- <path refid="apache.ant.classpath"/>
+ <pathelement location="${project.tools}/lib/explode.jar"/>
+ <path refid="apache.ant.classpath"/>
</path>
<taskdef name="explode"
classname="org.jboss.portal.common.ant.Explode"
classpathref="explode.task.classpath"/>
- </target>
+ </target>
<!--+====================================================================+-->
<!--| Compile |-->
@@ -282,7 +282,7 @@
</aopc>
<property name="compile.disable" value="true"/>
- </target>
+ </target>
<!--+====================================================================+-->
<!--| Generate Output |-->
@@ -317,11 +317,11 @@
<ant inheritAll="false" antfile="../core-wsrp/build.xml" output="output.log" dir="../core-wsrp" target="output">
<property name="build.lib" value="${build.lib}"/>
<property name="build.resources" value="${build.resources}"/>
- </ant>
+ </ant>
<copy todir="${build.resources}/portal-wsrp-sar" overwrite="true">
<fileset dir="${build.lib}" includes="portal-wsrp-client.jar"/>
<fileset dir="${build.lib}" includes="portal-wsrp.war"/>
- </copy>
+ </copy>
<copy todir="${build.resources}/portal-wsrp-sar" overwrite="true">
<fileset dir="${build.lib}" includes="portal-wsrp-lib.jar"/>
@@ -423,32 +423,32 @@
<target name="package-deployment-test" description="Generates the deployment test artifacts" depends="compile">
<jar jarfile="${build.lib.test}/test-deployment-lib.jar">
- <fileset dir="${build.resources.test}/test-deployment-lib-jar"/>
- <fileset dir="${build.classes}/">
- <include name="org/jboss/portal/test/wsrp/deployment/**"/>
- <include name="org/jboss/portal/test/wsrp/framework/support/**"/>
- </fileset>
+ <fileset dir="${build.resources.test}/test-deployment-lib-jar"/>
+ <fileset dir="${build.classes}/">
+ <include name="org/jboss/portal/test/wsrp/deployment/**"/>
+ <include name="org/jboss/portal/test/wsrp/framework/support/**"/>
+ </fileset>
</jar>
</target>
<target name="package-producer-configuration-test"
description="Generates the producer configuration test artifacts" depends="compile">
<jar jarfile="${build.lib.test}/test-producer-configuration-lib.jar">
- <fileset dir="${build.resources.test}/test-producer-configuration-lib-jar"/>
- <fileset dir="${source.resources}/portal-wsrp-sar/dtd"/>
- <fileset dir="${build.classes}/">
- <include name="org/jboss/portal/test/wsrp/config/**"/>
- </fileset>
+ <fileset dir="${build.resources.test}/test-producer-configuration-lib-jar"/>
+ <fileset dir="${source.resources}/portal-wsrp-sar/dtd"/>
+ <fileset dir="${build.classes}/">
+ <include name="org/jboss/portal/test/wsrp/config/**"/>
+ </fileset>
</jar>
</target>
<target name="package-other-test" description="Generates the other test artifacts" depends="compile">
<jar jarfile="${build.lib.test}/test-other-lib.jar">
- <fileset dir="${build.classes}/">
- <include name="org/jboss/portal/test/wsrp/framework/**"/>
- <include name="org/jboss/portal/test/wsrp/other/*.class"/>
- <include name="org/jboss/portal/test/wsrp/handler/*.class"/>
- </fileset>
+ <fileset dir="${build.classes}/">
+ <include name="org/jboss/portal/test/wsrp/framework/**"/>
+ <include name="org/jboss/portal/test/wsrp/other/*.class"/>
+ <include name="org/jboss/portal/test/wsrp/handler/*.class"/>
+ </fileset>
</jar>
</target>
@@ -526,7 +526,7 @@
<jar jarfile="${build.lib.test}/test-wsrp-consumer-portletmanagement.sar">
<fileset dir="${build.resources.test}/test-wsrp-consumer-portletmanagement-sar" includes="**/*"/>
</jar>
- </target>
+ </target>
<!-- Producer tests -->
<target name="package-protocolv1-producer-test" description="Generate the producer test artifacts"
@@ -547,7 +547,7 @@
<!-- WS related -->
<jar jarfile="${build.lib.test}/test-wsrp-producer.war">
<fileset dir="${build.resources.test}/test-wsrp-producer-war"/>
- </jar>
+ </jar>
<copy todir="${build.resources.test}/test-wsrp-producer-sar" overwrite="true">
<fileset dir="${build.lib.test}" includes="test-wsrp-producer.war"/>
@@ -592,7 +592,7 @@
</target>
<!-- Test portlets -->
- <target name="package-test-portlets" description="Generate the test portlets archives" depends="compile">
+ <target name="package-test-portlets" description="Generate the test portlets archives" depends="compile">
<!-- Simple test portlet -->
<package-test-portlet archiveName="basic" portletName="Basic"/>
@@ -709,21 +709,21 @@
</zest>
</x-test>
<x-sysproperty>
-<!--
- <jvmarg value="-Xdebug"/>
- <jvmarg value="-Xnoagent"/>
- <jvmarg value="-Djava.compiler=NONE"/>
- <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8787"/>
--->
+ <!--
+ <jvmarg value="-Xdebug"/>
+ <jvmarg value="-Xnoagent"/>
+ <jvmarg value="-Djava.compiler=NONE"/>
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8787"/>
+ -->
<sysproperty key="test.root" value="${build.lib}/tests"/>
</x-sysproperty>
<x-classpath>
<fileset dir="${build.lib.test}" includes="test-wsrp-producer-lib.jar"/>
- <path refid="tests.classpath"/>
+ <path refid="tests.classpath"/>
</x-classpath>
</execute-tests>
<antcall target="undeploy-producer-test"/>
- </target>
+ </target>
<!--WSRP v1 Protocol Consumer implementation tests-->
<target name="protocolv1-consumer-test" depends="deploy-consumer-test">
@@ -749,12 +749,12 @@
</zest>
</x-test>
<x-sysproperty>
-<!--
- <jvmarg value="-Xdebug"/>
- <jvmarg value="-Xnoagent"/>
- <jvmarg value="-Djava.compiler=NONE"/>
- <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8787"/>
--->
+ <!--
+ <jvmarg value="-Xdebug"/>
+ <jvmarg value="-Xnoagent"/>
+ <jvmarg value="-Djava.compiler=NONE"/>
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8787"/>
+ -->
<sysproperty key="test.root" value="${build.lib}/tests"/>
</x-sysproperty>
<x-classpath>
@@ -901,7 +901,7 @@
</execute-tests>
</target>
- <target name="reports">
+ <target name="reports">
<junitreport todir="${reports.dir}">
<fileset dir="${test.reports}">
<include name="TEST-*.xml"/>
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/consumer/ProducerInfoTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/consumer/ProducerInfoTestCase.java 2007-11-08 04:49:10 UTC (rev 8845)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/consumer/ProducerInfoTestCase.java 2007-11-08 05:12:27 UTC (rev 8846)
@@ -119,10 +119,14 @@
behavior.addPortletDescription(behavior.createPortletDescription("test", null));
serviceFactory.getRegistry().setServiceDescriptionBehavior(behavior);
+ // activate caching for this test so that we can simulate portlet deployment on the producer with a cached SD
+ info.setExpirationCacheSeconds(1000);
+
PortletContext portletContext = PortletContext.createPortletContext("test");
Portlet portlet = info.getPortlet(portletContext);
assertNotNull(portlet);
assertEquals(portletContext, portlet.getContext());
+ assertEquals(1, behavior.getCallCount());
// test2 is not in the service description, so it should be looked up via Portlet Management...
portletContext = PortletContext.createPortletContext("test2");
@@ -133,6 +137,16 @@
assertEquals(1, pmBehavior.getCallCount());
assertNotNull(portlet);
assertEquals(portletContext, portlet.getContext());
+
+ // try again, this time without a portlet management interface, the service description should be refreshed
+ serviceFactory.getRegistry().setPortletManagementBehavior(null);
+ // simulate a new portlet deployment since last time the SD was refreshed
+ behavior.addPortletDescription(behavior.createPortletDescription("test3", null));
+ portletContext = PortletContext.createPortletContext("test3");
+ portlet = info.getPortlet(portletContext);
+ assertEquals(2, behavior.getCallCount());
+ assertNotNull(portlet);
+ assertEquals(portletContext, portlet.getContext());
}
public void testRefreshAndRegistration() throws Exception
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2007-11-08 04:49:10 UTC (rev 8845)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2007-11-08 05:12:27 UTC (rev 8846)
@@ -35,6 +35,7 @@
import org.jboss.portal.wsrp.consumer.portlet.WSRPPortlet;
import org.jboss.portal.wsrp.consumer.portlet.info.WSRPPortletInfo;
import org.jboss.portal.wsrp.core.CookieProtocol;
+import org.jboss.portal.wsrp.core.Fault;
import org.jboss.portal.wsrp.core.GetPortletDescription;
import org.jboss.portal.wsrp.core.GetPortletPropertyDescription;
import org.jboss.portal.wsrp.core.GetServiceDescription;
@@ -445,22 +446,9 @@
// check if we need to refresh
boolean justRefreshed = refresh(false);
- Portlet portlet = null;
// First try caches if caches are still valid or we just refreshed
- if (justRefreshed || (useCache() && !isCacheExpired()))
- {
- log.debug("Trying cached POPs");
+ Portlet portlet = getPortletFromCaches(portletHandle, justRefreshed);
- portlet = (Portlet)popsMap.get(portletHandle);
-
- if (portlet == null && ccpsMap != null)
- {
- log.debug("Trying cached CCPs");
- portlet = (Portlet)ccpsMap.get(portletHandle);
- }
- }
-
-
if (portlet != null) // we had a match in cache, return it
{
log.debug("Portlet was cached");
@@ -468,7 +456,7 @@
}
else // otherwise, retrieve just the information for the appropriate portlet
{
- log.debug("Retrieving portlet via getPortletDescription");
+ log.debug("Trying to retrieve portlet via getPortletDescription");
GetPortletDescription gpd = WSRPTypeFactory.createGetPortletDescription(getRegistrationContext(), portletContext);
gpd.setUserContext(UserAccess.getUserContext());
@@ -494,11 +482,43 @@
}
catch (Exception e)
{
- throw new InvokerUnavailableException("Couldn't access remote producer '" + persistentId + "'", e);
+ log.debug("Couldn't get portlet via getPortletDescription for producer '" + persistentId
+ + "'. Attempting to retrieve it from the service description as this producer might not support the PortletManagement interface.", e);
+
+ justRefreshed = refresh(true);
+ portlet = getPortletFromCaches(portletHandle, justRefreshed);
+
+ if (portlet == null)
+ {
+ throw new NoSuchPortletException(portletHandle);
+ }
+ else
+ {
+ return portlet;
+ }
}
}
}
+ private Portlet getPortletFromCaches(String portletHandle, boolean justRefreshed)
+ {
+ Portlet portlet = null;
+
+ if (justRefreshed || (useCache() && !isCacheExpired()))
+ {
+ log.debug("Trying cached POPs");
+
+ portlet = (Portlet)popsMap.get(portletHandle);
+
+ if (portlet == null && ccpsMap != null)
+ {
+ log.debug("Trying cached CCPs");
+ portlet = (Portlet)ccpsMap.get(portletHandle);
+ }
+ }
+ return portlet;
+ }
+
public Map getPortletGroupMap() throws PortletInvokerException
{
refresh(false);
@@ -654,8 +674,10 @@
}
catch (Exception e)
{
+ // if we receive an exception that we cannot handle, since the support for PortletManagement is optional,
+ // just return null as if the portlet had no properties
log.debug("Couldn't get property descriptions for portlet '" + portletHandle + "'", e);
- throw new RuntimeException(e);
+ return null;
}
}
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java 2007-11-08 04:49:10 UTC (rev 8845)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java 2007-11-08 05:12:27 UTC (rev 8846)
@@ -318,7 +318,9 @@
}
catch (Exception e)
{
- throw new PortletInvokerException("Couldn't get properties for portlet '" + portletContext.getId() + "'", e);
+ // something went wrong but support for getPortletProperties is optional so return an empty PropertyMap
+ log.debug("Couldn't get properties for portlet '" + portletContext.getId() + "'", e);
+ return new SimplePropertyMap();
}
}
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml 2007-11-08 04:49:10 UTC (rev 8845)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml 2007-11-08 05:12:27 UTC (rev 8846)
@@ -23,53 +23,6 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<server>
- <!-- Producer interceptor stack -->
- <mbean
- code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
- name="portal:service=InterceptorStackFactory,type=WSRP"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends-list optional-attribute-name="InterceptorNames">
- <depends-list-element>portal:service=Interceptor,type=Portlet,name=ContextDispatcher</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Portlet,name=WindowStates</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Portlet,name=Modes</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Portlet,name=ProducerCache</depends-list-element>
- </depends-list>
- </mbean>
-
- <!-- The producer portlet invoker -->
- <mbean
- code="org.jboss.portal.portlet.state.producer.ProducerPortletInvoker"
- name="portal:service=PortletInvoker,type=WSRPProducer"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="PortletInvoker"
- proxy-type="attribute">portal:service=WSRPPortletInvoker,type=Container</depends>
- <depends
- optional-attribute-name="PersistenceManager"
- proxy-type="attribute">portal:service=PersistenceManager,type=Producer</depends>
- <depends
- optional-attribute-name="StateManagementPolicy"
- proxy-type="attribute">portal:service=StateManagementPolicy,type=Producer</depends>
- <depends
- optional-attribute-name="StateConverter"
- proxy-type="attribute">portal:service=StateConverter,type=Producer</depends>
- </mbean>
-
- <!-- The portlet container invoker -->
- <mbean
- code="org.jboss.portal.portlet.container.PortletContainerInvoker"
- name="portal:service=WSRPPortletInvoker,type=Container"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends optional-attribute-name="StackFactory" proxy-type="attribute">portal:service=InterceptorStackFactory,type=WSRP</depends>
- <depends optional-attribute-name="Registry" proxy-type="attribute">portal:service=WebAppRegistry</depends>
- </mbean>
-
<!-- WSRP Producer implementation -->
<mbean
code="org.jboss.portal.wsrp.producer.WSRPProducerImpl"
@@ -77,10 +30,14 @@
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <depends optional-attribute-name="Invoker"
- proxy-type="attribute">portal:service=PortletInvoker,type=WSRPProducer</depends>
- <depends optional-attribute-name="RegistrationManager" proxy-type="attribute">portal.wsrp:service=RegistrationManager,type=Producer</depends>
- <depends optional-attribute-name="ProducerConfigurationService" proxy-type="attribute">portal.wsrp:service=ProducerConfiguration</depends>
+ <depends optional-attribute-name="Invoker" proxy-type="attribute">portal:service=PortletInvoker,type=Producer
+ </depends>
+ <depends optional-attribute-name="RegistrationManager" proxy-type="attribute">
+ portal.wsrp:service=RegistrationManager,type=Producer
+ </depends>
+ <depends optional-attribute-name="ProducerConfigurationService" proxy-type="attribute">
+ portal.wsrp:service=ProducerConfiguration
+ </depends>
</mbean>
<!-- Registration manager -->
@@ -88,7 +45,9 @@
name="portal.wsrp:service=RegistrationManager,type=Producer" xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <depends optional-attribute-name="PersistenceManager" proxy-type="attribute">portal.wsrp:service=PersistenceManager</depends>
+ <depends optional-attribute-name="PersistenceManager" proxy-type="attribute">
+ portal.wsrp:service=PersistenceManager
+ </depends>
</mbean>
<!-- Persistence manager for registrations -->
@@ -105,7 +64,7 @@
name="portal.wsrp:service=ProducerConfiguration" xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <attribute name="ConfigLocation">conf/producer/config.xml</attribute>
+ <attribute name="ConfigLocation">conf/producer/config.xml</attribute>
</mbean>
<mbean
@@ -117,9 +76,11 @@
<attribute name="DTDMapping">
<properties>
<entry
- key="-//JBoss Portal//DTD WSRP Remote Producer Configuration 2.6//EN">dtd/jboss-wsrp-consumer_2_6.dtd</entry>
+ key="-//JBoss Portal//DTD WSRP Remote Producer Configuration 2.6//EN">dtd/jboss-wsrp-consumer_2_6.dtd
+ </entry>
<entry
- key="-//JBoss Portal//DTD WSRP Local Producer Configuration 2.6//EN">dtd/jboss-wsrp-producer_2_6.dtd</entry>
+ key="-//JBoss Portal//DTD WSRP Local Producer Configuration 2.6//EN">dtd/jboss-wsrp-producer_2_6.dtd
+ </entry>
</properties>
</attribute>
</mbean>
@@ -129,9 +90,11 @@
<attribute name="DefaultWSRPLocation">default-wsrp.xml</attribute>
<depends>jboss.system:service=MainDeployer</depends>
<depends optional-attribute-name="ConsumerRegistry"
- proxy-type="attribute">portal.wsrp:service=ConsumerRegistry</depends>
+ proxy-type="attribute">portal.wsrp:service=ConsumerRegistry
+ </depends>
<depends optional-attribute-name="EntityResolver"
- proxy-type="attribute">portal.wsrp:service=EntityResolver</depends>
+ proxy-type="attribute">portal.wsrp:service=EntityResolver
+ </depends>
</mbean>
<mbean
@@ -156,8 +119,12 @@
<xmbean/>
<depends>portal:service=Hibernate,type=WSRPConsumer</depends>
<attribute name="SessionFactoryJNDIName">java:/portal/WSRPConsumerSessionFactory</attribute>
- <depends optional-attribute-name="FederatingPortletInvoker" proxy-type="attribute">portal:service=PortletInvoker,type=Federating</depends>
- <depends optional-attribute-name="PortalEventListenerRegistry" proxy-type="attribute">portal:service=ListenerRegistry</depends>
- </mbean>
+ <depends optional-attribute-name="FederatingPortletInvoker" proxy-type="attribute">
+ portal:service=PortletInvoker,type=Federating
+ </depends>
+ <depends optional-attribute-name="PortalEventListenerRegistry" proxy-type="attribute">
+ portal:service=ListenerRegistry
+ </depends>
+ </mbean>
</server>
18 years, 6 months
JBoss Portal SVN: r8845 - in branches/JBoss_Portal_Branch_2_6: core-samples/src/resources/portal-basic-samples-war/WEB-INF and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-11-07 23:49:10 -0500 (Wed, 07 Nov 2007)
New Revision: 8845
Modified:
branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/web.xml
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic-samples-war/WEB-INF/web.xml
Log:
- Conform to DTD.
Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/web.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/web.xml 2007-11-07 22:24:50 UTC (rev 8844)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/web.xml 2007-11-08 04:49:10 UTC (rev 8845)
@@ -36,6 +36,11 @@
<servlet-class>org.jboss.portal.core.cms.servlet.CMSExportServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
+ <servlet>
+ <servlet-name>ApprovePublishServlet</servlet-name>
+ <servlet-class>org.jboss.portal.cms.workflow.ApprovePublishServlet</servlet-class>
+ </servlet>
+
<servlet-mapping>
<servlet-name>CMSPreviewServlet</servlet-name>
<url-pattern>/cmspreview/*</url-pattern>
@@ -44,11 +49,6 @@
<servlet-name>CMSExportServlet</servlet-name>
<url-pattern>/cmsexport/*</url-pattern>
</servlet-mapping>
-
- <servlet>
- <servlet-name>ApprovePublishServlet</servlet-name>
- <servlet-class>org.jboss.portal.cms.workflow.ApprovePublishServlet</servlet-class>
- </servlet>
<servlet-mapping>
<servlet-name>ApprovePublishServlet</servlet-name>
<url-pattern>/approve/*</url-pattern>
Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic-samples-war/WEB-INF/web.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic-samples-war/WEB-INF/web.xml 2007-11-07 22:24:50 UTC (rev 8844)
+++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic-samples-war/WEB-INF/web.xml 2007-11-08 04:49:10 UTC (rev 8845)
@@ -22,13 +22,9 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<!DOCTYPE web-app PUBLIC
- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
- <listener>
- <listener-class> org.jboss.portal.portlet.session.SessionListener </listener-class>
- </listener>
<context-param>
<param-name>org.jboss.portal.content_type</param-name>
<param-value>filesystem</param-value>
@@ -38,6 +34,9 @@
<param-value>FSContentDrivenPortletInstance</param-value>
</context-param>
<listener>
+ <listener-class>org.jboss.portal.portlet.session.SessionListener</listener-class>
+ </listener>
+ <listener>
<listener-class>org.jboss.portlet.content.ContentTypeRegistration</listener-class>
</listener>
</web-app>
18 years, 6 months
JBoss Portal SVN: r8844 - modules/test/trunk/build.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-11-07 17:24:50 -0500 (Wed, 07 Nov 2007)
New Revision: 8844
Added:
modules/test/trunk/build/pom.xml
Log:
forgot to commit a build pom
Added: modules/test/trunk/build/pom.xml
===================================================================
--- modules/test/trunk/build/pom.xml (rev 0)
+++ modules/test/trunk/build/pom.xml 2007-11-07 22:24:50 UTC (rev 8844)
@@ -0,0 +1,368 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ This pom functions as a default configuration. The subproject
+ poms each inherit configuration from this one.
+
+ When adding version information for an artifact please do the following
+ - add a version property for the specific version
+ - add a dependency in the dependencyManagement section which refers to
+ the property
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-parent</artifactId>
+ <version>3</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.portal.test</groupId>
+ <artifactId>jboss-portal-modules-test</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>JBoss Portal Test Module</name>
+ <url>http://www.jboss.com/products/jbossmc</url>
+ <description>JBoss Portal Test Module</description>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/portal/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/portal/trunk</developerConnection>
+ <url>https://svn.jboss.org/repos/portal/trunk</url>
+ </scm>
+
+ <licenses>
+ <license>
+ <name>LGPL 2.1</name>
+ <url>http://www.gnu.org/licenses/lgpl.html</url>
+ <distribution>repo</distribution>
+ <comments>
+ GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
+ </comments>
+ </license>
+ </licenses>
+
+ <issueManagement>
+ <system>JIRA</system>
+ <url>http://jira.jboss.com/jira/browse/JBPORTAL</url>
+ </issueManagement>
+ <ciManagement>
+ <system>cruisecontrol</system>
+ </ciManagement>
+
+
+ <properties>
+ <version.portal.common>1.1.0-SNAPSHOT</version.portal.common>
+ <version.jboss.microcontainer>2.0.0.Beta4</version.jboss.microcontainer>
+ <version.apache.httpclient>3.0.1</version.apache.httpclient>
+ <version.cargo>0.9-portal</version.cargo>
+ <version.sun.opends>1.0.0-BUILD04</version.sun.opends>
+ <version.jboss.hibernate>3.2.3.GA</version.jboss.hibernate>
+ <version.dom4j>1.6.1</version.dom4j>
+ <version.jboss.jbossas.core-libs>4.0.4.GA</version.jboss.jbossas.core-libs>
+ <version.jboss.remoting>2.2.1.GA</version.jboss.remoting>
+ <version.ant>1.6.5</version.ant>
+ <version.maven>2.0.6</version.maven>
+ <version.junit>3.8.1</version.junit>
+ </properties>
+
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <showDeprecation>true</showDeprecation>
+ <showWarnings>true</showWarnings>
+ <optimize>true</optimize>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jboss-deploy-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jboss-deploy</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-idea-plugin</artifactId>
+ <configuration>
+ <downloadSources>true</downloadSources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+
+ <repositories>
+ <repository>
+ <id>repository.maven.org</id>
+ <name>Maven Repository</name>
+ <layout>default</layout>
+ <url>http://repo1.maven.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <layout>default</layout>
+ <url>http://repository.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshots Repository</name>
+ <layout>default</layout>
+ <url>http://snapshots.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>repository.maven.org</id>
+ <name>Maven Repository</name>
+ <layout>default</layout>
+ <url>http://repo1.maven.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ <pluginRepository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <layout>default</layout>
+ <url>http://repository.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ <pluginRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshots Repository</name>
+ <layout>default</layout>
+ <url>http://snapshots.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </pluginRepository>
+ <pluginRepository>
+ <id>Codehaus Snapshots</id>
+ <url>http://snapshots.repository.codehaus.org/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-changes-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <version>2.0</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jxr-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <configuration>
+ <linkXref>true</linkXref>
+ <targetJdk>1.5</targetJdk>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+
+
+ <dependencyManagement>
+ <!-- The parent pom manages the inter-dependencies of the modules. -->
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.portal.test</groupId>
+ <artifactId>jboss-unit</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.test</groupId>
+ <artifactId>portal-test</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.test</groupId>
+ <artifactId>portal-test-jboss</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.test</groupId>
+ <artifactId>jboss-unit-tooling</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.jboss.portal.common</groupId>
+ <artifactId>jboss-portal-modules-common</artifactId>
+ <version>${version.portal.common}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ <version>${version.jboss.microcontainer}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>apache-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>${version.apache.httpclient}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>cargo</groupId>
+ <artifactId>core</artifactId>
+ <version>${version.cargo}</version>
+ </dependency>
+ <dependency>
+ <groupId>sun-opends</groupId>
+ <artifactId>opends-core</artifactId>
+ <version>${version.sun.opends}</version>
+ </dependency>
+ <dependency>
+ <groupId>hibernate</groupId>
+ <artifactId>hibernate3</artifactId>
+ <version>${version.jboss.hibernate}</version>
+ </dependency>
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ <version>${version.dom4j}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss.jbossas.core-libs</groupId>
+ <artifactId>jboss-transaction</artifactId>
+ <version>${version.jboss.jbossas.core-libs}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss.jbossas.core-libs</groupId>
+ <artifactId>jnpserver</artifactId>
+ <version>${version.jboss.jbossas.core-libs}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss.jbossas.core-libs</groupId>
+ <artifactId>jboss-jca</artifactId>
+ <version>${version.jboss.jbossas.core-libs}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss.jbossas.core-libs</groupId>
+ <artifactId>jboss-local-jdbc</artifactId>
+ <version>${version.jboss.jbossas.core-libs}</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss.jbossas.core-libs</groupId>
+ <artifactId>jboss</artifactId>
+ <version>${version.jboss.jbossas.core-libs}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-remoting</artifactId>
+ <version>${version.jboss.remoting}</version>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-junit</artifactId>
+ <version>${version.ant}</version>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>${version.ant}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>${version.maven}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ <version>${version.maven}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
+ <version>${version.maven}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>${version.maven}</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${version.junit}</version>
+ </dependency>
+
+ </dependencies>
+ </dependencyManagement>
+
+</project>
18 years, 6 months
JBoss Portal SVN: r8843 - in modules/portlet/trunk/portlet: src/main/org/jboss/portal/test/framework/portlet and 27 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-11-07 15:12:31 -0500 (Wed, 07 Nov 2007)
New Revision: 8843
Added:
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/TestModifyExistingAttributeWithoutExplicitSetDoesNotReplicateTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/TestReplicateImmutableValueTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/TestReplicateMutableValueTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractActionInvalidatesTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractCacheMarkupTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractDisableDuringRenderTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/NavigationalStateConfigurator.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/DispatchingFilterTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/FiltersTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/GetRequestURITestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/RequestHeaderAccessTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ActionInvalidatesExpiringCacheTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/DisableDuringRenderExpiringCacheTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheWithPortletModeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheWithRenderParametersTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheWithWindowStateTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/ActionInvalidatesNeverExpiringCacheTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/DisableDuringRenderNeverExpiringCacheTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheWithPortletModeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheWithRenderParametersTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheWithWindowStateTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/AbstractNoCacheTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/ExplicitNoCacheTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/ImplicitNoCacheTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/GetResourceBundleDuringInitTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/ResourceBundleCascadeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/ResourceBundleTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/TestActionWithPortletModeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/TestDuringActionTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/TestDuringRenderTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/ActionRequestUseFormTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/ActionRequestUseInputStreamTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/ActionRequestUseReaderTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/RequestAttributeScopingTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/RequestAttributeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/RequestHeaderAccessTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/RequestParameterTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletresponses/ContentTypeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/IsReadOnlyTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/MapTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/StoreMustPersistAllChangesTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/CrossContextSessionAttributeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/ObtainNonNullSessionUsingCreateEqualsFalseTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/SessionDoesNotExistBeforeItIsRequestedTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/misc/log4j/TestLog4jTestCase.java
Removed:
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/basictests/
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/SessionSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/SessionTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractCacheSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/DispatcherSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/NoCacheSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/PortletConfigSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/PortletModeSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/PortletRequestsSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletresponses/PortletResponsesSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/PreferencesSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/SessionSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/misc/log4j/Log4jSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletconfig/PortletConfigSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/PortletContextSequenceBuilder.java
Modified:
modules/portlet/trunk/portlet/build.xml
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/EncodeURLTestCase.java
modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/dispatcher-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/expiringcache-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/neverexpiringcache-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/nocache-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/portletconfig-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/portletmode-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/portletrequests-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/portletresponses-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/preferences-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/session-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/misc/log4j-war/WEB-INF/web.xml
Log:
- migrated the rest of the test cases
Modified: modules/portlet/trunk/portlet/build.xml
===================================================================
--- modules/portlet/trunk/portlet/build.xml 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/build.xml 2007-11-07 20:12:31 UTC (rev 8843)
@@ -257,7 +257,6 @@
<!-- JSR 168 test case packaging -->
<package-tck-test test="portletinterface"/>
<package-tck-test test="dispatcher"/>
- <package-tck-test test="basic"/>
<package-tck-test test="portletrequests"/>
<package-tck-test test="portletmode"/>
<package-tck-test test="portletconfig"/>
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/SessionSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/SessionSequenceBuilder.java 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/SessionSequenceBuilder.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -1,162 +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.portlet.ha.session;
-
-import org.jboss.portal.common.util.Tools;
-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;
-import org.jboss.portal.test.framework.server.NodeId;
-import org.jboss.unit.driver.response.EndTestResponse;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.Portlet;
-import javax.portlet.PortletException;
-import javax.portlet.PortletSecurityException;
-import javax.portlet.PortletSession;
-import javax.portlet.PortletURL;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import java.io.IOException;
-import java.util.Collections;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 7954 $
- */
-public class SessionSequenceBuilder extends PortletTestSuite
-{
- public void createTestReplicateImmutableValue(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("TestReplicateImmutableValue", seq);
- seq.addAction(0, NodeId.PORTS_01, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletException, PortletSecurityException, IOException
- {
- assertNull(request.getPortletSession(false));
- PortletSession session = request.getPortletSession();
- assertNotNull(session);
- session.setAttribute("immutable", "abcdef");
- PortletURL portletURL = response.createRenderURL();
- String url = context.rewriteURLForNode(portletURL.toString(), NodeId.PORTS_02);
- return new InvokeGetResponse(url);
- }
- });
- seq.addAction(1, NodeId.PORTS_02, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletSession session = request.getPortletSession();
- assertNotNull(session);
- assertEquals("abcdef", session.getAttribute("immutable"));
- return new EndTestResponse();
- }
- });
- }
-
- public void createTestReplicateMutableValue(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("TestReplicateMutableValue", seq);
- seq.addAction(0, NodeId.PORTS_01, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException
- {
- assertNull(request.getPortletSession(false));
- PortletSession session = request.getPortletSession();
- assertNotNull(session);
- MutableValue value = new MutableValue("abcdef");
- session.setAttribute("mutable", value);
- value.setString("fedcba");
- PortletURL portletURL = response.createRenderURL();
- String url = context.rewriteURLForNode(portletURL.toString(), NodeId.PORTS_02);
- return new InvokeGetResponse(url);
- }
- });
- seq.addAction(1, NodeId.PORTS_02, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletSession session = request.getPortletSession();
- assertNotNull(session);
- assertEquals(new MutableValue("fedcba"), session.getAttribute("mutable"));
- return new EndTestResponse();
- }
- });
- }
-
- public void createTestModifyExistingAttributeWithoutExplicitSetDoesNotReplicate(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("TestModifyExistingAttributeWithoutExplicitSetDoesNotReplicate", seq);
- seq.addAction(0, NodeId.PORTS_01, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException
- {
- assertNull(request.getPortletSession(false));
- PortletSession session = request.getPortletSession();
- assertNotNull(session);
- assertEquals(Collections.EMPTY_LIST, Tools.toList(session.getAttributeNames()));
- MutableValue value = new MutableValue("abcdef");
- session.setAttribute("mutable", value);
- PortletURL portletURL = response.createRenderURL();
- String url = portletURL.toString();
- return new InvokeGetResponse(url);
- }
- });
- seq.addAction(1, NodeId.PORTS_01, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException
- {
- PortletSession session = request.getPortletSession();
- assertEquals(Collections.singletonList("mutable"), Tools.toList(session.getAttributeNames()));
- Object o = session.getAttribute("mutable");
- assertNotNull(o);
- assertEquals(MutableValue.class, o.getClass());
- MutableValue value = (MutableValue)o;
- value.setString("fedcba");
- PortletURL portletURL = response.createRenderURL();
- String url = context.rewriteURLForNode(portletURL.toString(), NodeId.PORTS_02);
- return new InvokeGetResponse(url);
- }
- });
- seq.addAction(2, NodeId.PORTS_02, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletSession session = request.getPortletSession();
- assertNotNull(session);
- assertEquals(Collections.singletonList("mutable"), Tools.toList(session.getAttributeNames()));
- assertEquals(new MutableValue("abcdef"), session.getAttribute("mutable"));
- return new EndTestResponse();
- }
- });
- }
-}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/SessionTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/SessionTestCase.java 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/SessionTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -1,38 +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.portlet.ha.session;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class SessionTestCase // extends HTTPTestRunner
-{
- public SessionTestCase()
- {
-// super(new NodeId[]{NodeId.PORTS_01,NodeId.PORTS_02});
-
- //
-// init("test-ha-session.war");
- }
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/TestModifyExistingAttributeWithoutExplicitSetDoesNotReplicateTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/TestModifyExistingAttributeWithoutExplicitSetDoesNotReplicateTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/TestModifyExistingAttributeWithoutExplicitSetDoesNotReplicateTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,99 @@
+/******************************************************************************
+ * 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.portlet.ha.session;
+
+import org.jboss.portal.unit.annotations.TestCase;
+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.server.NodeId;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.common.util.Tools;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNull;
+import static org.jboss.unit.api.Assert.assertNotNull;
+import static org.jboss.unit.api.Assert.assertEquals;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletSession;
+import javax.portlet.PortletURL;
+import java.io.IOException;
+import java.util.Collections;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class TestModifyExistingAttributeWithoutExplicitSetDoesNotReplicateTestCase
+{
+ public TestModifyExistingAttributeWithoutExplicitSetDoesNotReplicateTestCase(PortletTest seq)
+ {
+ seq.addAction(0, NodeId.PORTS_01, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException
+ {
+ assertNull(request.getPortletSession(false));
+ PortletSession session = request.getPortletSession();
+ assertNotNull(session);
+ assertEquals(Collections.EMPTY_LIST, Tools.toList(session.getAttributeNames()));
+ MutableValue value = new MutableValue("abcdef");
+ session.setAttribute("mutable", value);
+ PortletURL portletURL = response.createRenderURL();
+ String url = portletURL.toString();
+ return new InvokeGetResponse(url);
+ }
+ });
+ seq.addAction(1, NodeId.PORTS_01, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException
+ {
+ PortletSession session = request.getPortletSession();
+ assertEquals(Collections.singletonList("mutable"), Tools.toList(session.getAttributeNames()));
+ Object o = session.getAttribute("mutable");
+ assertNotNull(o);
+ assertEquals(MutableValue.class, o.getClass());
+ MutableValue value = (MutableValue)o;
+ value.setString("fedcba");
+ PortletURL portletURL = response.createRenderURL();
+ String url = context.rewriteURLForNode(portletURL.toString(), NodeId.PORTS_02);
+ return new InvokeGetResponse(url);
+ }
+ });
+ seq.addAction(2, NodeId.PORTS_02, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletSession session = request.getPortletSession();
+ assertNotNull(session);
+ assertEquals(Collections.singletonList("mutable"), Tools.toList(session.getAttributeNames()));
+ assertEquals(new MutableValue("abcdef"), session.getAttribute("mutable"));
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/TestReplicateImmutableValueTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/TestReplicateImmutableValueTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/TestReplicateImmutableValueTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,80 @@
+/******************************************************************************
+ * 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.portlet.ha.session;
+
+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.server.NodeId;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNull;
+import static org.jboss.unit.api.Assert.assertNotNull;
+import static org.jboss.unit.api.Assert.assertEquals;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletSecurityException;
+import javax.portlet.PortletSession;
+import javax.portlet.PortletURL;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class TestReplicateImmutableValueTestCase
+{
+ public TestReplicateImmutableValueTestCase(PortletTest seq)
+ {
+ seq.addAction(0, NodeId.PORTS_01, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletException, PortletSecurityException, IOException
+ {
+ assertNull(request.getPortletSession(false));
+ PortletSession session = request.getPortletSession();
+ assertNotNull(session);
+ session.setAttribute("immutable", "abcdef");
+ PortletURL portletURL = response.createRenderURL();
+ String url = context.rewriteURLForNode(portletURL.toString(), NodeId.PORTS_02);
+ return new InvokeGetResponse(url);
+ }
+ });
+ seq.addAction(1, NodeId.PORTS_02, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletSession session = request.getPortletSession();
+ assertNotNull(session);
+ assertEquals("abcdef", session.getAttribute("immutable"));
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/TestReplicateMutableValueTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/TestReplicateMutableValueTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/ha/session/TestReplicateMutableValueTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,80 @@
+/******************************************************************************
+ * 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.portlet.ha.session;
+
+import org.jboss.portal.unit.annotations.TestCase;
+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.server.NodeId;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNull;
+import static org.jboss.unit.api.Assert.assertNotNull;
+import static org.jboss.unit.api.Assert.assertEquals;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletSession;
+import javax.portlet.PortletURL;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class TestReplicateMutableValueTestCase
+{
+ public TestReplicateMutableValueTestCase(PortletTest seq)
+ {
+ seq.addAction(0, NodeId.PORTS_01, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException
+ {
+ assertNull(request.getPortletSession(false));
+ PortletSession session = request.getPortletSession();
+ assertNotNull(session);
+ MutableValue value = new MutableValue("abcdef");
+ session.setAttribute("mutable", value);
+ value.setString("fedcba");
+ PortletURL portletURL = response.createRenderURL();
+ String url = context.rewriteURLForNode(portletURL.toString(), NodeId.PORTS_02);
+ return new InvokeGetResponse(url);
+ }
+ });
+ seq.addAction(1, NodeId.PORTS_02, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletSession session = request.getPortletSession();
+ assertNotNull(session);
+ assertEquals(new MutableValue("fedcba"), session.getAttribute("mutable"));
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/EncodeURLTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/EncodeURLTestCase.java 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/EncodeURLTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -43,7 +43,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-@TestCase({})
+@TestCase
public class EncodeURLTestCase
{
public EncodeURLTestCase(PortletTest seq)
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractActionInvalidatesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractActionInvalidatesTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractActionInvalidatesTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,121 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.common;
+
+import org.jboss.portal.test.framework.portlet.Joinpoint;
+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;
+import org.jboss.portal.common.util.CollectionBuilder;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import java.util.Set;
+import java.util.HashSet;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class AbstractActionInvalidatesTestCase
+{
+
+ final Set calls = new HashSet();
+ String url;
+
+
+ public AbstractActionInvalidatesTestCase(
+ PortletTest seq,
+ Joinpoint p1renderjp,
+ Joinpoint p1actionjp,
+ Joinpoint p2renderjp)
+ {
+ //
+ seq.addAction(0, p1renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Content is not cached
+ calls.add("0");
+
+ // Refresh
+ url = response.createActionURL().toString();
+ return new InvokeGetResponse(response.createRenderURL().toString());
+ }
+ });
+
+ //
+ seq.addAction(1, p1renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Should no be called
+ calls.add("1");
+ return null;
+ }
+ });
+ seq.addAction(1, p2renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Invalidate
+ return new InvokeGetResponse(url);
+ }
+ });
+
+ //
+ seq.addAction(2, p1actionjp, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ //
+ calls.add("2_action");
+ }
+ });
+ seq.addAction(2, p1renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Content is not cached
+ calls.add("2_render");
+
+ //
+ Set expected = new CollectionBuilder().add("0").add("2_action").add("2_render").toHashSet();
+ assertEquals(expected, calls);
+
+ // End test
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractCacheMarkupTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractCacheMarkupTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractCacheMarkupTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,196 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.common;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.Joinpoint;
+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;
+import org.jboss.portal.common.util.CollectionBuilder;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletURL;
+import javax.portlet.PortletMode;
+import javax.portlet.WindowState;
+import java.util.Set;
+import java.util.HashSet;
+import java.io.IOException;
+
+/**
+ * Calling render on the portlet with different render parameters invalidates the cache.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class AbstractCacheMarkupTestCase
+{
+
+ final Set calls = new HashSet();
+ String url;
+
+ public AbstractCacheMarkupTestCase(
+ PortletTest seq,
+ Joinpoint p1renderjp,
+ Joinpoint p1actionjp,
+ Joinpoint p2renderjp,
+ final NavigationalStateConfigurator configurator)
+ {
+ //
+ seq.addAction(0, p1renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Content is not cached
+ calls.add("0");
+
+ // Create invalidating action url for later use
+ url = response.createActionURL().toString();
+
+ // Refresh
+ return new InvokeGetResponse(response.createRenderURL().toString());
+ }
+ });
+
+ //
+ seq.addAction(1, p1renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Should not be called
+ calls.add("1");
+ return null;
+ }
+ });
+ seq.addAction(1, p2renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Invalidate with action
+ return new InvokeGetResponse(url);
+ }
+ });
+
+ //
+ seq.addAction(2, p1actionjp, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ calls.add("2_action");
+ }
+ });
+ seq.addAction(2, p1renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Should be called
+ calls.add("2_render");
+
+ // Refresh with different URL
+ PortletURL url = configurator.createPortletURL(response);
+ return new InvokeGetResponse(url.toString());
+ }
+ });
+
+ //
+ seq.addAction(3, p1renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Should be called
+ calls.add("3");
+
+ // Invoke with same different URL
+ PortletURL url = configurator.createPortletURL(response);
+ return new InvokeGetResponse(url.toString());
+ }
+ });
+
+ //
+ seq.addAction(4, p1renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Should not be called
+ calls.add("4");
+ return null;
+ }
+ });
+ seq.addAction(4, p2renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Invalidate with action
+ return new InvokeGetResponse(url);
+ }
+ });
+
+ //
+ seq.addAction(5, p1actionjp, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ calls.add("5_action");
+
+ // Configure the navitional state
+ configurator.configureNavigationalState(response);
+ }
+ });
+ seq.addAction(5, p1renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Should be called
+ calls.add("5_render");
+
+ // Refresh with different navigational state to check it will be called in the next render phase
+ PortletURL url = response.createRenderURL();
+ url.setPortletMode(PortletMode.VIEW);
+ url.setWindowState(WindowState.NORMAL);
+ return new InvokeGetResponse(url.toString());
+ }
+ });
+
+ //
+ seq.addAction(6, p1renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ Set expected = new CollectionBuilder().add("0").add("2_action").add("2_render").add("3").add("5_action").add("5_render").toHashSet();
+ assertEquals(expected, calls);
+
+ // Refresh
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractCacheSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractCacheSequenceBuilder.java 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractCacheSequenceBuilder.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -1,394 +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.portlet.jsr168.ext.common;
-
-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.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;
-import org.jboss.portal.common.util.CollectionBuilder;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.PortletURL;
-import javax.portlet.RenderResponse;
-import javax.portlet.ActionResponse;
-import javax.portlet.Portlet;
-import javax.portlet.RenderRequest;
-import javax.portlet.PortletException;
-import javax.portlet.ActionRequest;
-import javax.portlet.WindowState;
-import javax.portlet.WindowStateException;
-import javax.portlet.PortletMode;
-import javax.portlet.PortletModeException;
-import java.util.Set;
-import java.util.HashSet;
-import java.io.IOException;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class AbstractCacheSequenceBuilder extends PortletTestSuite
-{
-
- protected final AbstractCacheSequenceBuilder.NavigationalStateConfigurator renderParameterConfigurator = new AbstractCacheSequenceBuilder.NavigationalStateConfigurator()
- {
- public PortletURL createPortletURL(RenderResponse resp)
- {
- PortletURL url = resp.createRenderURL();
- url.setParameter("abc", "def");
- return url;
- }
- public void configureNavigationalState(ActionResponse resp)
- {
- resp.setRenderParameter("abc", "fed");
- }
- };
-
- protected final AbstractCacheSequenceBuilder.NavigationalStateConfigurator windowStateConfigurator = new AbstractCacheSequenceBuilder.NavigationalStateConfigurator()
- {
- public PortletURL createPortletURL(RenderResponse resp) throws WindowStateException
- {
- PortletURL url = resp.createRenderURL();
- url.setWindowState(WindowState.MAXIMIZED);
- return url;
- }
- public void configureNavigationalState(ActionResponse resp) throws WindowStateException
- {
- resp.setWindowState(WindowState.MAXIMIZED);
- }
- };
-
- protected final AbstractCacheSequenceBuilder.NavigationalStateConfigurator portletModeConfigurator = new AbstractCacheSequenceBuilder.NavigationalStateConfigurator()
- {
- public PortletURL createPortletURL(RenderResponse resp) throws PortletModeException
- {
- PortletURL url = resp.createRenderURL();
- url.setPortletMode(PortletMode.EDIT);
- return url;
- }
- public void configureNavigationalState(ActionResponse resp) throws PortletModeException
- {
- resp.setPortletMode(PortletMode.EDIT);
- }
- };
-
- /**
- * Overriding the expiration cache to 0 disable the cache on a render or an action/render.
- */
- protected void createDisableDuringRender(String testName, PortletTestDriver registry, Joinpoint renderjp, Joinpoint actionjp)
- {
- final Set calls = new HashSet();
- PortletTest seq = new PortletTest();
- registry.addSequence(testName, seq);
-
- //
- seq.addAction(0, renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- //
- calls.add("0");
- response.setProperty(RenderResponse.EXPIRATION_CACHE, "0");
-
- // Refresh
- String url = response.createRenderURL().toString();
- return new InvokeGetResponse(url);
- }
- });
-
- //
- seq.addAction(1, renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- //
- calls.add("1");
- response.setProperty(RenderResponse.EXPIRATION_CACHE, "0");
-
- // Refresh
- String url = response.createActionURL().toString();
- return new InvokeGetResponse(url);
- }
- });
-
- //
- seq.addAction(2, actionjp, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
- {
- //
- calls.add("2_action");
- }
- });
- seq.addAction(2, renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Content is not cached
- calls.add("2_render");
-
- //
- Set expected = new CollectionBuilder().add("0").add("1").add("2_action").add("2_render").toHashSet();
- assertEquals(expected, calls);
-
- // End test
- return new EndTestResponse();
- }
- });
- }
-
- protected interface NavigationalStateConfigurator
- {
- PortletURL createPortletURL(RenderResponse resp) throws PortletException;
- void configureNavigationalState(ActionResponse resp) throws PortletException;
- }
-
- /**
- * Calling render on the portlet with different render parameters invalidates the cache
- */
- protected void createCacheMarkup(
- String testName,
- PortletTestDriver registry,
- Joinpoint p1renderjp,
- Joinpoint p1actionjp,
- Joinpoint p2renderjp,
- final AbstractCacheSequenceBuilder.NavigationalStateConfigurator configurator)
- {
- final Set calls = new HashSet();
- final String[] url = new String[1];
- PortletTest seq = new PortletTest();
- registry.addSequence(testName, seq);
-
- //
- seq.addAction(0, p1renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Content is not cached
- calls.add("0");
-
- // Create invalidating action url for later use
- url[0] = response.createActionURL().toString();
-
- // Refresh
- return new InvokeGetResponse(response.createRenderURL().toString());
- }
- });
-
- //
- seq.addAction(1, p1renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Should not be called
- calls.add("1");
- return null;
- }
- });
- seq.addAction(1, p2renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Invalidate with action
- return new InvokeGetResponse(url[0]);
- }
- });
-
- //
- seq.addAction(2, p1actionjp, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
- {
- calls.add("2_action");
- }
- });
- seq.addAction(2, p1renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Should be called
- calls.add("2_render");
-
- // Refresh with different URL
- PortletURL url = configurator.createPortletURL(response);
- return new InvokeGetResponse(url.toString());
- }
- });
-
- //
- seq.addAction(3, p1renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Should be called
- calls.add("3");
-
- // Invoke with same different URL
- PortletURL url = configurator.createPortletURL(response);
- return new InvokeGetResponse(url.toString());
- }
- });
-
- //
- seq.addAction(4, p1renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Should not be called
- calls.add("4");
- return null;
- }
- });
- seq.addAction(4, p2renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Invalidate with action
- return new InvokeGetResponse(url[0]);
- }
- });
-
- //
- seq.addAction(5, p1actionjp, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
- {
- calls.add("5_action");
-
- // Configure the navitional state
- configurator.configureNavigationalState(response);
- }
- });
- seq.addAction(5, p1renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Should be called
- calls.add("5_render");
-
- // Refresh with different navigational state to check it will be called in the next render phase
- PortletURL url = response.createRenderURL();
- url.setPortletMode(PortletMode.VIEW);
- url.setWindowState(WindowState.NORMAL);
- return new InvokeGetResponse(url.toString());
- }
- });
-
- //
- seq.addAction(6, p1renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- Set expected = new CollectionBuilder().add("0").add("2_action").add("2_render").add("3").add("5_action").add("5_render").toHashSet();
- assertEquals(expected, calls);
-
- // Refresh
- return new EndTestResponse();
- }
- });
- }
-
- /**
- * Calling action on the portlet invalidates the cache.
- */
- protected void createActionInvalidates(
- String testName,
- PortletTestDriver registry,
- Joinpoint p1renderjp,
- Joinpoint p1actionjp,
- Joinpoint p2renderjp)
- {
- final Set calls = new HashSet();
- final String[] url = new String[1];
- PortletTest seq = new PortletTest();
- registry.addSequence(testName, seq);
-
- //
- seq.addAction(0, p1renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Content is not cached
- calls.add("0");
-
- // Refresh
- url[0] = response.createActionURL().toString();
- return new InvokeGetResponse(response.createRenderURL().toString());
- }
- });
-
- //
- seq.addAction(1, p1renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Should no be called
- calls.add("1");
- return null;
- }
- });
- seq.addAction(1, p2renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Invalidate
- return new InvokeGetResponse(url[0]);
- }
- });
-
- //
- seq.addAction(2, p1actionjp, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
- {
- //
- calls.add("2_action");
- }
- });
- seq.addAction(2, p1renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Content is not cached
- calls.add("2_render");
-
- //
- Set expected = new CollectionBuilder().add("0").add("2_action").add("2_render").toHashSet();
- assertEquals(expected, calls);
-
- // End test
- return new EndTestResponse();
- }
- });
- }
-
-
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractDisableDuringRenderTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractDisableDuringRenderTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/AbstractDisableDuringRenderTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,113 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.common;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.Joinpoint;
+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;
+import org.jboss.portal.common.util.CollectionBuilder;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import java.io.IOException;
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * Overriding the expiration cache to 0 disable the cache on a render or an action/render.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class AbstractDisableDuringRenderTestCase
+{
+
+ final Set calls = new HashSet();
+
+ public AbstractDisableDuringRenderTestCase(PortletTest seq, Joinpoint renderjp, Joinpoint actionjp)
+ {
+ seq.addAction(0, renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ //
+ calls.add("0");
+ response.setProperty(RenderResponse.EXPIRATION_CACHE, "0");
+
+ // Refresh
+ String url = response.createRenderURL().toString();
+ return new InvokeGetResponse(url);
+ }
+ });
+
+ //
+ seq.addAction(1, renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ //
+ calls.add("1");
+ response.setProperty(RenderResponse.EXPIRATION_CACHE, "0");
+
+ // Refresh
+ String url = response.createActionURL().toString();
+ return new InvokeGetResponse(url);
+ }
+ });
+
+ //
+ seq.addAction(2, actionjp, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ //
+ calls.add("2_action");
+ }
+ });
+ seq.addAction(2, renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Content is not cached
+ calls.add("2_render");
+
+ //
+ Set expected = new CollectionBuilder().add("0").add("1").add("2_action").add("2_render").toHashSet();
+ assertEquals(expected, calls);
+
+ // End test
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/NavigationalStateConfigurator.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/NavigationalStateConfigurator.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/common/NavigationalStateConfigurator.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,86 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.common;
+
+import javax.portlet.PortletURL;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletModeException;
+import javax.portlet.PortletMode;
+import javax.portlet.WindowStateException;
+import javax.portlet.WindowState;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface NavigationalStateConfigurator
+{
+
+ PortletURL createPortletURL(RenderResponse resp) throws PortletException;
+
+ void configureNavigationalState(ActionResponse resp) throws PortletException;
+
+ public static final NavigationalStateConfigurator PORTLET_MODE_CONFIGURATOR = new NavigationalStateConfigurator()
+ {
+ public PortletURL createPortletURL(RenderResponse resp) throws PortletModeException
+ {
+ PortletURL url = resp.createRenderURL();
+ url.setPortletMode(PortletMode.EDIT);
+ return url;
+ }
+ public void configureNavigationalState(ActionResponse resp) throws PortletModeException
+ {
+ resp.setPortletMode(PortletMode.EDIT);
+ }
+ };
+
+ public static final NavigationalStateConfigurator RENDER_PARAMETER_CONFIGURATOR = new NavigationalStateConfigurator()
+ {
+ public PortletURL createPortletURL(RenderResponse resp)
+ {
+ PortletURL url = resp.createRenderURL();
+ url.setParameter("abc", "def");
+ return url;
+ }
+ public void configureNavigationalState(ActionResponse resp)
+ {
+ resp.setRenderParameter("abc", "fed");
+ }
+ };
+
+ public static final NavigationalStateConfigurator WINDOW_STATE_CONFIGURATOR = new NavigationalStateConfigurator()
+ {
+ public PortletURL createPortletURL(RenderResponse resp) throws WindowStateException
+ {
+ PortletURL url = resp.createRenderURL();
+ url.setWindowState(WindowState.MAXIMIZED);
+ return url;
+ }
+ public void configureNavigationalState(ActionResponse resp) throws WindowStateException
+ {
+ resp.setWindowState(WindowState.MAXIMIZED);
+ }
+ };
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/DispatcherSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/DispatcherSequenceBuilder.java 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/DispatcherSequenceBuilder.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -1,200 +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.portlet.jsr168.ext.dispatcher;
-
-import org.jboss.portal.common.util.Tools;
-import org.jboss.portal.common.util.CollectionBuilder;
-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;
-import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
-import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.test.portlet.framework.UTP2;
-import org.jboss.portal.test.portlet.framework.UTP3;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.Portlet;
-import javax.portlet.PortletException;
-import javax.portlet.PortletRequestDispatcher;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.servlet.Servlet;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Set;
-import java.util.Collections;
-
-/**
- * Tests for request dispatching from a portlet to a servlet.
- *
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-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(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("GetRequestURI", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getRequestDispatcher("/universalServletA");
- response.setContentType("text/html");
- dispatcher.include(request, response);
- return null;
- }
- });
-
-
- seq.addAction(0, UTS1.SERVICE_JOINPOINT, new ServletServiceTestAction()
- {
- protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
- {
- assertEquals(org.jboss.portal.test.portlet.jsr168.ext.dispatcher.DispatcherSequenceBuilder.SERVLET_A_URI, request.getRequestURI());
- return new EndTestResponse();
- }
- });
- }
-
- /** Show that we can access request headers from the portlet request properties. */
- public void createRequestHeaderAccess(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("RequestHeaderAccess", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- // Test the value is not there yet
- Set propertyNames = Tools.toSet(request.getPropertyNames());
- assertFalse(propertyNames.contains("myheader"));
- assertNull(request.getProperty("myheader"));
- assertFalse(request.getProperties("myheader").hasMoreElements());
-
- // Invoke render with header
- InvokeGetResponse render = new InvokeGetResponse(response.createRenderURL().toString());
- render.addHeader("myheader").addElement("render-value");
- return render;
- }
- });
-
- seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getRequestDispatcher("/universalServletA");
- response.setContentType("text/html");
- dispatcher.include(request, response);
- return null;
- }
- });
-
- seq.addAction(1, UTS1.SERVICE_JOINPOINT, new ServletServiceTestAction()
- {
- protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context)
- {
- // Test the header is here
- Set headerNames = Tools.toSet(request.getHeaderNames());
- assertTrue(headerNames.contains("myheader"));
- assertEquals("render-value", request.getHeader("myheader"));
- Enumeration values = request.getHeaders("myheader");
- assertTrue(values.hasMoreElements());
- assertEquals("render-value", values.nextElement());
- assertFalse(values.hasMoreElements());
- return new EndTestResponse();
- }
- });
- }
-
- public void createFilters(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Filters", seq);
- seq.addAction(0, UTP2.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- PortletRequestDispatcher prd = request.getPortletSession().getPortletContext().getRequestDispatcher("/noop");
- assertNotNull(prd);
- ServletFilter.ids.clear();
- prd.include(request, response);
- assertEquals(new CollectionBuilder().add("INCLUDE_URL_PATTERN_FILTER").add("INCLUDE_NAMED_FILTER").toHashSet(), ServletFilter.ids);
-
- //
- prd = request.getPortletSession().getPortletContext().getNamedDispatcher("NoopServlet");
- assertNotNull(prd);
- ServletFilter.ids.clear();
- prd.include(request, response);
- assertEquals(Collections.singleton("INCLUDE_NAMED_FILTER"), ServletFilter.ids);
-
- //
- return new EndTestResponse();
- }
- });
- }
-
- public void createDispatchingFilter(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("DispatchingFilter", seq);
- seq.addAction(0, UTP3.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
-
- // Need to set content type as we will include a JSP that will produce output
- response.setContentType("text/html");
-
- //
- PortletRequestDispatcher prd = request.getPortletSession().getPortletContext().getNamedDispatcher("TargetForIncludeNamedDispatchingFilter");
- assertNotNull(prd);
- prd.include(request, response);
-
- //
- prd = request.getPortletSession().getPortletContext().getRequestDispatcher("/TargetForIncludeURLPatternDispatchingFilter");
- assertNotNull(prd);
- prd.include(request, response);
-
- //
- return new EndTestResponse();
- }
- });
- }
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/DispatchingFilterTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/DispatchingFilterTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/DispatchingFilterTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,73 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.dispatcher;
+
+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.portlet.framework.UTP3;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNotNull;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class DispatchingFilterTestCase
+{
+ public DispatchingFilterTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP3.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+
+ // Need to set content type as we will include a JSP that will produce output
+ response.setContentType("text/html");
+
+ //
+ PortletRequestDispatcher prd = request.getPortletSession().getPortletContext().getNamedDispatcher("TargetForIncludeNamedDispatchingFilter");
+ assertNotNull(prd);
+ prd.include(request, response);
+
+ //
+ prd = request.getPortletSession().getPortletContext().getRequestDispatcher("/TargetForIncludeURLPatternDispatchingFilter");
+ assertNotNull(prd);
+ prd.include(request, response);
+
+ //
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/FiltersTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/FiltersTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/FiltersTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,75 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.dispatcher;
+
+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.portlet.framework.UTP2;
+import org.jboss.portal.common.util.CollectionBuilder;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNotNull;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import java.io.IOException;
+import java.util.Collections;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class FiltersTestCase
+{
+ public FiltersTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP2.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ PortletRequestDispatcher prd = request.getPortletSession().getPortletContext().getRequestDispatcher("/noop");
+ assertNotNull(prd);
+ ServletFilter.ids.clear();
+ prd.include(request, response);
+ assertEquals(new CollectionBuilder().add("INCLUDE_URL_PATTERN_FILTER").add("INCLUDE_NAMED_FILTER").toHashSet(), ServletFilter.ids);
+
+ //
+ prd = request.getPortletSession().getPortletContext().getNamedDispatcher("NoopServlet");
+ assertNotNull(prd);
+ ServletFilter.ids.clear();
+ prd.include(request, response);
+ assertEquals(Collections.singleton("INCLUDE_NAMED_FILTER"), ServletFilter.ids);
+
+ //
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/GetRequestURITestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/GetRequestURITestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/GetRequestURITestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,81 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.dispatcher;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestContext;
+import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
+import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
+import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.test.portlet.framework.UTS1;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class GetRequestURITestCase
+{
+
+ public static final String SERVLET_A_URI = "/test-jsr168-ext-dispatcher/universalServletA";
+
+ public GetRequestURITestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getRequestDispatcher("/universalServletA");
+ response.setContentType("text/html");
+ dispatcher.include(request, response);
+ return null;
+ }
+ });
+
+
+ seq.addAction(0, UTS1.SERVICE_JOINPOINT, new ServletServiceTestAction()
+ {
+ protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
+ {
+ assertEquals(SERVLET_A_URI, request.getRequestURI());
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/RequestHeaderAccessTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/RequestHeaderAccessTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/dispatcher/RequestHeaderAccessTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,107 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.dispatcher;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestContext;
+import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
+import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
+import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.test.portlet.framework.UTS1;
+import org.jboss.portal.common.util.Tools;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertFalse;
+import static org.jboss.unit.api.Assert.assertNull;
+import static org.jboss.unit.api.Assert.assertTrue;
+import static org.jboss.unit.api.Assert.assertEquals;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequestDispatcher;
+import javax.servlet.Servlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Set;
+import java.util.Enumeration;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class RequestHeaderAccessTestCase
+{
+ public RequestHeaderAccessTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ // Test the value is not there yet
+ Set propertyNames = Tools.toSet(request.getPropertyNames());
+ assertFalse(propertyNames.contains("myheader"));
+ assertNull(request.getProperty("myheader"));
+ assertFalse(request.getProperties("myheader").hasMoreElements());
+
+ // Invoke render with header
+ InvokeGetResponse render = new InvokeGetResponse(response.createRenderURL().toString());
+ render.addHeader("myheader").addElement("render-value");
+ return render;
+ }
+ });
+
+ seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ PortletRequestDispatcher dispatcher = ((AbstractUniversalTestPortlet)portlet).getPortletContext().getRequestDispatcher("/universalServletA");
+ response.setContentType("text/html");
+ dispatcher.include(request, response);
+ return null;
+ }
+ });
+
+ seq.addAction(1, UTS1.SERVICE_JOINPOINT, new ServletServiceTestAction()
+ {
+ protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context)
+ {
+ // Test the header is here
+ Set headerNames = Tools.toSet(request.getHeaderNames());
+ assertTrue(headerNames.contains("myheader"));
+ assertEquals("render-value", request.getHeader("myheader"));
+ Enumeration values = request.getHeaders("myheader");
+ assertTrue(values.hasMoreElements());
+ assertEquals("render-value", values.nextElement());
+ assertFalse(values.hasMoreElements());
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ActionInvalidatesExpiringCacheTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ActionInvalidatesExpiringCacheTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ActionInvalidatesExpiringCacheTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -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.portlet.jsr168.ext.expiringcache;
+
+import org.jboss.portal.test.portlet.jsr168.ext.common.AbstractActionInvalidatesTestCase;
+import org.jboss.portal.test.portlet.framework.UTP2;
+import org.jboss.portal.test.portlet.framework.UTP3;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.unit.annotations.TestCase;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class ActionInvalidatesExpiringCacheTestCase extends AbstractActionInvalidatesTestCase
+{
+ public ActionInvalidatesExpiringCacheTestCase(PortletTest seq)
+ {
+ super(seq, UTP2.RENDER_JOINPOINT, UTP2.ACTION_JOINPOINT, UTP3.RENDER_JOINPOINT);
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/DisableDuringRenderExpiringCacheTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/DisableDuringRenderExpiringCacheTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/DisableDuringRenderExpiringCacheTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,41 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.expiringcache;
+
+import org.jboss.portal.test.portlet.jsr168.ext.common.AbstractDisableDuringRenderTestCase;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.unit.annotations.TestCase;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class DisableDuringRenderExpiringCacheTestCase extends AbstractDisableDuringRenderTestCase
+{
+ public DisableDuringRenderExpiringCacheTestCase(PortletTest seq)
+ {
+ super(seq, UTP1.RENDER_JOINPOINT, UTP1.ACTION_JOINPOINT);
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheSequenceBuilder.java 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheSequenceBuilder.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -1,269 +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.portlet.jsr168.ext.expiringcache;
-
-import org.jboss.portal.test.framework.portlet.PortletTestDriver;
-import org.jboss.portal.test.framework.portlet.PortletTestContext;
-import org.jboss.portal.test.framework.portlet.PortletTest;
-import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
-import org.jboss.portal.test.portlet.framework.UTP1;
-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.test.portlet.framework.UTP6;
-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.portlet.framework.UTP10;
-import org.jboss.portal.test.portlet.framework.UTP11;
-import org.jboss.portal.test.portlet.jsr168.ext.common.AbstractCacheSequenceBuilder;
-import org.jboss.portal.common.util.CollectionBuilder;
-import org.jboss.portal.portlet.invocation.response.ErrorResponse;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.FailureResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
-
-import static org.jboss.unit.api.Assert.*;
-import org.jboss.unit.Failure;
-
-import javax.portlet.Portlet;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.portlet.PortletException;
-import javax.portlet.PortletURL;
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class ExpiringCacheSequenceBuilder extends AbstractCacheSequenceBuilder
-{
-
- public void createDisableDuringRenderExpiringCache(PortletTestDriver registry)
- {
- createDisableDuringRender("DisableDuringRenderExpiringCache", registry, UTP1.RENDER_JOINPOINT, UTP1.ACTION_JOINPOINT);
- }
-
- public void createActionInvalidatesExpiringCache(PortletTestDriver registry)
- {
- createActionInvalidates("ActionInvalidatesExpiringCache", registry, UTP2.RENDER_JOINPOINT, UTP2.ACTION_JOINPOINT, UTP3.RENDER_JOINPOINT);
- }
-
- public void createExpiringCacheWithRenderParameters(PortletTestDriver registry)
- {
- createCacheMarkup("ExpiringCacheWithRenderParameters", registry, UTP4.RENDER_JOINPOINT, UTP4.ACTION_JOINPOINT, UTP5.RENDER_JOINPOINT, renderParameterConfigurator);
- }
-
- public void createExpiringCacheWithWindowState(PortletTestDriver registry)
- {
- createCacheMarkup("ExpiringCacheWithWindowState", registry, UTP6.RENDER_JOINPOINT, UTP6.ACTION_JOINPOINT, UTP7.RENDER_JOINPOINT, windowStateConfigurator);
- }
-
- public void createExpiringCacheWithPortletMode(PortletTestDriver registry)
- {
- createCacheMarkup("ExpiringCacheWithPortletMode", registry, UTP8.RENDER_JOINPOINT, UTP8.ACTION_JOINPOINT, UTP9.RENDER_JOINPOINT, portletModeConfigurator);
- }
-
- /**
- * Check that content is cached for at most 5 seconds in various situations.
- */
- public void createExpiringCache(PortletTestDriver registry)
- {
- final Set calls = new HashSet();
- final String[] url = new String[1];
- PortletTest seq = new PortletTest();
- registry.addSequence("ExpiringCache", seq);
-
- //
- seq.addAction(0, UTP10.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Content is not cached
- calls.add("0");
-
- // Refresh
- url[0] = response.createRenderURL().toString();
- return new InvokeGetResponse(url[0]);
- }
- });
-
- //
- seq.addAction(1, UTP10.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Should not be called
- calls.add("1");
- return null;
- }
- });
- seq.addAction(1, UTP11.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Refresh
- return new InvokeGetResponse(url[0]);
- }
- });
-
- //
- seq.addAction(2, UTP10.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Could be called depending on whether the portal
- // decides to invoke UTP2 or UTP3 first
- // so if it's called we need to disable cache otherwise the next
- // render will probably not be called
- response.setProperty(RenderResponse.EXPIRATION_CACHE, "0");
- return null;
- }
- });
- seq.addAction(2, UTP11.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- try
- {
- assertFalse(calls.contains("1"));
-
- // Wait 5 seconds for the cache entry to be invalid
- Thread.sleep(5 * 1000);
-
- // Refresh
- return new InvokeGetResponse(url[0]);
- }
- catch (InterruptedException e)
- {
- return new FailureResponse(Failure.createFailure(e));
- }
- }
- });
-
- //
- seq.addAction(3, UTP10.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Should be called
- calls.add("3");
-
- // Invoke the same but with different render parameter
- PortletURL tmp = response.createRenderURL();
- tmp.setParameter("abc", "def");
- url[0] = tmp.toString();
- return new InvokeGetResponse(url[0]);
- }
- });
-
- //
- seq.addAction(4, UTP10.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Should be called
- calls.add("4");
-
- // Refresh
- return new InvokeGetResponse(url[0]);
- }
- });
-
- //
- seq.addAction(5, UTP10.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Should not be called
- calls.add("5");
- return null;
- }
- });
- seq.addAction(5, UTP11.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Refresh
- return new InvokeGetResponse(url[0]);
- }
- });
-
- //
- seq.addAction(6, UTP10.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Could be called depending on whether the portal
- // decides to invoke UTP2 or UTP3 first
- // so if it's called we need to disable cache otherwise the next
- // render will probably not be called
- response.setProperty(RenderResponse.EXPIRATION_CACHE, "0");
- return null;
- }
- });
- seq.addAction(6, UTP11.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- try
- {
- assertFalse(calls.contains("5"));
-
- // Wait 5 seconds for the cache entry to be invalid
- Thread.sleep(5 * 1000);
-
- // Refresh
- return new InvokeGetResponse(url[0]);
- }
- catch (InterruptedException e)
- {
- return new FailureResponse(Failure.createFailure(e));
- }
- }
- });
-
- //
- seq.addAction(7, UTP10.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Should be called
- calls.add("7");
-
- //
- Set expected = new CollectionBuilder().add("0").add("3").add("4").add("7").toHashSet();
- assertEquals(expected, calls);
-
- // Refresh
- return new EndTestResponse();
- }
- });
- }
-
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,227 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.expiringcache;
+
+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.portlet.framework.UTP10;
+import org.jboss.portal.test.portlet.framework.UTP11;
+import org.jboss.portal.common.util.CollectionBuilder;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.FailureResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+import static org.jboss.unit.api.Assert.*;
+import org.jboss.unit.Failure;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletURL;
+import java.util.Set;
+import java.util.HashSet;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class ExpiringCacheTestCase
+{
+
+ final Set calls = new HashSet();
+ String url;
+
+ public ExpiringCacheTestCase(PortletTest seq)
+ {
+ //
+ seq.addAction(0, UTP10.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Content is not cached
+ calls.add("0");
+
+ // Refresh
+ url = response.createRenderURL().toString();
+ return new InvokeGetResponse(url);
+ }
+ });
+
+ //
+ seq.addAction(1, UTP10.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Should not be called
+ calls.add("1");
+ return null;
+ }
+ });
+ seq.addAction(1, UTP11.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Refresh
+ return new InvokeGetResponse(url);
+ }
+ });
+
+ //
+ seq.addAction(2, UTP10.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Could be called depending on whether the portal
+ // decides to invoke UTP2 or UTP3 first
+ // so if it's called we need to disable cache otherwise the next
+ // render will probably not be called
+ response.setProperty(RenderResponse.EXPIRATION_CACHE, "0");
+ return null;
+ }
+ });
+ seq.addAction(2, UTP11.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ try
+ {
+ assertFalse(calls.contains("1"));
+
+ // Wait 5 seconds for the cache entry to be invalid
+ Thread.sleep(5 * 1000);
+
+ // Refresh
+ return new InvokeGetResponse(url);
+ }
+ catch (InterruptedException e)
+ {
+ return new FailureResponse(Failure.createFailure(e));
+ }
+ }
+ });
+
+ //
+ seq.addAction(3, UTP10.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Should be called
+ calls.add("3");
+
+ // Invoke the same but with different render parameter
+ PortletURL tmp = response.createRenderURL();
+ tmp.setParameter("abc", "def");
+ url = tmp.toString();
+ return new InvokeGetResponse(url);
+ }
+ });
+
+ //
+ seq.addAction(4, UTP10.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Should be called
+ calls.add("4");
+
+ // Refresh
+ return new InvokeGetResponse(url);
+ }
+ });
+
+ //
+ seq.addAction(5, UTP10.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Should not be called
+ calls.add("5");
+ return null;
+ }
+ });
+ seq.addAction(5, UTP11.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Refresh
+ return new InvokeGetResponse(url);
+ }
+ });
+
+ //
+ seq.addAction(6, UTP10.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Could be called depending on whether the portal
+ // decides to invoke UTP2 or UTP3 first
+ // so if it's called we need to disable cache otherwise the next
+ // render will probably not be called
+ response.setProperty(RenderResponse.EXPIRATION_CACHE, "0");
+ return null;
+ }
+ });
+ seq.addAction(6, UTP11.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ try
+ {
+ assertFalse(calls.contains("5"));
+
+ // Wait 5 seconds for the cache entry to be invalid
+ Thread.sleep(5 * 1000);
+
+ // Refresh
+ return new InvokeGetResponse(url);
+ }
+ catch (InterruptedException e)
+ {
+ return new FailureResponse(Failure.createFailure(e));
+ }
+ }
+ });
+
+ //
+ seq.addAction(7, UTP10.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Should be called
+ calls.add("7");
+
+ //
+ Set expected = new CollectionBuilder().add("0").add("3").add("4").add("7").toHashSet();
+ assertEquals(expected, calls);
+
+ // Refresh
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheWithPortletModeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheWithPortletModeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheWithPortletModeTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.expiringcache;
+
+import org.jboss.portal.test.portlet.jsr168.ext.common.AbstractCacheMarkupTestCase;
+import org.jboss.portal.test.portlet.jsr168.ext.common.NavigationalStateConfigurator;
+import org.jboss.portal.test.portlet.framework.UTP8;
+import org.jboss.portal.test.portlet.framework.UTP9;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.unit.annotations.TestCase;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class ExpiringCacheWithPortletModeTestCase extends AbstractCacheMarkupTestCase
+{
+ public ExpiringCacheWithPortletModeTestCase(PortletTest seq)
+ {
+ super(seq, UTP8.RENDER_JOINPOINT, UTP8.ACTION_JOINPOINT, UTP9.RENDER_JOINPOINT, NavigationalStateConfigurator.PORTLET_MODE_CONFIGURATOR);
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheWithRenderParametersTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheWithRenderParametersTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheWithRenderParametersTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.expiringcache;
+
+import org.jboss.portal.test.portlet.jsr168.ext.common.AbstractCacheMarkupTestCase;
+import org.jboss.portal.test.portlet.jsr168.ext.common.NavigationalStateConfigurator;
+import org.jboss.portal.test.portlet.framework.UTP4;
+import org.jboss.portal.test.portlet.framework.UTP5;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.unit.annotations.TestCase;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class ExpiringCacheWithRenderParametersTestCase extends AbstractCacheMarkupTestCase
+{
+ public ExpiringCacheWithRenderParametersTestCase(PortletTest seq)
+ {
+ super(seq, UTP4.RENDER_JOINPOINT, UTP4.ACTION_JOINPOINT, UTP5.RENDER_JOINPOINT, NavigationalStateConfigurator.RENDER_PARAMETER_CONFIGURATOR);
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheWithWindowStateTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheWithWindowStateTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/expiringcache/ExpiringCacheWithWindowStateTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.expiringcache;
+
+import org.jboss.portal.test.portlet.jsr168.ext.common.AbstractCacheMarkupTestCase;
+import org.jboss.portal.test.portlet.jsr168.ext.common.NavigationalStateConfigurator;
+import org.jboss.portal.test.portlet.framework.UTP6;
+import org.jboss.portal.test.portlet.framework.UTP7;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.unit.annotations.TestCase;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class ExpiringCacheWithWindowStateTestCase extends AbstractCacheMarkupTestCase
+{
+ public ExpiringCacheWithWindowStateTestCase(PortletTest seq)
+ {
+ super(seq, UTP6.RENDER_JOINPOINT, UTP6.ACTION_JOINPOINT, UTP7.RENDER_JOINPOINT, NavigationalStateConfigurator.WINDOW_STATE_CONFIGURATOR);
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/ActionInvalidatesNeverExpiringCacheTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/ActionInvalidatesNeverExpiringCacheTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/ActionInvalidatesNeverExpiringCacheTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -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.portlet.jsr168.ext.neverexpiringcache;
+
+import org.jboss.portal.test.portlet.jsr168.ext.common.AbstractActionInvalidatesTestCase;
+import org.jboss.portal.test.portlet.framework.UTP2;
+import org.jboss.portal.test.portlet.framework.UTP3;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.unit.annotations.TestCase;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class ActionInvalidatesNeverExpiringCacheTestCase extends AbstractActionInvalidatesTestCase
+{
+ public ActionInvalidatesNeverExpiringCacheTestCase(PortletTest seq)
+ {
+ super(seq, UTP2.RENDER_JOINPOINT, UTP2.ACTION_JOINPOINT, UTP3.RENDER_JOINPOINT);
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/DisableDuringRenderNeverExpiringCacheTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/DisableDuringRenderNeverExpiringCacheTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/DisableDuringRenderNeverExpiringCacheTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,41 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.neverexpiringcache;
+
+import org.jboss.portal.test.portlet.jsr168.ext.common.AbstractDisableDuringRenderTestCase;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.unit.annotations.TestCase;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class DisableDuringRenderNeverExpiringCacheTestCase extends AbstractDisableDuringRenderTestCase
+{
+ public DisableDuringRenderNeverExpiringCacheTestCase(PortletTest seq)
+ {
+ super(seq, UTP1.RENDER_JOINPOINT, UTP1.ACTION_JOINPOINT);
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheSequenceBuilder.java 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheSequenceBuilder.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -1,68 +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.portlet.jsr168.ext.neverexpiringcache;
-
-import org.jboss.portal.test.portlet.jsr168.ext.common.AbstractCacheSequenceBuilder;
-import org.jboss.portal.test.portlet.framework.UTP1;
-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.test.portlet.framework.UTP6;
-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.PortletTestDriver;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class NeverExpiringCacheSequenceBuilder extends AbstractCacheSequenceBuilder
-{
-
- public void createDisableDuringRenderNeverExpiringCache(PortletTestDriver registry)
- {
- createDisableDuringRender("DisableDuringRenderNeverExpiringCache", registry, UTP1.RENDER_JOINPOINT, UTP1.ACTION_JOINPOINT);
- }
-
- public void createActionInvalidatesNeverExpiringCache(PortletTestDriver registry)
- {
- createActionInvalidates("ActionInvalidatesNeverExpiringCache", registry, UTP2.RENDER_JOINPOINT, UTP2.ACTION_JOINPOINT, UTP3.RENDER_JOINPOINT);
- }
-
- public void createNeverExpiringCacheWithRenderParameters(PortletTestDriver registry)
- {
- createCacheMarkup("NeverExpiringCacheWithRenderParameters", registry, UTP4.RENDER_JOINPOINT, UTP4.ACTION_JOINPOINT, UTP5.RENDER_JOINPOINT, renderParameterConfigurator);
- }
-
- public void createNeverExpiringCacheWithWindowState(PortletTestDriver registry)
- {
- createCacheMarkup("NeverExpiringCacheWithWindowState", registry, UTP6.RENDER_JOINPOINT, UTP6.ACTION_JOINPOINT, UTP7.RENDER_JOINPOINT, windowStateConfigurator);
- }
-
- public void createNeverExpiringCacheWithPortletMode(PortletTestDriver registry)
- {
- createCacheMarkup("NeverExpiringCacheWithPortletMode", registry, UTP8.RENDER_JOINPOINT, UTP8.ACTION_JOINPOINT, UTP9.RENDER_JOINPOINT, portletModeConfigurator);
- }
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheWithPortletModeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheWithPortletModeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheWithPortletModeTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.neverexpiringcache;
+
+import org.jboss.portal.test.portlet.jsr168.ext.common.AbstractCacheMarkupTestCase;
+import org.jboss.portal.test.portlet.jsr168.ext.common.NavigationalStateConfigurator;
+import org.jboss.portal.test.portlet.framework.UTP8;
+import org.jboss.portal.test.portlet.framework.UTP9;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.unit.annotations.TestCase;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class NeverExpiringCacheWithPortletModeTestCase extends AbstractCacheMarkupTestCase
+{
+ public NeverExpiringCacheWithPortletModeTestCase(PortletTest seq)
+ {
+ super(seq, UTP8.RENDER_JOINPOINT, UTP8.ACTION_JOINPOINT, UTP9.RENDER_JOINPOINT, NavigationalStateConfigurator.PORTLET_MODE_CONFIGURATOR);
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheWithRenderParametersTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheWithRenderParametersTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheWithRenderParametersTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.neverexpiringcache;
+
+import org.jboss.portal.test.portlet.jsr168.ext.common.AbstractCacheMarkupTestCase;
+import org.jboss.portal.test.portlet.jsr168.ext.common.NavigationalStateConfigurator;
+import org.jboss.portal.test.portlet.framework.UTP4;
+import org.jboss.portal.test.portlet.framework.UTP5;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.unit.annotations.TestCase;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class NeverExpiringCacheWithRenderParametersTestCase extends AbstractCacheMarkupTestCase
+{
+ public NeverExpiringCacheWithRenderParametersTestCase(PortletTest seq)
+ {
+ super(seq, UTP4.RENDER_JOINPOINT, UTP4.ACTION_JOINPOINT, UTP5.RENDER_JOINPOINT, NavigationalStateConfigurator.RENDER_PARAMETER_CONFIGURATOR);
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheWithWindowStateTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheWithWindowStateTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/neverexpiringcache/NeverExpiringCacheWithWindowStateTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.neverexpiringcache;
+
+import org.jboss.portal.test.portlet.jsr168.ext.common.AbstractCacheMarkupTestCase;
+import org.jboss.portal.test.portlet.jsr168.ext.common.NavigationalStateConfigurator;
+import org.jboss.portal.test.portlet.framework.UTP6;
+import org.jboss.portal.test.portlet.framework.UTP7;
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.unit.annotations.TestCase;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class NeverExpiringCacheWithWindowStateTestCase extends AbstractCacheMarkupTestCase
+{
+ public NeverExpiringCacheWithWindowStateTestCase(PortletTest seq)
+ {
+ super(seq, UTP6.RENDER_JOINPOINT, UTP6.ACTION_JOINPOINT, UTP7.RENDER_JOINPOINT, NavigationalStateConfigurator.WINDOW_STATE_CONFIGURATOR);
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/AbstractNoCacheTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/AbstractNoCacheTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/AbstractNoCacheTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,209 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.nocache;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.Joinpoint;
+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;
+import org.jboss.portal.common.util.CollectionBuilder;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.FailureResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+import org.jboss.unit.Failure;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import java.util.Set;
+import java.util.HashSet;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class AbstractNoCacheTestCase
+{
+
+ final Set calls = new HashSet();
+ String url;
+
+ public AbstractNoCacheTestCase(
+ PortletTest seq,
+ Joinpoint p1renderjp,
+ Joinpoint p1actionjp,
+ Joinpoint p2renderjp)
+ {
+ //
+ seq.addAction(0, p1renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Should be called
+ calls.add("0");
+
+ // Refresh
+ url = response.createRenderURL().toString();
+ return new InvokeGetResponse(url);
+ }
+ });
+
+ //
+ seq.addAction(1, p1renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Should be called
+ calls.add("1");
+ response.setProperty(RenderResponse.EXPIRATION_CACHE, "0");
+
+ // Refresh
+ return new InvokeGetResponse(url);
+ }
+ });
+
+ //
+ seq.addAction(2, p1renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Should be called
+ calls.add("2");
+ response.setProperty(RenderResponse.EXPIRATION_CACHE, "5");
+
+ // Refresh
+ return new InvokeGetResponse(url);
+ }
+ });
+
+ //
+ seq.addAction(3, p1renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Should not be called
+ calls.add("3");
+ return null;
+ }
+ });
+ seq.addAction(3, p2renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Refresh
+ return new InvokeGetResponse(url);
+ }
+ });
+
+ //
+ seq.addAction(4, p1renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Could be called or not depending on the page rendering ordre
+ return null;
+ }
+ });
+ seq.addAction(4, p2renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ try
+ {
+ // Wait 5 seconds for the cache entry to be invalid
+ Thread.sleep(5 * 1000);
+
+ // Refresh
+ return new InvokeGetResponse(url);
+ }
+ catch (InterruptedException e)
+ {
+ return new FailureResponse(Failure.createFailure(e));
+ }
+ }
+ });
+
+ //
+ seq.addAction(5, p1renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Should be called
+ calls.add("5");
+ response.setProperty(RenderResponse.EXPIRATION_CACHE, "5");
+ url = response.createActionURL().toString();
+ return new InvokeGetResponse(url);
+ }
+ });
+
+ //
+ seq.addAction(6, p1actionjp, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ // Should be called
+ calls.add("6_action");
+ }
+ });
+ seq.addAction(6, p1renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ // Should be called
+ calls.add("6_render");
+ return new InvokeGetResponse(response.createRenderURL().toString());
+ }
+ });
+
+ //
+ seq.addAction(7, p1renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ //
+ return null;
+ }
+ });
+ seq.addAction(7, p2renderjp, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
+ {
+ //
+ Set expected = new CollectionBuilder().add("0").add("1").add("2").add("5").add("6_render").add("6_action").toHashSet();
+ assertEquals(expected, calls);
+
+ // Refresh
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/ExplicitNoCacheTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/ExplicitNoCacheTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/ExplicitNoCacheTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -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.portlet.jsr168.ext.nocache;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.Joinpoint;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.test.portlet.framework.UTP2;
+import org.jboss.portal.unit.annotations.TestCase;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class ExplicitNoCacheTestCase extends AbstractNoCacheTestCase
+{
+ public ExplicitNoCacheTestCase(PortletTest seq)
+ {
+ super(seq, UTP1.RENDER_JOINPOINT, UTP1.ACTION_JOINPOINT, UTP2.RENDER_JOINPOINT);
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/ImplicitNoCacheTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/ImplicitNoCacheTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/ImplicitNoCacheTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,41 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.nocache;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.portlet.framework.UTP3;
+import org.jboss.portal.test.portlet.framework.UTP4;
+import org.jboss.portal.unit.annotations.TestCase;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class ImplicitNoCacheTestCase extends AbstractNoCacheTestCase
+{
+ public ImplicitNoCacheTestCase(PortletTest seq)
+ {
+ super(seq, UTP3.RENDER_JOINPOINT, UTP3.ACTION_JOINPOINT, UTP4.RENDER_JOINPOINT);
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/NoCacheSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/NoCacheSequenceBuilder.java 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/nocache/NoCacheSequenceBuilder.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -1,231 +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.portlet.jsr168.ext.nocache;
-
-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;
-import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
-import org.jboss.portal.test.portlet.framework.UTP1;
-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.common.util.CollectionBuilder;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.FailureResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
-import org.jboss.unit.Failure;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.Portlet;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.portlet.PortletException;
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import java.util.Set;
-import java.util.HashSet;
-import java.io.IOException;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class NoCacheSequenceBuilder extends PortletTestSuite
-{
-
- public void createExplicitNoCache(PortletTestDriver registry)
- {
- create("ExplicitNoCache", registry, UTP1.RENDER_JOINPOINT, UTP1.ACTION_JOINPOINT, UTP2.RENDER_JOINPOINT);
- }
-
- public void createImplicitNoCache(PortletTestDriver registry)
- {
- create("ImplicitNoCache", registry, UTP3.RENDER_JOINPOINT, UTP3.ACTION_JOINPOINT, UTP4.RENDER_JOINPOINT);
- }
-
- /**
- * Setting expiration cache value force caching for a certain amount of time and
- * can be invalidated by an action or by time.
- */
- private void create(
- String testName,
- PortletTestDriver registry,
- Joinpoint p1renderjp,
- Joinpoint p1actionjp,
- Joinpoint p2renderjp)
- {
- final Set calls = new HashSet();
- final String[] url = new String[1];
- PortletTest seq = new PortletTest();
- registry.addSequence(testName, seq);
-
- //
- seq.addAction(0, p1renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Should be called
- calls.add("0");
-
- // Refresh
- url[0] = response.createRenderURL().toString();
- return new InvokeGetResponse(url[0]);
- }
- });
-
- //
- seq.addAction(1, p1renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Should be called
- calls.add("1");
- response.setProperty(RenderResponse.EXPIRATION_CACHE, "0");
-
- // Refresh
- return new InvokeGetResponse(url[0]);
- }
- });
-
- //
- seq.addAction(2, p1renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Should be called
- calls.add("2");
- response.setProperty(RenderResponse.EXPIRATION_CACHE, "5");
-
- // Refresh
- return new InvokeGetResponse(url[0]);
- }
- });
-
- //
- seq.addAction(3, p1renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Should not be called
- calls.add("3");
- return null;
- }
- });
- seq.addAction(3, p2renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Refresh
- return new InvokeGetResponse(url[0]);
- }
- });
-
- //
- seq.addAction(4, p1renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Could be called or not depending on the page rendering ordre
- return null;
- }
- });
- seq.addAction(4, p2renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- try
- {
- // Wait 5 seconds for the cache entry to be invalid
- Thread.sleep(5 * 1000);
-
- // Refresh
- return new InvokeGetResponse(url[0]);
- }
- catch (InterruptedException e)
- {
- return new FailureResponse(Failure.createFailure(e));
- }
- }
- });
-
- //
- seq.addAction(5, p1renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Should be called
- calls.add("5");
- response.setProperty(RenderResponse.EXPIRATION_CACHE, "5");
- url[0] = response.createActionURL().toString();
- return new InvokeGetResponse(url[0]);
- }
- });
-
- //
- seq.addAction(6, p1actionjp, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
- {
- // Should be called
- calls.add("6_action");
- }
- });
- seq.addAction(6, p1renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- // Should be called
- calls.add("6_render");
- return new InvokeGetResponse(response.createRenderURL().toString());
- }
- });
-
- //
- seq.addAction(7, p1renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- //
- return null;
- }
- });
- seq.addAction(7, p2renderjp, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws IOException, PortletException
- {
- //
- Set expected = new CollectionBuilder().add("0").add("1").add("2").add("5").add("6_render").add("6_action").toHashSet();
- assertEquals(expected, calls);
-
- // Refresh
- return new EndTestResponse();
- }
- });
- }
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/GetResourceBundleDuringInitTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/GetResourceBundleDuringInitTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/GetResourceBundleDuringInitTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,62 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.portletconfig;
+
+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.portlet.jsr168.ext.portletconfig.extended.GetResourceBundleDuringInitPortlet;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNotNull;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.util.ResourceBundle;
+import java.util.Locale;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class GetResourceBundleDuringInitTestCase
+{
+ public GetResourceBundleDuringInitTestCase(PortletTest seq)
+ {
+ seq.addAction(0, GetResourceBundleDuringInitPortlet.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ ResourceBundle bundle = GetResourceBundleDuringInitPortlet.bundle;
+ assertNotNull(bundle);
+ assertEquals("bar", bundle.getObject("foo"));
+ assertEquals(Locale.ENGLISH, bundle.getLocale());
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/PortletConfigSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/PortletConfigSequenceBuilder.java 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/PortletConfigSequenceBuilder.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -1,169 +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.portlet.jsr168.ext.portletconfig;
-
-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;
-import org.jboss.portal.test.portlet.jsr168.ext.portletconfig.extended.GetResourceBundleDuringInitPortlet;
-import org.jboss.portal.test.portlet.jsr168.ext.portletconfig.extended.ResourceBundleCascadePortlet;
-import org.jboss.portal.test.portlet.jsr168.ext.portletconfig.extended.ResourceBundlePortlet;
-import org.jboss.unit.driver.response.EndTestResponse;
-import org.jboss.unit.driver.DriverResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.Portlet;
-import javax.portlet.PortletConfig;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class PortletConfigSequenceBuilder extends PortletTestSuite
-{
- public void createGetResourceBundleDuringInit(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("GetResourceBundleDuringInit", seq);
-
- seq.addAction(0, GetResourceBundleDuringInitPortlet.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- ResourceBundle bundle = GetResourceBundleDuringInitPortlet.bundle;
- assertNotNull(bundle);
- assertEquals("bar", bundle.getObject("foo"));
- assertEquals(Locale.ENGLISH, bundle.getLocale());
- return new EndTestResponse();
- }
- });
- }
-
-
- public void createResourceBundleCascade(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("ResourceBundleCascade", seq);
-
- seq.addAction(0, ResourceBundleCascadePortlet.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletConfig cfg = ((AbstractUniversalTestPortlet)portlet).getPortletConfig();
-
- ResourceBundle bundle_en = cfg.getResourceBundle(Locale.ENGLISH);
- ResourceBundle bundle_it = cfg.getResourceBundle(Locale.ITALIAN);
- ResourceBundle bundle_zz = cfg.getResourceBundle(new Locale("zz"));
- ResourceBundle bundle_en_GB = cfg.getResourceBundle(Locale.UK);
- ResourceBundle bundle_de = cfg.getResourceBundle(Locale.GERMAN);
- ResourceBundle bundle_de_DE = cfg.getResourceBundle(Locale.GERMANY);
- ResourceBundle bundle_fr = cfg.getResourceBundle(Locale.FRENCH);
- ResourceBundle bundle_fr_FR = cfg.getResourceBundle(Locale.FRANCE);
- ResourceBundle bundle_fr_FR_aa = cfg.getResourceBundle(new Locale(Locale.FRANCE.getLanguage(), Locale.FRANCE.getCountry(), "aa"));
-
- assertEquals(Locale.ENGLISH, bundle_en.getLocale());
- assertEquals(Locale.ENGLISH, bundle_it.getLocale());
- assertEquals(Locale.ENGLISH, bundle_zz.getLocale());
- assertEquals(Locale.UK, bundle_en_GB.getLocale());
- assertEquals(Locale.GERMAN, bundle_de.getLocale());
- assertEquals(Locale.GERMANY, bundle_de_DE.getLocale());
- assertEquals(Locale.FRENCH, bundle_fr.getLocale());
- assertEquals(Locale.FRANCE, bundle_fr_FR.getLocale());
- assertEquals(Locale.FRANCE, bundle_fr_FR_aa.getLocale());
-
- assertEquals("title", bundle_en.getString("javax.portlet.title"));
- assertEquals("title", bundle_it.getString("javax.portlet.title"));
- assertEquals("title", bundle_zz.getString("javax.portlet.title"));
- assertEquals("title", bundle_en_GB.getString("javax.portlet.title"));
- assertEquals("title", bundle_de.getString("javax.portlet.title"));
- assertEquals("title", bundle_de_DE.getString("javax.portlet.title"));
- assertEquals("title", bundle_fr.getString("javax.portlet.title"));
- assertEquals("title", bundle_fr_FR.getString("javax.portlet.title"));
- assertEquals("title", bundle_fr_FR_aa.getString("javax.portlet.title"));
-
- assertEquals("short-title", bundle_en.getString("javax.portlet.short-title"));
- assertEquals("short-title", bundle_it.getString("javax.portlet.short-title"));
- assertEquals("short-title", bundle_zz.getString("javax.portlet.short-title"));
- assertEquals("short-title", bundle_de.getString("javax.portlet.short-title"));
- assertEquals("short-title_de_DE", bundle_de_DE.getString("javax.portlet.short-title"));
- assertEquals("short-title_fr", bundle_fr.getString("javax.portlet.short-title"));
- assertEquals("short-title_fr_FR", bundle_fr_FR.getString("javax.portlet.short-title"));
- assertEquals("short-title_fr_FR", bundle_fr_FR_aa.getString("javax.portlet.short-title"));
-
- assertThrowsMissingResourceException(bundle_en);
- assertThrowsMissingResourceException(bundle_it);
- assertThrowsMissingResourceException(bundle_zz);
- assertThrowsMissingResourceException(bundle_de);
- assertThrowsMissingResourceException(bundle_de_DE);
- assertThrowsMissingResourceException(bundle_fr);
- assertThrowsMissingResourceException(bundle_fr_FR);
- assertThrowsMissingResourceException(bundle_fr_FR_aa);
- return new EndTestResponse();
- }
-
- private void assertThrowsMissingResourceException(ResourceBundle bundle)
- {
- try
- {
- bundle.getString("javax.portlet.keywords");
- fail();
- }
- catch (MissingResourceException expected)
- {
- }
- }
- });
- }
-
- public void createResourceBundle(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("ResourceBundle", seq);
-
- seq.addAction(0, ResourceBundlePortlet.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletConfig cfg = ((AbstractUniversalTestPortlet)portlet).getPortletConfig();
- ResourceBundle bundle = cfg.getResourceBundle(Locale.ENGLISH);
-
- String example = bundle.getString("example-key");
- assertEquals("example-value", example);
-
- //
- String title = bundle.getString("javax.portlet.title");
- assertEquals("the title", title);
- return new EndTestResponse();
- }
- });
- }
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/ResourceBundleCascadeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/ResourceBundleCascadeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/ResourceBundleCascadeTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,122 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.portletconfig;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestContext;
+import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
+import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
+import org.jboss.portal.test.portlet.jsr168.ext.portletconfig.extended.ResourceBundleCascadePortlet;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletConfig;
+import java.util.ResourceBundle;
+import java.util.Locale;
+import java.util.MissingResourceException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class ResourceBundleCascadeTestCase
+{
+ public ResourceBundleCascadeTestCase(PortletTest seq)
+ {
+ seq.addAction(0, ResourceBundleCascadePortlet.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletConfig cfg = ((AbstractUniversalTestPortlet)portlet).getPortletConfig();
+
+ ResourceBundle bundle_en = cfg.getResourceBundle(Locale.ENGLISH);
+ ResourceBundle bundle_it = cfg.getResourceBundle(Locale.ITALIAN);
+ ResourceBundle bundle_zz = cfg.getResourceBundle(new Locale("zz"));
+ ResourceBundle bundle_en_GB = cfg.getResourceBundle(Locale.UK);
+ ResourceBundle bundle_de = cfg.getResourceBundle(Locale.GERMAN);
+ ResourceBundle bundle_de_DE = cfg.getResourceBundle(Locale.GERMANY);
+ ResourceBundle bundle_fr = cfg.getResourceBundle(Locale.FRENCH);
+ ResourceBundle bundle_fr_FR = cfg.getResourceBundle(Locale.FRANCE);
+ ResourceBundle bundle_fr_FR_aa = cfg.getResourceBundle(new Locale(Locale.FRANCE.getLanguage(), Locale.FRANCE.getCountry(), "aa"));
+
+ assertEquals(Locale.ENGLISH, bundle_en.getLocale());
+ assertEquals(Locale.ENGLISH, bundle_it.getLocale());
+ assertEquals(Locale.ENGLISH, bundle_zz.getLocale());
+ assertEquals(Locale.UK, bundle_en_GB.getLocale());
+ assertEquals(Locale.GERMAN, bundle_de.getLocale());
+ assertEquals(Locale.GERMANY, bundle_de_DE.getLocale());
+ assertEquals(Locale.FRENCH, bundle_fr.getLocale());
+ assertEquals(Locale.FRANCE, bundle_fr_FR.getLocale());
+ assertEquals(Locale.FRANCE, bundle_fr_FR_aa.getLocale());
+
+ assertEquals("title", bundle_en.getString("javax.portlet.title"));
+ assertEquals("title", bundle_it.getString("javax.portlet.title"));
+ assertEquals("title", bundle_zz.getString("javax.portlet.title"));
+ assertEquals("title", bundle_en_GB.getString("javax.portlet.title"));
+ assertEquals("title", bundle_de.getString("javax.portlet.title"));
+ assertEquals("title", bundle_de_DE.getString("javax.portlet.title"));
+ assertEquals("title", bundle_fr.getString("javax.portlet.title"));
+ assertEquals("title", bundle_fr_FR.getString("javax.portlet.title"));
+ assertEquals("title", bundle_fr_FR_aa.getString("javax.portlet.title"));
+
+ assertEquals("short-title", bundle_en.getString("javax.portlet.short-title"));
+ assertEquals("short-title", bundle_it.getString("javax.portlet.short-title"));
+ assertEquals("short-title", bundle_zz.getString("javax.portlet.short-title"));
+ assertEquals("short-title", bundle_de.getString("javax.portlet.short-title"));
+ assertEquals("short-title_de_DE", bundle_de_DE.getString("javax.portlet.short-title"));
+ assertEquals("short-title_fr", bundle_fr.getString("javax.portlet.short-title"));
+ assertEquals("short-title_fr_FR", bundle_fr_FR.getString("javax.portlet.short-title"));
+ assertEquals("short-title_fr_FR", bundle_fr_FR_aa.getString("javax.portlet.short-title"));
+
+ assertThrowsMissingResourceException(bundle_en);
+ assertThrowsMissingResourceException(bundle_it);
+ assertThrowsMissingResourceException(bundle_zz);
+ assertThrowsMissingResourceException(bundle_de);
+ assertThrowsMissingResourceException(bundle_de_DE);
+ assertThrowsMissingResourceException(bundle_fr);
+ assertThrowsMissingResourceException(bundle_fr_FR);
+ assertThrowsMissingResourceException(bundle_fr_FR_aa);
+ return new EndTestResponse();
+ }
+
+ private void assertThrowsMissingResourceException(ResourceBundle bundle)
+ {
+ try
+ {
+ bundle.getString("javax.portlet.keywords");
+ fail();
+ }
+ catch (MissingResourceException expected)
+ {
+ }
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/ResourceBundleTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/ResourceBundleTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletconfig/ResourceBundleTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,68 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.portletconfig;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestContext;
+import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
+import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
+import org.jboss.portal.test.portlet.jsr168.ext.portletconfig.extended.ResourceBundlePortlet;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletConfig;
+import java.util.ResourceBundle;
+import java.util.Locale;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class ResourceBundleTestCase
+{
+ public ResourceBundleTestCase(PortletTest seq)
+ {
+ seq.addAction(0, ResourceBundlePortlet.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletConfig cfg = ((AbstractUniversalTestPortlet)portlet).getPortletConfig();
+ ResourceBundle bundle = cfg.getResourceBundle(Locale.ENGLISH);
+
+ String example = bundle.getString("example-key");
+ assertEquals("example-value", example);
+
+ //
+ String title = bundle.getString("javax.portlet.title");
+ assertEquals("the title", title);
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/PortletModeSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/PortletModeSequenceBuilder.java 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/PortletModeSequenceBuilder.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -1,150 +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.portlet.jsr168.ext.portletmode;
-
-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;
-import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.test.portlet.jsr168.ext.portletmode.extended.TestActionWithPortletModePortlet;
-import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-import org.jboss.unit.driver.DriverResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import javax.portlet.Portlet;
-import javax.portlet.PortletMode;
-import javax.portlet.PortletModeException;
-import javax.portlet.PortletURL;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class PortletModeSequenceBuilder extends PortletTestSuite
-{
- public void createTestActionWithPortletModeCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("TestActionWithPortletMode", seq);
- seq.addAction(0, TestActionWithPortletModePortlet.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletModeException
- {
- PortletURL url = response.createActionURL();
- url.setPortletMode(PortletMode.EDIT);
- InvokeGetResponse result = new InvokeGetResponse(url.toString());
- return result;
- }
- });
-
- seq.addAction(1, TestActionWithPortletModePortlet.ACTION_JOINPOINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
- {
- assertEquals(PortletMode.EDIT, request.getPortletMode());
- }
- });
-
- seq.addAction(1, TestActionWithPortletModePortlet.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new EndTestResponse();
- }
- });
- }
-
- public void createTestDuringActionCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("TestDuringAction", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletURL url = response.createActionURL();
- InvokeGetResponse result = new InvokeGetResponse(url.toString());
- return result;
- }
- });
-
- seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletModeException
- {
- // Test we can set null portlet mode
- response.setPortletMode(null);
- }
- });
-
- seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new EndTestResponse();
- }
- });
-
- }
-
- public void createTestDuringRenderCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("TestDuringRender", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletModeException
- {
- // Test null returns false
- assertFalse(request.isPortletModeAllowed(null));
-
- // Test that we can use set the portlet mode on render URL
- // before having set the content type on the response
- PortletURL url1 = response.createRenderURL();
- url1.setPortletMode(PortletMode.VIEW);
-
- // Test we can set null portlet mode
- url1.setPortletMode(null);
-
- // Test that we can use set the portlet mode on action URL
- // before having set the content type on the response
- PortletURL url2 = response.createActionURL();
- url2.setPortletMode(PortletMode.VIEW);
-
- // Test we can set null portlet mode
- url2.setPortletMode(null);
- return new EndTestResponse();
- }
- });
- }
-
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/TestActionWithPortletModeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/TestActionWithPortletModeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/TestActionWithPortletModeTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,81 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.portletmode;
+
+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;
+import org.jboss.portal.test.portlet.jsr168.ext.portletmode.extended.TestActionWithPortletModePortlet;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletModeException;
+import javax.portlet.PortletURL;
+import javax.portlet.PortletMode;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class TestActionWithPortletModeTestCase
+{
+ public TestActionWithPortletModeTestCase(PortletTest seq)
+ {
+ seq.addAction(0, TestActionWithPortletModePortlet.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletModeException
+ {
+ PortletURL url = response.createActionURL();
+ url.setPortletMode(PortletMode.EDIT);
+ InvokeGetResponse result = new InvokeGetResponse(url.toString());
+ return result;
+ }
+ });
+
+ seq.addAction(1, TestActionWithPortletModePortlet.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
+ {
+ assertEquals(PortletMode.EDIT, request.getPortletMode());
+ }
+ });
+
+ seq.addAction(1, TestActionWithPortletModePortlet.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/TestDuringActionTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/TestDuringActionTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/TestDuringActionTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,77 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.portletmode;
+
+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;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletURL;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletModeException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestDuringActionTestCase
+{
+ public TestDuringActionTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletURL url = response.createActionURL();
+ InvokeGetResponse result = new InvokeGetResponse(url.toString());
+ return result;
+ }
+ });
+
+ seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletModeException
+ {
+ // Test we can set null portlet mode
+ response.setPortletMode(null);
+ }
+ });
+
+ seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/TestDuringRenderTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/TestDuringRenderTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletmode/TestDuringRenderTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,76 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.portletmode;
+
+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.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertFalse;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletModeException;
+import javax.portlet.PortletURL;
+import javax.portlet.PortletMode;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class TestDuringRenderTestCase
+{
+ public TestDuringRenderTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletModeException
+ {
+ // Test null returns false
+ assertFalse(request.isPortletModeAllowed(null));
+
+ // Test that we can use set the portlet mode on render URL
+ // before having set the content type on the response
+ PortletURL url1 = response.createRenderURL();
+ url1.setPortletMode(PortletMode.VIEW);
+
+ // Test we can set null portlet mode
+ url1.setPortletMode(null);
+
+ // Test that we can use set the portlet mode on action URL
+ // before having set the content type on the response
+ PortletURL url2 = response.createActionURL();
+ url2.setPortletMode(PortletMode.VIEW);
+
+ // Test we can set null portlet mode
+ url2.setPortletMode(null);
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/ActionRequestUseFormTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/ActionRequestUseFormTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/ActionRequestUseFormTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,118 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.portletrequests;
+
+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;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.common.http.HttpRequest;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokePostResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletURL;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import java.io.IOException;
+
+/**
+ * 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.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class ActionRequestUseFormTestCase
+{
+ public ActionRequestUseFormTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletURL url = response.createActionURL();
+ url.setParameter("g_foo1", "g_bar1_1");
+ url.setParameter("g_foo2", new String[]{"g_bar2_1", "g_bar2_2"});
+ url.setParameter("g_foo3", new String[]{"g_bar3_1"});
+ InvokePostResponse iur = new InvokePostResponse(url.toString());
+ HttpRequest.Form body = new HttpRequest.Form();
+ body.addParameter("g_foo3", new String[]{"g_bar3_2"});
+ body.addParameter("g_foo4", new String[]{"g_bar4_1"});
+ body.addParameter("g_foo5", new String[]{"g_bar5_1", "g_bar5_2"});
+ iur.setBody(body);
+ iur.setContentType(InvokePostResponse.APPLICATION_X_WWW_FORM_URLENCODED);
+ return iur;
+ }
+ });
+
+ seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws IOException
+ {
+ assertEquals(new String[]{"g_bar1_1"}, request.getParameterValues("g_foo1"));
+ assertEquals(new String[]{"g_bar2_1", "g_bar2_2"}, request.getParameterValues("g_foo2"));
+ assertEquals(new String[]{"g_bar3_1", "g_bar3_2"}, request.getParameterValues("g_foo3"));
+ assertEquals(new String[]{"g_bar4_1"}, request.getParameterValues("g_foo4"));
+ assertEquals(new String[]{"g_bar5_1", "g_bar5_2"}, request.getParameterValues("g_foo5"));
+ assertEquals(InvokePostResponse.APPLICATION_X_WWW_FORM_URLENCODED, request.getContentType());
+
+ try
+ {
+ request.getPortletInputStream();
+ fail("Should not get the input stream");
+ }
+ catch (IllegalStateException expected)
+ {
+ //expected
+ }
+
+ try
+ {
+ request.getReader();
+ fail("Should not get the reader");
+ }
+ catch (IllegalStateException expected)
+ {
+ //expected
+ }
+ }
+ });
+
+ seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/ActionRequestUseInputStreamTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/ActionRequestUseInputStreamTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/ActionRequestUseInputStreamTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,133 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.portletrequests;
+
+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;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.common.http.HttpRequest;
+import org.jboss.portal.common.io.IOTools;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokePostResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletURL;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ByteArrayOutputStream;
+
+/**
+ * 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.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class ActionRequestUseInputStreamTestCase
+{
+
+ private final byte[] byteContent = {65, 66, 67, 68, 69, 70};
+
+ public ActionRequestUseInputStreamTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletURL url = response.createActionURL();
+ url.setParameter("g_foo1", "g_bar1_1");
+ url.setParameter("g_foo2", new String[]{"g_bar2_1", "g_bar2_2"});
+ InvokePostResponse iur = new InvokePostResponse(url.toString());
+ HttpRequest.Raw body = new HttpRequest.Raw();
+ body.setBytes(byteContent);
+ iur.setBody(body);
+ iur.setContentType(InvokePostResponse.MULTIPART_FORM_DATA);
+ return iur;
+ }
+ });
+
+ seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws IOException
+ {
+
+ assertEquals(new String[]{"g_bar1_1"}, request.getParameterValues("g_foo1"));
+ assertEquals(new String[]{"g_bar2_1", "g_bar2_2"}, request.getParameterValues("g_foo2"));
+ assertEquals(InvokePostResponse.MULTIPART_FORM_DATA, request.getContentType());
+ assertEquals(byteContent.length, request.getContentLength());
+ InputStream in = null;
+ try
+ {
+ in = request.getPortletInputStream();
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ IOTools.copy(in, out);
+ out.close();
+ byte[] bytes = out.toByteArray();
+ assertEquals(-1, in.read());
+ assertEquals(byteContent, bytes);
+ }
+ catch (IllegalStateException e)
+ {
+ fail("Was not expecting an ISE");
+ }
+ catch (IOException e)
+ {
+ fail("Was not expecting an IOException");
+ }
+ finally
+ {
+ IOTools.safeClose(in);
+ }
+ try
+ {
+ request.getReader();
+ fail("The reader should not be available");
+ }
+ catch (IllegalStateException expected)
+ {
+ }
+ }
+ });
+
+ seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/ActionRequestUseReaderTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/ActionRequestUseReaderTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/ActionRequestUseReaderTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,127 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.portletrequests;
+
+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;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.common.http.HttpRequest;
+import org.jboss.portal.common.io.IOTools;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokePostResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletURL;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringWriter;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class ActionRequestUseReaderTestCase
+{
+
+ private final byte[] byteContent = {65, 66, 67, 68, 69, 70};
+
+ public ActionRequestUseReaderTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletURL url = response.createActionURL();
+ url.setParameter("g_foo1", "g_bar1_1");
+ url.setParameter("g_foo2", new String[]{"g_bar2_1", "g_bar2_2"});
+ InvokePostResponse iur = new InvokePostResponse(url.toString());
+ HttpRequest.Raw body = new HttpRequest.Raw();
+ body.setBytes(byteContent);
+ iur.setBody(body);
+ iur.setContentType(InvokePostResponse.MULTIPART_FORM_DATA);
+ return iur;
+ }
+ });
+
+ seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws IOException
+ {
+ assertEquals(new String[]{"g_bar1_1"}, request.getParameterValues("g_foo1"));
+ assertEquals(new String[]{"g_bar2_1", "g_bar2_2"}, request.getParameterValues("g_foo2"));
+ assertEquals(InvokePostResponse.MULTIPART_FORM_DATA, request.getContentType());
+ assertEquals(byteContent.length, request.getContentLength());
+ Reader in = null;
+ try
+ {
+ in = request.getReader();
+ StringWriter out = new StringWriter();
+ IOTools.copy(in, out);
+ out.close();
+ byte[] bytes = out.toString().getBytes("UTF-8");
+ assertEquals(-1, in.read());
+ assertEquals(byteContent, bytes);
+ }
+ catch (IllegalStateException e)
+ {
+ fail("Was not expecting an ISE");
+ }
+ catch (IOException e)
+ {
+ fail("Was not expecting an IOException");
+ }
+ finally
+ {
+ IOTools.safeClose(in);
+ }
+ try
+ {
+ request.getPortletInputStream();
+ fail("The inputstream should not be available");
+ }
+ catch (IllegalStateException expected)
+ {
+ }
+ }
+ });
+
+ seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/PortletRequestsSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/PortletRequestsSequenceBuilder.java 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/PortletRequestsSequenceBuilder.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -1,463 +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.portlet.jsr168.ext.portletrequests;
-
-import org.jboss.portal.common.util.Tools;
-import org.jboss.portal.common.http.HttpRequest;
-import org.jboss.portal.common.io.IOTools;
-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;
-import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.unit.remote.driver.handler.http.response.InvokePostResponse;
-import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import javax.portlet.Portlet;
-import javax.portlet.PortletURL;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.io.StringWriter;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class PortletRequestsSequenceBuilder extends PortletTestSuite
-{
-
- private final byte[] byteContent = {65, 66, 67, 68, 69, 70};
-
- /**
- * 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(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("ActionRequestUseForm", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletURL url = response.createActionURL();
- url.setParameter("g_foo1", "g_bar1_1");
- url.setParameter("g_foo2", new String[]{"g_bar2_1", "g_bar2_2"});
- url.setParameter("g_foo3", new String[]{"g_bar3_1"});
- InvokePostResponse iur = new InvokePostResponse(url.toString());
- HttpRequest.Form body = new HttpRequest.Form();
- body.addParameter("g_foo3", new String[]{"g_bar3_2"});
- body.addParameter("g_foo4", new String[]{"g_bar4_1"});
- body.addParameter("g_foo5", new String[]{"g_bar5_1", "g_bar5_2"});
- iur.setBody(body);
- iur.setContentType(InvokePostResponse.APPLICATION_X_WWW_FORM_URLENCODED);
- return iur;
- }
- });
-
- seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws IOException
- {
- assertEquals(new String[]{"g_bar1_1"}, request.getParameterValues("g_foo1"));
- assertEquals(new String[]{"g_bar2_1", "g_bar2_2"}, request.getParameterValues("g_foo2"));
- assertEquals(new String[]{"g_bar3_1", "g_bar3_2"}, request.getParameterValues("g_foo3"));
- assertEquals(new String[]{"g_bar4_1"}, request.getParameterValues("g_foo4"));
- assertEquals(new String[]{"g_bar5_1", "g_bar5_2"}, request.getParameterValues("g_foo5"));
- assertEquals(InvokePostResponse.APPLICATION_X_WWW_FORM_URLENCODED, request.getContentType());
-
- try
- {
- request.getPortletInputStream();
- fail("Should not get the input stream");
- }
- catch (IllegalStateException expected)
- {
- //expected
- }
-
- try
- {
- request.getReader();
- fail("Should not get the reader");
- }
- catch (IllegalStateException expected)
- {
- //expected
- }
- }
- });
-
- seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new EndTestResponse();
- }
- });
- }
-
- /**
- * 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(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("ActionRequestUseInputStream", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
-
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletURL url = response.createActionURL();
- url.setParameter("g_foo1", "g_bar1_1");
- url.setParameter("g_foo2", new String[]{"g_bar2_1", "g_bar2_2"});
- InvokePostResponse iur = new InvokePostResponse(url.toString());
- HttpRequest.Raw body = new HttpRequest.Raw();
- body.setBytes(byteContent);
- iur.setBody(body);
- iur.setContentType(InvokePostResponse.MULTIPART_FORM_DATA);
- return iur;
- }
- });
-
- seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
- {
-
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws IOException
- {
-
- assertEquals(new String[]{"g_bar1_1"}, request.getParameterValues("g_foo1"));
- assertEquals(new String[]{"g_bar2_1", "g_bar2_2"}, request.getParameterValues("g_foo2"));
- assertEquals(InvokePostResponse.MULTIPART_FORM_DATA, request.getContentType());
- assertEquals(byteContent.length, request.getContentLength());
- InputStream in = null;
- try
- {
- in = request.getPortletInputStream();
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- IOTools.copy(in, out);
- out.close();
- byte[] bytes = out.toByteArray();
- assertEquals(-1, in.read());
- assertEquals(byteContent, bytes);
- }
- catch (IllegalStateException e)
- {
- fail("Was not expecting an ISE");
- }
- catch (IOException e)
- {
- fail("Was not expecting an IOException");
- }
- finally
- {
- IOTools.safeClose(in);
- }
- try
- {
- request.getReader();
- fail("The reader should not be available");
- }
- catch (IllegalStateException expected)
- {
- }
- }
- });
-
- seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new EndTestResponse();
- }
- });
- }
-
- /**
- * 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(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("ActionRequestUseReader", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletURL url = response.createActionURL();
- url.setParameter("g_foo1", "g_bar1_1");
- url.setParameter("g_foo2", new String[]{"g_bar2_1", "g_bar2_2"});
- InvokePostResponse iur = new InvokePostResponse(url.toString());
- HttpRequest.Raw body = new HttpRequest.Raw();
- body.setBytes(byteContent);
- iur.setBody(body);
- iur.setContentType(InvokePostResponse.MULTIPART_FORM_DATA);
- return iur;
- }
- });
-
- seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws IOException
- {
- assertEquals(new String[]{"g_bar1_1"}, request.getParameterValues("g_foo1"));
- assertEquals(new String[]{"g_bar2_1", "g_bar2_2"}, request.getParameterValues("g_foo2"));
- assertEquals(InvokePostResponse.MULTIPART_FORM_DATA, request.getContentType());
- assertEquals(byteContent.length, request.getContentLength());
- Reader in = null;
- try
- {
- in = request.getReader();
- StringWriter out = new StringWriter();
- IOTools.copy(in, out);
- out.close();
- byte[] bytes = out.toString().getBytes("UTF-8");
- assertEquals(-1, in.read());
- assertEquals(byteContent, bytes);
- }
- catch (IllegalStateException e)
- {
- fail("Was not expecting an ISE");
- }
- catch (IOException e)
- {
- fail("Was not expecting an IOException");
- }
- finally
- {
- IOTools.safeClose(in);
- }
- try
- {
- request.getPortletInputStream();
- fail("The inputstream should not be available");
- }
- catch (IllegalStateException expected)
- {
- }
- }
- });
-
- seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new EndTestResponse();
- }
- });
- }
-
- /**
- * 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(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("RequestAttribute", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- // Take a snapshot of the attribute names
- Set snapshot = Tools.toSet(request.getAttributeNames());
-
- // Test that we can remove an attribute without affecting the incoming request, i.e
- // the same attribute will be present in other render request
- assertNotNull(request.getAttribute("javax.portlet.config"));
- request.removeAttribute("javax.portlet.config");
- assertNull(request.getAttribute("javax.portlet.config"));
-
- // Test addition of an attribute
- request.setAttribute("bar", "bar");
- assertEquals("bar", request.getAttribute("bar"));
-
- // Test the portlet request names are what we expect
- HashSet expectedNames = new HashSet(snapshot);
- expectedNames.remove("javax.portlet.config");
- expectedNames.add("bar");
- assertEquals(expectedNames, Tools.toSet(request.getAttributeNames()));
- return new EndTestResponse();
- }
- });
- }
-
- /**
- * 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(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("RequestAttributeScoping", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- assertNull(request.getAttribute("foo"));
- request.setAttribute("foo", "foo");
- return new EndTestResponse();
- }
- });
- }
-
- public void createRequestParameterCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("RequestParameter", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletURL url = response.createActionURL();
- url.setParameter("foo1", "bar1");
- url.setParameter("foo2", new String[]{"bar2_1", "bar2_2"});
- return new InvokeGetResponse(url.toString());
- }
- });
-
- seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
- {
- // The expected map
- Map expectedParameterMap = new HashMap();
- expectedParameterMap.put("foo1", Tools.toSet(new String[]{"bar1"}));
- expectedParameterMap.put("foo2", Tools.toSet(new String[]{"bar2_1", "bar2_2"}));
-
- // Transform the map to be comparable
- Map parameterMap = new HashMap(request.getParameterMap());
- for (Iterator i = parameterMap.entrySet().iterator(); i.hasNext();)
- {
- Map.Entry entry = (Map.Entry)i.next();
- String[] values = (String[])entry.getValue();
- entry.setValue(Tools.toSet(values));
- }
-
- // Compare both
- assertEquals(expectedParameterMap, parameterMap);
-
- //
- Set enumeration = Tools.toSet(request.getParameterNames());
- Set expectedEnumeration = Tools.toSet(new Object[]{"foo1", "foo2"});
- assertEquals(expectedEnumeration, enumeration);
- }
- });
-
- seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new EndTestResponse();
- }
- });
- }
-
-
- /** Show that we can access request headers from the portlet request properties. */
- public void createRequestHeaderAccess(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("RequestHeaderAccess", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- // Test the value is not there yet
- Set propertyNames = Tools.toSet(request.getPropertyNames());
- assertFalse(propertyNames.contains("myheader"));
- assertNull(request.getProperty("myheader"));
- assertFalse(request.getProperties("myheader").hasMoreElements());
-
- // Invoke render with header
- InvokeGetResponse render = new InvokeGetResponse(response.createRenderURL().toString());
- render.addHeader("myheader").addElement("render-value");
- return render;
- }
- });
-
- seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- // Test the header is here
- Set propertyNames = Tools.toSet(request.getPropertyNames());
- assertTrue(propertyNames.contains("myheader"));
- assertEquals("render-value", request.getProperty("myheader"));
- Enumeration values = request.getProperties("myheader");
- assertTrue(values.hasMoreElements());
- assertEquals("render-value", values.nextElement());
- assertFalse(values.hasMoreElements());
-
- // Invoke action with header
- InvokeGetResponse action = new InvokeGetResponse(response.createActionURL().toString());
- action.addHeader("myheader").addElement("action-value");
- return action;
- }
- });
-
- seq.addAction(2, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
- {
- // Test the header is here
- Set propertyNames = Tools.toSet(request.getPropertyNames());
- assertTrue(propertyNames.contains("myheader"));
- assertEquals("action-value", request.getProperty("myheader"));
- Enumeration values = request.getProperties("myheader");
- assertTrue(values.hasMoreElements());
- assertEquals("action-value", values.nextElement());
- assertFalse(values.hasMoreElements());
- }
- });
-
- seq.addAction(2, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new EndTestResponse();
- }
- });
- }
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/RequestAttributeScopingTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/RequestAttributeScopingTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/RequestAttributeScopingTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.portletrequests;
+
+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.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNull;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * 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.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class RequestAttributeScopingTestCase
+{
+ public RequestAttributeScopingTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ assertNull(request.getAttribute("foo"));
+ request.setAttribute("foo", "foo");
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/RequestAttributeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/RequestAttributeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/RequestAttributeTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,81 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.portletrequests;
+
+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.portlet.framework.UTP1;
+import org.jboss.portal.common.util.Tools;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNotNull;
+import static org.jboss.unit.api.Assert.assertNull;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * 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.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class RequestAttributeTestCase
+{
+ public RequestAttributeTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ // Take a snapshot of the attribute names
+ Set snapshot = Tools.toSet(request.getAttributeNames());
+
+ // Test that we can remove an attribute without affecting the incoming request, i.e
+ // the same attribute will be present in other render request
+ assertNotNull(request.getAttribute("javax.portlet.config"));
+ request.removeAttribute("javax.portlet.config");
+ assertNull(request.getAttribute("javax.portlet.config"));
+
+ // Test addition of an attribute
+ request.setAttribute("bar", "bar");
+ assertEquals("bar", request.getAttribute("bar"));
+
+ // Test the portlet request names are what we expect
+ HashSet expectedNames = new HashSet(snapshot);
+ expectedNames.remove("javax.portlet.config");
+ expectedNames.add("bar");
+ assertEquals(expectedNames, Tools.toSet(request.getAttributeNames()));
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/RequestHeaderAccessTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/RequestHeaderAccessTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/RequestHeaderAccessTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,119 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.portletrequests;
+
+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;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.common.util.Tools;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertFalse;
+import static org.jboss.unit.api.Assert.assertNull;
+import static org.jboss.unit.api.Assert.assertTrue;
+import static org.jboss.unit.api.Assert.assertEquals;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import java.util.Set;
+import java.util.Enumeration;
+
+/**
+ * Show that we can access request headers from the portlet request properties.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class RequestHeaderAccessTestCase
+{
+ public RequestHeaderAccessTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ // Test the value is not there yet
+ Set propertyNames = Tools.toSet(request.getPropertyNames());
+ assertFalse(propertyNames.contains("myheader"));
+ assertNull(request.getProperty("myheader"));
+ assertFalse(request.getProperties("myheader").hasMoreElements());
+
+ // Invoke render with header
+ InvokeGetResponse render = new InvokeGetResponse(response.createRenderURL().toString());
+ render.addHeader("myheader").addElement("render-value");
+ return render;
+ }
+ });
+
+ seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ // Test the header is here
+ Set propertyNames = Tools.toSet(request.getPropertyNames());
+ assertTrue(propertyNames.contains("myheader"));
+ assertEquals("render-value", request.getProperty("myheader"));
+ Enumeration values = request.getProperties("myheader");
+ assertTrue(values.hasMoreElements());
+ assertEquals("render-value", values.nextElement());
+ assertFalse(values.hasMoreElements());
+
+ // Invoke action with header
+ InvokeGetResponse action = new InvokeGetResponse(response.createActionURL().toString());
+ action.addHeader("myheader").addElement("action-value");
+ return action;
+ }
+ });
+
+ seq.addAction(2, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
+ {
+ // Test the header is here
+ Set propertyNames = Tools.toSet(request.getPropertyNames());
+ assertTrue(propertyNames.contains("myheader"));
+ assertEquals("action-value", request.getProperty("myheader"));
+ Enumeration values = request.getProperties("myheader");
+ assertTrue(values.hasMoreElements());
+ assertEquals("action-value", values.nextElement());
+ assertFalse(values.hasMoreElements());
+ }
+ });
+
+ seq.addAction(2, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/RequestParameterTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/RequestParameterTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletrequests/RequestParameterTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,104 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.portletrequests;
+
+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;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.common.util.Tools;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletURL;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class RequestParameterTestCase
+{
+ public RequestParameterTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletURL url = response.createActionURL();
+ url.setParameter("foo1", "bar1");
+ url.setParameter("foo2", new String[]{"bar2_1", "bar2_2"});
+ return new InvokeGetResponse(url.toString());
+ }
+ });
+
+ seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
+ {
+ // The expected map
+ Map expectedParameterMap = new HashMap();
+ expectedParameterMap.put("foo1", Tools.toSet(new String[]{"bar1"}));
+ expectedParameterMap.put("foo2", Tools.toSet(new String[]{"bar2_1", "bar2_2"}));
+
+ // Transform the map to be comparable
+ Map parameterMap = new HashMap(request.getParameterMap());
+ for (Iterator i = parameterMap.entrySet().iterator(); i.hasNext();)
+ {
+ Map.Entry entry = (Map.Entry)i.next();
+ String[] values = (String[])entry.getValue();
+ entry.setValue(Tools.toSet(values));
+ }
+
+ // Compare both
+ assertEquals(expectedParameterMap, parameterMap);
+
+ //
+ Set enumeration = Tools.toSet(request.getParameterNames());
+ Set expectedEnumeration = Tools.toSet(new Object[]{"foo1", "foo2"});
+ assertEquals(expectedEnumeration, enumeration);
+ }
+ });
+
+ seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletresponses/ContentTypeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletresponses/ContentTypeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletresponses/ContentTypeTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,62 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.portletresponses;
+
+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.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class ContentTypeTestCase
+{
+ public ContentTypeTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ String responseContentType = request.getResponseContentType();
+ response.setContentType(responseContentType);
+ assertEquals(responseContentType, response.getContentType());
+
+ // Test that character encoding is ignored as specified by the spec in PLT.12.3.1
+ response.setContentType(responseContentType + "; charset=UTF-8");
+ assertEquals(responseContentType, response.getContentType());
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletresponses/PortletResponsesSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletresponses/PortletResponsesSequenceBuilder.java 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/portletresponses/PortletResponsesSequenceBuilder.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -1,67 +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.portlet.jsr168.ext.portletresponses;
-
-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;
-import org.jboss.unit.driver.response.EndTestResponse;
-import org.jboss.unit.driver.DriverResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.Portlet;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class PortletResponsesSequenceBuilder extends PortletTestSuite
-{
- public void createContentTypeCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("ContentType", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- String responseContentType = request.getResponseContentType();
- response.setContentType(responseContentType);
- assertEquals(responseContentType, response.getContentType());
-
- // Test that character encoding is ignored as specified by the spec in PLT.12.3.1
- response.setContentType(responseContentType + "; charset=UTF-8");
- assertEquals(responseContentType, response.getContentType());
- return new EndTestResponse();
- }
- });
- }
-
-
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/IsReadOnlyTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/IsReadOnlyTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/IsReadOnlyTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,89 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.preferences;
+
+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;
+import org.jboss.portal.test.portlet.framework.UTP2;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletPreferences;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+
+/**
+ * Asserts that isReadOnly() returns correct values during both render and action phase.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class IsReadOnlyTestCase
+{
+ public IsReadOnlyTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP2.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ // Get prefs
+ PortletPreferences prefs = request.getPreferences();
+
+ //assert that isReadOnly returns correct values
+ assertEquals(true, prefs.isReadOnly("static_single_pref"));
+ assertEquals(false, prefs.isReadOnly("static_multi_pref"));
+ return new InvokeGetResponse(response.createActionURL().toString());
+ }
+ });
+
+ seq.addAction(1, UTP2.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
+ {
+ // Get prefs
+ PortletPreferences prefs = request.getPreferences();
+
+ //assert that isReadOnly returns correct values
+ assertEquals(true, prefs.isReadOnly("static_single_pref"));
+ assertEquals(false, prefs.isReadOnly("static_multi_pref"));
+ }
+ });
+
+ seq.addAction(1, UTP2.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/MapTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/MapTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/MapTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,117 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.preferences;
+
+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;
+import org.jboss.portal.test.portlet.framework.UTP3;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+import static org.jboss.unit.api.Assert.assertTrue;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.ReadOnlyException;
+import javax.portlet.PortletPreferences;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class MapTestCase
+{
+ public MapTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP3.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new InvokeGetResponse(response.createActionURL().toString());
+ }
+ });
+
+ seq.addAction(1, UTP3.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws ReadOnlyException
+ {
+ // Get prefs map
+ PortletPreferences prefs = request.getPreferences();
+ Map map = prefs.getMap();
+
+ //
+ assertEquals(2, map.size());
+ assertTrue(map.containsKey("single_pref"));
+ assertTrue(map.containsValue(new String[]{"single_pref_value"}));
+ assertEquals(new String[]{"single_pref_value"}, (Object[])map.get("single_pref"));
+ assertTrue(map.containsKey("multi_pref"));
+ assertTrue(map.containsValue(new String[]{"multi_pref_value_1", "multi_pref_value_2"}));
+ assertEquals(new String[]{"multi_pref_value_1", "multi_pref_value_2"}, (Object[])map.get("multi_pref"));
+
+ // Modify prefs
+ prefs.setValue("single_pref", "new_single_pref_value");
+ prefs.setValues("multi_pref", new String[]{"new_multi_pref_value_1", "new_multi_pref_value_2"});
+
+ //
+ map = prefs.getMap();
+ assertEquals(2, map.size());
+ assertTrue(map.containsKey("single_pref"));
+ assertTrue(map.containsValue(new String[]{"new_single_pref_value"}));
+ assertEquals(new String[]{"new_single_pref_value"}, (Object[])map.get("single_pref"));
+ assertTrue(map.containsKey("multi_pref"));
+ assertTrue(map.containsValue(new String[]{"new_multi_pref_value_1", "new_multi_pref_value_2"}));
+ assertEquals(new String[]{"new_multi_pref_value_1", "new_multi_pref_value_2"}, (Object[])map.get("multi_pref"));
+
+ // Modify prefs
+ prefs.setValue("single_pref", null);
+ prefs.setValues("multi_pref", null);
+
+ //
+ map = prefs.getMap();
+ assertEquals(2, map.size());
+ assertTrue(map.containsKey("single_pref"));
+ assertTrue(map.containsValue(new String[]{null}));
+ assertEquals(new String[]{null}, (Object[])map.get("single_pref"));
+ assertTrue(map.containsKey("multi_pref"));
+ assertEquals(new String[]{null}, (Object[])map.get("multi_pref"));
+ }
+ });
+
+ seq.addAction(1, UTP3.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/PreferencesSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/PreferencesSequenceBuilder.java 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/PreferencesSequenceBuilder.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -1,242 +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.portlet.jsr168.ext.preferences;
-
-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;
-import org.jboss.portal.test.portlet.framework.UTP2;
-import org.jboss.portal.test.portlet.framework.UTP4;
-import org.jboss.portal.test.portlet.framework.UTP3;
-import org.jboss.unit.driver.response.EndTestResponse;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import javax.portlet.Portlet;
-import javax.portlet.PortletPreferences;
-import javax.portlet.PortletURL;
-import javax.portlet.ReadOnlyException;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.portlet.ValidatorException;
-import java.io.IOException;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class PreferencesSequenceBuilder extends PortletTestSuite
-{
-
- /**
- * Asserts that isReadOnly() returns correct values during both render and action phase
- *
- * @param registry
- */
- public void createIsReadOnlyCase(PortletTestDriver registry)
- {
- 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)
- {
- // Get prefs
- PortletPreferences prefs = request.getPreferences();
-
- //assert that isReadOnly returns correct values
- assertEquals(true, prefs.isReadOnly("static_single_pref"));
- assertEquals(false, prefs.isReadOnly("static_multi_pref"));
- return new InvokeGetResponse(response.createActionURL().toString());
- }
- });
-
- seq.addAction(1, UTP2.ACTION_JOINPOINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
- {
- // Get prefs
- PortletPreferences prefs = request.getPreferences();
-
- //assert that isReadOnly returns correct values
- assertEquals(true, prefs.isReadOnly("static_single_pref"));
- assertEquals(false, prefs.isReadOnly("static_multi_pref"));
- }
- });
-
- seq.addAction(1, UTP2.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new EndTestResponse();
- }
- });
- }
-
- public void createStoreMustPersistAllChangesCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("StoreMustPersistAllChanges", seq);
- seq.addAction(0, UTP4.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletURL url = response.createActionURL();
- return new InvokeGetResponse(url.toString());
- }
- });
-
- seq.addAction(1, UTP4.ACTION_JOINPOINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws ReadOnlyException, IOException, ValidatorException
- {
- // Get prefs
- PortletPreferences prefs = request.getPreferences();
-
- // Check the initial value are good
- assertEquals("static_single_pref_value", prefs.getValue("static_single_pref", "other"));
- assertEquals(new String[]{"static_multi_pref_value_1", "static_multi_pref_value_2"}, prefs.getValues("static_multi_pref", new String[]{"other"}));
- assertEquals("other", prefs.getValue("dynamic_single_pref", "other"));
- assertEquals(new String[]{"other"}, prefs.getValues("dynamic_multi_pref", new String[]{"other"}));
-
- // Set values
- prefs.setValue("static_single_pref", "new_static_single_pref_value");
- prefs.setValues("static_multi_pref", new String[]{"new_static_multi_pref_value_1", "new_static_multi_pref_value_2"});
- prefs.setValue("dynamic_single_pref", "new_dynamic_single_pref_value");
- prefs.setValues("dynamic_multi_pref", new String[]{"new_dynamic_multi_pref_value_1", "new_dynamic_multi_pref_value_2"});
-
- // Store
- prefs.store();
- }
- });
-
- seq.addAction(1, UTP4.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new InvokeGetResponse(response.createActionURL().toString());
- }
- });
-
- seq.addAction(2, UTP4.ACTION_JOINPOINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
- {
- // Get prefs
- PortletPreferences prefs = request.getPreferences();
-
- // Check the new value are good
- assertEquals("new_static_single_pref_value", prefs.getValue("static_single_pref", "other"));
- assertEquals(new String[]{"new_static_multi_pref_value_1", "new_static_multi_pref_value_2"}, prefs.getValues("static_multi_pref", new String[]{"other"}));
- assertEquals("new_dynamic_single_pref_value", prefs.getValue("dynamic_single_pref", "other"));
- assertEquals(new String[]{"new_dynamic_multi_pref_value_1", "new_dynamic_multi_pref_value_2"}, prefs.getValues("dynamic_multi_pref", new String[]{"other"}));
- }
- });
-
- seq.addAction(2, UTP4.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new EndTestResponse();
- }
- });
- }
-
- public void createMapCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Map", seq);
-
- seq.addAction(0, UTP3.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new InvokeGetResponse(response.createActionURL().toString());
- }
- });
-
- seq.addAction(1, UTP3.ACTION_JOINPOINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws ReadOnlyException
- {
- // Get prefs map
- PortletPreferences prefs = request.getPreferences();
- Map map = prefs.getMap();
-
- //
- assertEquals(2, map.size());
- assertTrue(map.containsKey("single_pref"));
- assertTrue(map.containsValue(new String[]{"single_pref_value"}));
- assertEquals(new String[]{"single_pref_value"}, (Object[])map.get("single_pref"));
- assertTrue(map.containsKey("multi_pref"));
- assertTrue(map.containsValue(new String[]{"multi_pref_value_1", "multi_pref_value_2"}));
- assertEquals(new String[]{"multi_pref_value_1", "multi_pref_value_2"}, (Object[])map.get("multi_pref"));
-
- // Modify prefs
- prefs.setValue("single_pref", "new_single_pref_value");
- prefs.setValues("multi_pref", new String[]{"new_multi_pref_value_1", "new_multi_pref_value_2"});
-
- //
- map = prefs.getMap();
- assertEquals(2, map.size());
- assertTrue(map.containsKey("single_pref"));
- assertTrue(map.containsValue(new String[]{"new_single_pref_value"}));
- assertEquals(new String[]{"new_single_pref_value"}, (Object[])map.get("single_pref"));
- assertTrue(map.containsKey("multi_pref"));
- assertTrue(map.containsValue(new String[]{"new_multi_pref_value_1", "new_multi_pref_value_2"}));
- assertEquals(new String[]{"new_multi_pref_value_1", "new_multi_pref_value_2"}, (Object[])map.get("multi_pref"));
-
- // Modify prefs
- prefs.setValue("single_pref", null);
- prefs.setValues("multi_pref", null);
-
- //
- map = prefs.getMap();
- assertEquals(2, map.size());
- assertTrue(map.containsKey("single_pref"));
- assertTrue(map.containsValue(new String[]{null}));
- assertEquals(new String[]{null}, (Object[])map.get("single_pref"));
- assertTrue(map.containsKey("multi_pref"));
- assertEquals(new String[]{null}, (Object[])map.get("multi_pref"));
- }
- });
-
- seq.addAction(1, UTP3.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new EndTestResponse();
- }
- });
- }
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/StoreMustPersistAllChangesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/StoreMustPersistAllChangesTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/preferences/StoreMustPersistAllChangesTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,120 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.preferences;
+
+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;
+import org.jboss.portal.test.portlet.framework.UTP4;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletURL;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.ReadOnlyException;
+import javax.portlet.ValidatorException;
+import javax.portlet.PortletPreferences;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class StoreMustPersistAllChangesTestCase
+{
+ public StoreMustPersistAllChangesTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP4.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletURL url = response.createActionURL();
+ return new InvokeGetResponse(url.toString());
+ }
+ });
+
+ seq.addAction(1, UTP4.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws ReadOnlyException, IOException, ValidatorException
+ {
+ // Get prefs
+ PortletPreferences prefs = request.getPreferences();
+
+ // Check the initial value are good
+ assertEquals("static_single_pref_value", prefs.getValue("static_single_pref", "other"));
+ assertEquals(new String[]{"static_multi_pref_value_1", "static_multi_pref_value_2"}, prefs.getValues("static_multi_pref", new String[]{"other"}));
+ assertEquals("other", prefs.getValue("dynamic_single_pref", "other"));
+ assertEquals(new String[]{"other"}, prefs.getValues("dynamic_multi_pref", new String[]{"other"}));
+
+ // Set values
+ prefs.setValue("static_single_pref", "new_static_single_pref_value");
+ prefs.setValues("static_multi_pref", new String[]{"new_static_multi_pref_value_1", "new_static_multi_pref_value_2"});
+ prefs.setValue("dynamic_single_pref", "new_dynamic_single_pref_value");
+ prefs.setValues("dynamic_multi_pref", new String[]{"new_dynamic_multi_pref_value_1", "new_dynamic_multi_pref_value_2"});
+
+ // Store
+ prefs.store();
+ }
+ });
+
+ seq.addAction(1, UTP4.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new InvokeGetResponse(response.createActionURL().toString());
+ }
+ });
+
+ seq.addAction(2, UTP4.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
+ {
+ // Get prefs
+ PortletPreferences prefs = request.getPreferences();
+
+ // Check the new value are good
+ assertEquals("new_static_single_pref_value", prefs.getValue("static_single_pref", "other"));
+ assertEquals(new String[]{"new_static_multi_pref_value_1", "new_static_multi_pref_value_2"}, prefs.getValues("static_multi_pref", new String[]{"other"}));
+ assertEquals("new_dynamic_single_pref_value", prefs.getValue("dynamic_single_pref", "other"));
+ assertEquals(new String[]{"new_dynamic_multi_pref_value_1", "new_dynamic_multi_pref_value_2"}, prefs.getValues("dynamic_multi_pref", new String[]{"other"}));
+ }
+ });
+
+ seq.addAction(2, UTP4.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/CrossContextSessionAttributeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/CrossContextSessionAttributeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/CrossContextSessionAttributeTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,90 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.session;
+
+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.ServletServiceTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.test.portlet.framework.UTS1;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletSession;
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.IOException;
+
+/**
+ * The goal is to test that cross context session attributes are set in container and are accessible from the direct
+ * servlet.
+ * <p/>
+ * 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
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class CrossContextSessionAttributeTestCase
+{
+ public CrossContextSessionAttributeTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletSession session = request.getPortletSession();
+ session.setAttribute("key", "value", PortletSession.APPLICATION_SCOPE);
+ String path = request.getContextPath();
+ InvokeGetResponse igr = new InvokeGetResponse(path + "/universalServletA");
+ return igr;
+ }
+ });
+
+ /**
+ * This servlet is normally accessed after that the CrossContextSessionAttributePortlet asked
+ * the client to do it. This portlet should have put in the session an attribute that this servlet
+ * will assert the presence of.
+ */
+ seq.addAction(1, UTS1.SERVICE_JOINPOINT, new ServletServiceTestAction()
+ {
+ protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
+ {
+ HttpSession session = request.getSession();
+ assertEquals("value", session.getAttribute("key"));
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/ObtainNonNullSessionUsingCreateEqualsFalseTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/ObtainNonNullSessionUsingCreateEqualsFalseTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/ObtainNonNullSessionUsingCreateEqualsFalseTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,89 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.session;
+
+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;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNotNull;
+import static org.jboss.unit.api.Assert.assertEquals;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletSession;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletSecurityException;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class ObtainNonNullSessionUsingCreateEqualsFalseTestCase
+{
+ public ObtainNonNullSessionUsingCreateEqualsFalseTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletSession session = request.getPortletSession();
+ assertNotNull(session);
+ session.setAttribute("foo_1", "bar_1");
+ InvokeGetResponse igr = new InvokeGetResponse(response.createActionURL().toString());
+ return igr;
+ }
+ });
+ seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, PortletSecurityException, IOException
+ {
+ PortletSession session = request.getPortletSession(false);
+ assertNotNull(session);
+ assertEquals("bar_1", session.getAttribute("foo_1"));
+ session.setAttribute("foo_2", "bar_2");
+ }
+ });
+ seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletSession session = request.getPortletSession(false);
+ assertNotNull(session);
+ assertEquals("bar_1", session.getAttribute("foo_1"));
+ assertEquals("bar_2", session.getAttribute("foo_2"));
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/SessionDoesNotExistBeforeItIsRequestedTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/SessionDoesNotExistBeforeItIsRequestedTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/SessionDoesNotExistBeforeItIsRequestedTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * 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.portlet.jsr168.ext.session;
+
+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.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNull;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletSession;
+
+/**
+ * Test that a session does not exist the first time the portlet is accessed.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class SessionDoesNotExistBeforeItIsRequestedTestCase
+{
+ public SessionDoesNotExistBeforeItIsRequestedTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletSession session = request.getPortletSession(false);
+ assertNull(session);
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/SessionSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/SessionSequenceBuilder.java 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/ext/session/SessionSequenceBuilder.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -1,166 +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.portlet.jsr168.ext.session;
-
-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;
-import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
-import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import javax.portlet.Portlet;
-import javax.portlet.PortletException;
-import javax.portlet.PortletSecurityException;
-import javax.portlet.PortletSession;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.servlet.Servlet;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-import java.io.IOException;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class SessionSequenceBuilder extends PortletTestSuite
-{
-
- /**
- * Test that a session does not exist the first time the portlet is accessed.
- *
- * @param registry
- */
- public void createSessionDoesNotExistBeforeItIsRequested(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("SessionDoesNotExistBeforeItIsRequested", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletSession session = request.getPortletSession(false);
- assertNull(session);
- return new EndTestResponse();
- }
- });
- }
-
- /**
- * .
- *
- * @param registry
- */
- public void createObtainNonNullSessionUsingCreateEqualsFalse(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("ObtainNonNullSessionUsingCreateEqualsFalse", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletSession session = request.getPortletSession();
- assertNotNull(session);
- session.setAttribute("foo_1", "bar_1");
- InvokeGetResponse igr = new InvokeGetResponse(response.createActionURL().toString());
- return igr;
- }
- });
- seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, PortletSecurityException, IOException
- {
- PortletSession session = request.getPortletSession(false);
- assertNotNull(session);
- assertEquals("bar_1", session.getAttribute("foo_1"));
- session.setAttribute("foo_2", "bar_2");
- }
- });
- seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletSession session = request.getPortletSession(false);
- assertNotNull(session);
- assertEquals("bar_1", session.getAttribute("foo_1"));
- assertEquals("bar_2", session.getAttribute("foo_2"));
- return new EndTestResponse();
- }
- });
- }
-
- /**
- * The goal is to test that cross context session attributes are set in container and are accessible from the direct
- * servlet.
- * <p/>
- * 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(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("CrossContextSessionAttribute", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletSession session = request.getPortletSession();
- session.setAttribute("key", "value", PortletSession.APPLICATION_SCOPE);
- String path = request.getContextPath();
- InvokeGetResponse igr = new InvokeGetResponse(path + "/universalServletA");
- return igr;
- }
- });
-
- /**
- * This servlet is normally accessed after that the CrossContextSessionAttributePortlet asked
- * the client to do it. This portlet should have put in the session an attribute that this servlet
- * will assert the presence of.
- */
- seq.addAction(1, UTS1.SERVICE_JOINPOINT, new ServletServiceTestAction()
- {
- protected DriverResponse run(Servlet servlet, HttpServletRequest request, HttpServletResponse response, PortletTestContext context) throws ServletException, IOException
- {
- HttpSession session = request.getSession();
- assertEquals("value", session.getAttribute("key"));
- return new EndTestResponse();
- }
- });
-
-
- }
-
-}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/misc/log4j/Log4jSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/misc/log4j/Log4jSequenceBuilder.java 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/misc/log4j/Log4jSequenceBuilder.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -1,61 +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.portlet.jsr168.misc.log4j;
-
-import org.apache.log4j.Logger;
-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.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.Portlet;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 5113 $
- */
-public class Log4jSequenceBuilder extends PortletTestSuite
-{
- public void createLog4j(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("TestLog4j", seq);
- seq.addAction(0, LoggingPortlet.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- Logger logger = ((LoggingPortlet)portlet).getLogger();
- assertNotNull(logger);
- assertTrue("Logger is an instance of " + logger.getClass().getName() + " instead of " + CustomLogger.class.getName(), logger instanceof CustomLogger);
- return new EndTestResponse();
- }
- });
- }
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/misc/log4j/TestLog4jTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/misc/log4j/TestLog4jTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/misc/log4j/TestLog4jTestCase.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * 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.portlet.jsr168.misc.log4j;
+
+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.unit.annotations.TestCase;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNotNull;
+import static org.jboss.unit.api.Assert.assertTrue;
+import org.apache.log4j.Logger;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+@TestCase
+public class TestLog4jTestCase
+{
+ public TestLog4jTestCase(PortletTest seq)
+ {
+ seq.addAction(0, LoggingPortlet.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ Logger logger = ((LoggingPortlet)portlet).getLogger();
+ assertNotNull(logger);
+ assertTrue("Logger is an instance of " + logger.getClass().getName() + " instead of " + CustomLogger.class.getName(), logger instanceof CustomLogger);
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletconfig/PortletConfigSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletconfig/PortletConfigSequenceBuilder.java 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletconfig/PortletConfigSequenceBuilder.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -1,67 +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.portlet.jsr168.tck.portletconfig;
-
-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;
-import org.jboss.portal.test.portlet.jsr168.tck.portletconfig.spec.InlineValuesNotInResourceBundlePortlet;
-import org.jboss.portal.test.portlet.jsr168.tck.portletconfig.spec.InlineValuesWithNoResourceBundleDefinedPortlet;
-import org.jboss.unit.driver.response.EndTestResponse;
-import org.jboss.unit.driver.DriverResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.Portlet;
-import javax.portlet.PortletConfig;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class PortletConfigSequenceBuilder extends PortletTestSuite
-{
- public void createInlineValuesNotInResourceBundle(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("InlineValuesNotInResourceBundle", seq);
-
- }
-
- public void createInlineValuesWithNoResourceBundleDefined(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("InlineValuesWithNoResourceBundleDefined", seq);
-
- }
-
-
-}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/PortletContextSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/PortletContextSequenceBuilder.java 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/PortletContextSequenceBuilder.java 2007-11-07 20:12:31 UTC (rev 8843)
@@ -1,76 +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.portlet.jsr168.tck.portletcontext;
-
-import org.jboss.portal.common.util.Tools;
-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;
-import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
-import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestServlet;
-import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.Portlet;
-import javax.portlet.PortletException;
-import javax.portlet.PortletRequestDispatcher;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.servlet.Servlet;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.List;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class PortletContextSequenceBuilder extends PortletTestSuite
-{
-
-
- /**
- * @portlet.specification assert="SPEC:46 - "
- */
- public void createTempDirCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("TempDir", seq);
- }
-
-
-}
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/dispatcher-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/dispatcher-war/WEB-INF/web.xml 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/dispatcher-war/WEB-INF/web.xml 2007-11-07 20:12:31 UTC (rev 8843)
@@ -149,7 +149,7 @@
</filter-mapping>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.ext.dispatcher.DispatcherSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
<servlet>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/expiringcache-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/expiringcache-war/WEB-INF/web.xml 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/expiringcache-war/WEB-INF/web.xml 2007-11-07 20:12:31 UTC (rev 8843)
@@ -28,7 +28,7 @@
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.ext.expiringcache.ExpiringCacheSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/neverexpiringcache-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/neverexpiringcache-war/WEB-INF/web.xml 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/neverexpiringcache-war/WEB-INF/web.xml 2007-11-07 20:12:31 UTC (rev 8843)
@@ -28,7 +28,7 @@
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.ext.neverexpiringcache.NeverExpiringCacheSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/nocache-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/nocache-war/WEB-INF/web.xml 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/nocache-war/WEB-INF/web.xml 2007-11-07 20:12:31 UTC (rev 8843)
@@ -28,7 +28,7 @@
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.ext.nocache.NoCacheSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/portletconfig-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/portletconfig-war/WEB-INF/web.xml 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/portletconfig-war/WEB-INF/web.xml 2007-11-07 20:12:31 UTC (rev 8843)
@@ -27,6 +27,6 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.ext.portletconfig.PortletConfigSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/portletmode-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/portletmode-war/WEB-INF/web.xml 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/portletmode-war/WEB-INF/web.xml 2007-11-07 20:12:31 UTC (rev 8843)
@@ -27,6 +27,6 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.ext.portletmode.PortletModeSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/portletrequests-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/portletrequests-war/WEB-INF/web.xml 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/portletrequests-war/WEB-INF/web.xml 2007-11-07 20:12:31 UTC (rev 8843)
@@ -27,6 +27,6 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.ext.portletrequests.PortletRequestsSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/portletresponses-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/portletresponses-war/WEB-INF/web.xml 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/portletresponses-war/WEB-INF/web.xml 2007-11-07 20:12:31 UTC (rev 8843)
@@ -28,7 +28,7 @@
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.ext.portletresponses.PortletResponsesSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/preferences-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/preferences-war/WEB-INF/web.xml 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/preferences-war/WEB-INF/web.xml 2007-11-07 20:12:31 UTC (rev 8843)
@@ -27,6 +27,6 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.ext.preferences.PreferencesSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/session-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/session-war/WEB-INF/web.xml 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/ext/session-war/WEB-INF/web.xml 2007-11-07 20:12:31 UTC (rev 8843)
@@ -28,7 +28,7 @@
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.ext.session.SessionSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
<servlet>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/misc/log4j-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/misc/log4j-war/WEB-INF/web.xml 2007-11-07 20:09:52 UTC (rev 8842)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/misc/log4j-war/WEB-INF/web.xml 2007-11-07 20:12:31 UTC (rev 8843)
@@ -28,7 +28,7 @@
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.misc.log4j.Log4jSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
18 years, 6 months
JBoss Portal SVN: r8842 - in modules/test/trunk: mc and 6 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-11-07 15:09:52 -0500 (Wed, 07 Nov 2007)
New Revision: 8842
Modified:
modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml
modules/test/trunk/mc/build.xml
modules/test/trunk/mc/pom.xml
modules/test/trunk/mc/src/test/java/org/jboss/test/unit/mc/MCTestLifeCycleTests.java
modules/test/trunk/remote/build.xml
modules/test/trunk/remote/pom.xml
modules/test/trunk/remote/src/test/java/org/jboss/test/AllTests.java
modules/test/trunk/unit/build.xml
modules/test/trunk/unit/pom.xml
modules/test/trunk/unit/src/test/java/org/jboss/test/unit/AllTests.java
modules/test/trunk/unit/src/test/java/org/jboss/test/unit/TestIdTests.java
modules/test/trunk/unit/src/test/java/org/jboss/test/unit/sample/SampleTests.java
Log:
setup current tests in maven
Modified: modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml
===================================================================
--- modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml 2007-11-07 19:02:05 UTC (rev 8841)
+++ modules/test/trunk/build/ide/intellij/idea60/modules/unit/unit.iml 2007-11-07 20:09:52 UTC (rev 8842)
@@ -14,6 +14,15 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../thirdparty/junit/lib/junit.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified: modules/test/trunk/mc/build.xml
===================================================================
--- modules/test/trunk/mc/build.xml 2007-11-07 19:02:05 UTC (rev 8841)
+++ modules/test/trunk/mc/build.xml 2007-11-07 20:09:52 UTC (rev 8842)
@@ -85,6 +85,7 @@
<!-- Configure thirdparty libraries -->
&libraries;
<path id="library.classpath">
+ <path refid="junit.junit.classpath"/>
<path refid="apache.log4j.classpath"/>
<path refid="jboss.microcontainer.classpath"/>
<path refid="jboss/common.core.classpath"/>
@@ -224,6 +225,7 @@
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=7878,server=y,suspend=y"/>
-->
<classpath>
+ <path refid="junit.junit.classpath"/>
<path location="${build.lib}/jboss-unit-mc-lib.jar"/>
<path location="${build.lib}/jboss-unit-mc-test.jar"/>
Modified: modules/test/trunk/mc/pom.xml
===================================================================
--- modules/test/trunk/mc/pom.xml 2007-11-07 19:02:05 UTC (rev 8841)
+++ modules/test/trunk/mc/pom.xml 2007-11-07 20:09:52 UTC (rev 8842)
@@ -19,25 +19,30 @@
<groupId>org.jboss.microcontainer</groupId>
<artifactId>jboss-kernel</artifactId>
</dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
</dependencies>
- <!--<build>-->
- <!--<plugins>-->
- <!--<plugin>-->
- <!--<groupId>org.apache.maven.plugins</groupId>-->
- <!--<artifactId>maven-surefire-plugin</artifactId>-->
- <!--<configuration>-->
- <!--<skip>false</skip>-->
- <!--<includes>-->
- <!--<include>**/*Tests.java</include>-->
- <!--</includes>-->
- <!--</configuration>-->
- <!--</plugin>-->
- <!--</plugins>-->
- <!--</build>-->
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>false</skip>
+ <includes>
+ <include>**/*Tests.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
<properties>
</properties>
+
</project>
Modified: modules/test/trunk/mc/src/test/java/org/jboss/test/unit/mc/MCTestLifeCycleTests.java
===================================================================
--- modules/test/trunk/mc/src/test/java/org/jboss/test/unit/mc/MCTestLifeCycleTests.java 2007-11-07 19:02:05 UTC (rev 8841)
+++ modules/test/trunk/mc/src/test/java/org/jboss/test/unit/mc/MCTestLifeCycleTests.java 2007-11-07 20:09:52 UTC (rev 8842)
@@ -22,23 +22,23 @@
******************************************************************************/
package org.jboss.test.unit.mc;
-import org.jboss.unit.driver.impl.pojo.POJOTestSuiteDriver;
+import junit.framework.TestCase;
import org.jboss.unit.TestId;
import org.jboss.unit.driver.command.StartTestCommand;
+import org.jboss.unit.driver.impl.pojo.POJOTestSuiteDriver;
+import java.util.HashMap;
import java.util.Map;
-import java.util.HashMap;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class MCTestLifeCycleTests
+public class MCTestLifeCycleTests extends TestCase
{
- public static void main(String[] args) throws Exception
+ public void testAll() throws Exception
{
-
POJOTestSuiteDriver driver = new POJOTestSuiteDriver(SomeTest.class);
Map<String,String> parametrization = new HashMap<String, String>();
@@ -47,4 +47,11 @@
driver.invoke(new TestId("myTest"), new StartTestCommand(parametrization));
}
+ public static void main(String[] args) throws Exception
+ {
+
+ MCTestLifeCycleTests tests = new MCTestLifeCycleTests();
+ tests.testAll();
+ }
+
}
Modified: modules/test/trunk/remote/build.xml
===================================================================
--- modules/test/trunk/remote/build.xml 2007-11-07 19:02:05 UTC (rev 8841)
+++ modules/test/trunk/remote/build.xml 2007-11-07 20:09:52 UTC (rev 8842)
@@ -85,6 +85,7 @@
<!-- Configure thirdparty libraries -->
&libraries;
<path id="library.classpath">
+ <path refid="junit.junit.classpath"/>
<path refid="jboss.portal/modules/common.classpath"/>
<path refid="apache.log4j.classpath"/>
@@ -227,6 +228,7 @@
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=7878,server=y,suspend=y"/>
-->
<classpath>
+ <path refid="junit.junit.classpath"/>
<path location="${build.lib}/jboss-unit-lib.jar"/>
<path location="${build.lib}/jboss-unit-test.jar"/>
<path location="${build.resources}/test"/>
Modified: modules/test/trunk/remote/pom.xml
===================================================================
--- modules/test/trunk/remote/pom.xml 2007-11-07 19:02:05 UTC (rev 8841)
+++ modules/test/trunk/remote/pom.xml 2007-11-07 20:09:52 UTC (rev 8842)
@@ -31,8 +31,27 @@
<groupId>org.jboss.microcontainer</groupId>
<artifactId>jboss-kernel</artifactId>
</dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>false</skip>
+ <includes>
+ <include>**/*Tests.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
<properties>
</properties>
Modified: modules/test/trunk/remote/src/test/java/org/jboss/test/AllTests.java
===================================================================
--- modules/test/trunk/remote/src/test/java/org/jboss/test/AllTests.java 2007-11-07 19:02:05 UTC (rev 8841)
+++ modules/test/trunk/remote/src/test/java/org/jboss/test/AllTests.java 2007-11-07 20:09:52 UTC (rev 8842)
@@ -22,16 +22,24 @@
******************************************************************************/
package org.jboss.test;
+import junit.framework.TestCase;
+
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class AllTests
+public class AllTests extends TestCase
{
- public static void main(String[] args)
+ public void testAll() throws Exception
{
-
+
}
+ public static void main(String[] args) throws Exception
+ {
+ AllTests tests = new AllTests();
+ tests.testAll();
+ }
+
}
Modified: modules/test/trunk/unit/build.xml
===================================================================
--- modules/test/trunk/unit/build.xml 2007-11-07 19:02:05 UTC (rev 8841)
+++ modules/test/trunk/unit/build.xml 2007-11-07 20:09:52 UTC (rev 8842)
@@ -85,7 +85,7 @@
<!-- Configure thirdparty libraries -->
&libraries;
<path id="library.classpath">
-
+ <path refid="junit.junit.classpath"/>
</path>
<!-- Configure modules -->
@@ -217,6 +217,7 @@
-->
<classpath>
+ <path refid="junit.junit.classpath"/>
<path location="${build.lib}/jboss-unit-lib.jar"/>
<path location="${build.lib}/jboss-unit-test.jar"/>
<path location="${build.resources}/test"/>
Modified: modules/test/trunk/unit/pom.xml
===================================================================
--- modules/test/trunk/unit/pom.xml 2007-11-07 19:02:05 UTC (rev 8841)
+++ modules/test/trunk/unit/pom.xml 2007-11-07 20:09:52 UTC (rev 8842)
@@ -10,8 +10,30 @@
<packaging>jar</packaging>
<name>JBoss Unit</name>
- <dependencies/>
+ <dependencies>
+ <dependency>
+ <artifactId>junit</artifactId>
+ <groupId>junit</groupId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ <includes>
+ <include>**/TestIdTests.java</include>
+ <include>**/AllTests.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+
<properties>
</properties>
Modified: modules/test/trunk/unit/src/test/java/org/jboss/test/unit/AllTests.java
===================================================================
--- modules/test/trunk/unit/src/test/java/org/jboss/test/unit/AllTests.java 2007-11-07 19:02:05 UTC (rev 8841)
+++ modules/test/trunk/unit/src/test/java/org/jboss/test/unit/AllTests.java 2007-11-07 20:09:52 UTC (rev 8842)
@@ -22,28 +22,22 @@
******************************************************************************/
package org.jboss.test.unit;
-import org.jboss.test.unit.api.AssertTests;
+import junit.framework.TestCase;
import org.jboss.test.unit.sample.SampleTests;
-import org.jboss.test.unit.pojo.AbstractPOJOTests;
-import org.jboss.test.unit.pojo.junit.JUnitPOJOTests;
-import org.jboss.test.unit.report.junit.JUnitReporterTests;
-import org.jboss.test.unit.runner.CompositeTestRunnerTests;
-import org.jboss.test.unit.runner.ParametrizationTests;
-import org.jboss.test.unit.runner.TestDriverRunnerTests;
-import org.jboss.test.unit.runner.GenericTestRunnerTests;
-import org.jboss.test.unit.runner.POJOTestRunnerTests;
-import org.jboss.test.unit.runner.event.TestRunnerEventBroadcasterSupportTests;
-import org.jboss.test.unit.runner.event.TestRunnerLifeCycleFilterTests;
-import org.jboss.test.unit.runner.model.ModelTests;
-import org.jboss.test.unit.info.InfoTests;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class AllTests
+public class AllTests extends TestCase
{
+ public void testAll() throws Exception
+ {
+ SampleTests.test1();
+ //SampleTests.test2();
+ }
+
public static void main(String[] args) throws Exception
{
// AssertTests.main(args);
@@ -67,7 +61,8 @@
// InfoTests.main(args);
//
- SampleTests.main(args);
+ AllTests allTests = new AllTests();
+ allTests.testAll();
//
// JUnitReporterTests.main(args);
Modified: modules/test/trunk/unit/src/test/java/org/jboss/test/unit/TestIdTests.java
===================================================================
--- modules/test/trunk/unit/src/test/java/org/jboss/test/unit/TestIdTests.java 2007-11-07 19:02:05 UTC (rev 8841)
+++ modules/test/trunk/unit/src/test/java/org/jboss/test/unit/TestIdTests.java 2007-11-07 20:09:52 UTC (rev 8842)
@@ -22,24 +22,24 @@
******************************************************************************/
package org.jboss.test.unit;
+import junit.framework.TestCase;
import org.jboss.unit.TestId;
+import static org.jboss.unit.api.Assert.assertNotEquals;
+import static org.jboss.unit.util.CollectionTools.list;
-import static org.jboss.unit.api.Assert.*;
-import static org.jboss.unit.util.CollectionTools.*;
-
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
-import java.util.ArrayList;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class TestIdTests
+public class TestIdTests extends TestCase
{
- public static void main(String[] args)
+ public void testAll() throws Exception
{
testEquals();
testCtor();
@@ -49,6 +49,13 @@
testGetNameThrowsIAE();
}
+
+ public static void main(String[] args) throws Exception
+ {
+ TestIdTests tests = new TestIdTests();
+ tests.testAll();
+ }
+
private static void testGetNameThrowsIAE()
{
try
Modified: modules/test/trunk/unit/src/test/java/org/jboss/test/unit/sample/SampleTests.java
===================================================================
--- modules/test/trunk/unit/src/test/java/org/jboss/test/unit/sample/SampleTests.java 2007-11-07 19:02:05 UTC (rev 8841)
+++ modules/test/trunk/unit/src/test/java/org/jboss/test/unit/sample/SampleTests.java 2007-11-07 20:09:52 UTC (rev 8842)
@@ -55,7 +55,7 @@
}
- private static void test1()
+ public static void test1()
throws ParserConfigurationException, IOException, SAXException, BuilderException
{
InputStream in = SampleTests.class.getResourceAsStream("f1.xml");
@@ -71,7 +71,7 @@
runner.run(new TestRunnerContextSupport(broadcaster));
}
- private static void test2()
+ public static void test2()
throws ParserConfigurationException, IOException, SAXException, BuilderException
{
SystemOutputManager outputManager = new SystemOutputManager();
18 years, 6 months
JBoss Portal SVN: r8841 - in modules/test/trunk: mc and 12 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-11-07 14:02:05 -0500 (Wed, 07 Nov 2007)
New Revision: 8841
Added:
modules/test/trunk/test/agent/pom.xml
modules/test/trunk/test/core/src/
modules/test/trunk/test/core/src/assembly/
modules/test/trunk/test/core/src/assembly/opends.xml
Modified:
modules/test/trunk/mc/pom.xml
modules/test/trunk/pom.xml
modules/test/trunk/remote/pom.xml
modules/test/trunk/test/core/pom.xml
modules/test/trunk/test/generic/pom.xml
modules/test/trunk/test/jboss/pom.xml
modules/test/trunk/tooling/ant/pom.xml
modules/test/trunk/tooling/core/pom.xml
modules/test/trunk/tooling/maven2/pom.xml
modules/test/trunk/tooling/pom.xml
modules/test/trunk/unit/pom.xml
Log:
more mavanization
Modified: modules/test/trunk/mc/pom.xml
===================================================================
--- modules/test/trunk/mc/pom.xml 2007-11-07 18:04:40 UTC (rev 8840)
+++ modules/test/trunk/mc/pom.xml 2007-11-07 19:02:05 UTC (rev 8841)
@@ -2,40 +2,40 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.portal.test</groupId>
- <artifactId>jboss-portal-modules-test-root</artifactId>
+ <artifactId>jboss-portal-modules-test</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jboss-unit-mc</artifactId>
<packaging>jar</packaging>
- <name>JBoss Unit MC</name>
+ <name>JBoss Unit Microcontainer</name>
<dependencies>
<dependency>
<groupId>org.jboss.portal.test</groupId>
<artifactId>jboss-unit</artifactId>
- <version>1.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jboss.microcontainer</groupId>
<artifactId>jboss-kernel</artifactId>
- <version>2.0.0.Beta4</version>
</dependency>
</dependencies>
- <build>
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
+ <!--<build>-->
+ <!--<plugins>-->
+ <!--<plugin>-->
+ <!--<groupId>org.apache.maven.plugins</groupId>-->
+ <!--<artifactId>maven-surefire-plugin</artifactId>-->
+ <!--<configuration>-->
+ <!--<skip>false</skip>-->
+ <!--<includes>-->
+ <!--<include>**/*Tests.java</include>-->
+ <!--</includes>-->
+ <!--</configuration>-->
+ <!--</plugin>-->
+ <!--</plugins>-->
+ <!--</build>-->
- </build>
<properties>
Modified: modules/test/trunk/pom.xml
===================================================================
--- modules/test/trunk/pom.xml 2007-11-07 18:04:40 UTC (rev 8840)
+++ modules/test/trunk/pom.xml 2007-11-07 19:02:05 UTC (rev 8841)
@@ -2,7 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.portal.test</groupId>
- <artifactId>jboss-portal-modules-test-root</artifactId>
+ <artifactId>jboss-portal-modules-test-aggregator</artifactId>
<packaging>pom</packaging>
<name>JBoss Portal Modules Test</name>
<version>1.1.0-SNAPSHOT</version>
@@ -10,102 +10,102 @@
<dependencies/>
- <repositories>
- <repository>
- <id>repository.maven.org</id>
- <name>Maven Repository</name>
- <layout>default</layout>
- <url>http://repo1.maven.org/maven2/</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- <repository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <layout>default</layout>
- <url>http://repository.jboss.org/maven2/</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- <repository>
- <id>snapshots.jboss.org</id>
- <name>JBoss Snapshots Repository</name>
- <layout>default</layout>
- <url>http://snapshots.jboss.org/maven2/</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>false</enabled>
- </releases>
- </repository>
- </repositories>
+ <!--<repositories>-->
+ <!--<repository>-->
+ <!--<id>repository.maven.org</id>-->
+ <!--<name>Maven Repository</name>-->
+ <!--<layout>default</layout>-->
+ <!--<url>http://repo1.maven.org/maven2/</url>-->
+ <!--<snapshots>-->
+ <!--<enabled>false</enabled>-->
+ <!--</snapshots>-->
+ <!--</repository>-->
+ <!--<repository>-->
+ <!--<id>repository.jboss.org</id>-->
+ <!--<name>JBoss Repository</name>-->
+ <!--<layout>default</layout>-->
+ <!--<url>http://repository.jboss.org/maven2/</url>-->
+ <!--<snapshots>-->
+ <!--<enabled>false</enabled>-->
+ <!--</snapshots>-->
+ <!--</repository>-->
+ <!--<repository>-->
+ <!--<id>snapshots.jboss.org</id>-->
+ <!--<name>JBoss Snapshots Repository</name>-->
+ <!--<layout>default</layout>-->
+ <!--<url>http://snapshots.jboss.org/maven2/</url>-->
+ <!--<snapshots>-->
+ <!--<enabled>true</enabled>-->
+ <!--</snapshots>-->
+ <!--<releases>-->
+ <!--<enabled>false</enabled>-->
+ <!--</releases>-->
+ <!--</repository>-->
+ <!--</repositories>-->
- <build>
- <extensions>
- <extension>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-webdav</artifactId>
- <version>1.0-beta-2</version>
- </extension>
- </extensions>
- <pluginManagement>
- <plugins>
- <plugin>
- <inherited>true</inherited>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- <showDeprecation>true</showDeprecation>
- <showWarnings>true</showWarnings>
- <optimize>true</optimize>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jboss-packaging-maven-plugin</artifactId>
- <version>2.0-SNAPSHOT</version>
- <extensions>true</extensions>
- </plugin>
- <plugin>
- <artifactId>maven-idea-plugin</artifactId>
- <configuration>
- <downloadSources>true</downloadSources>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jboss-deploy-plugin</artifactId>
- <version>1.3</version>
- <executions>
- <execution>
- <goals>
- <goal>jboss-deploy</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
+ <!--<build>-->
+ <!--<extensions>-->
+ <!--<extension>-->
+ <!--<groupId>org.apache.maven.wagon</groupId>-->
+ <!--<artifactId>wagon-webdav</artifactId>-->
+ <!--<version>1.0-beta-2</version>-->
+ <!--</extension>-->
+ <!--</extensions>-->
+ <!--<pluginManagement>-->
+ <!--<plugins>-->
+ <!--<plugin>-->
+ <!--<inherited>true</inherited>-->
+ <!--<groupId>org.apache.maven.plugins</groupId>-->
+ <!--<artifactId>maven-compiler-plugin</artifactId>-->
+ <!--<configuration>-->
+ <!--<source>1.5</source>-->
+ <!--<target>1.5</target>-->
+ <!--<showDeprecation>true</showDeprecation>-->
+ <!--<showWarnings>true</showWarnings>-->
+ <!--<optimize>true</optimize>-->
+ <!--</configuration>-->
+ <!--</plugin>-->
+ <!--<plugin>-->
+ <!--<groupId>org.apache.maven.plugins</groupId>-->
+ <!--<artifactId>maven-jar-plugin</artifactId>-->
+ <!--<configuration>-->
+ <!--<archive>-->
+ <!--<manifest>-->
+ <!--<addClasspath>true</addClasspath>-->
+ <!--</manifest>-->
+ <!--</archive>-->
+ <!--</configuration>-->
+ <!--</plugin>-->
+ <!--<plugin>-->
+ <!--<groupId>org.codehaus.mojo</groupId>-->
+ <!--<artifactId>jboss-packaging-maven-plugin</artifactId>-->
+ <!--<version>2.0-SNAPSHOT</version>-->
+ <!--<extensions>true</extensions>-->
+ <!--</plugin>-->
+ <!--<plugin>-->
+ <!--<artifactId>maven-idea-plugin</artifactId>-->
+ <!--<configuration>-->
+ <!--<downloadSources>true</downloadSources>-->
+ <!--</configuration>-->
+ <!--</plugin>-->
+ <!--<plugin>-->
+ <!--<groupId>org.jboss.maven.plugins</groupId>-->
+ <!--<artifactId>maven-jboss-deploy-plugin</artifactId>-->
+ <!--<version>1.3</version>-->
+ <!--<executions>-->
+ <!--<execution>-->
+ <!--<goals>-->
+ <!--<goal>jboss-deploy</goal>-->
+ <!--</goals>-->
+ <!--</execution>-->
+ <!--</executions>-->
+ <!--<configuration>-->
+ <!--<jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>-->
+ <!--</configuration>-->
+ <!--</plugin>-->
+ <!--</plugins>-->
+ <!--</pluginManagement>-->
+ <!--</build>-->
<distributionManagement>
<!--<repository>-->
@@ -123,6 +123,7 @@
</distributionManagement>
<modules>
+ <module>build</module>
<module>unit</module>
<module>tooling</module>
<module>mc</module>
@@ -130,73 +131,74 @@
<module>test/core</module>
<module>test/generic</module>
<module>test/jboss</module>
+ <module>test/agent</module>
</modules>
- <profiles>
- <profile>
- <id>docs</id>
- <modules>
- <module>docs</module>
- </modules>
- </profile>
- </profiles>
+ <!--<profiles>-->
+ <!--<profile>-->
+ <!--<id>docs</id>-->
+ <!--<modules>-->
+ <!--<module>docs</module>-->
+ <!--</modules>-->
+ <!--</profile>-->
+ <!--</profiles>-->
- <issueManagement>
- <system>JIRA</system>
- <url>http://jira.jboss.com/jira/browse/JBPORTAL</url>
- </issueManagement>
- <ciManagement>
- <system>cruisecontrol</system>
- </ciManagement>
+ <!--<issueManagement>-->
+ <!--<system>JIRA</system>-->
+ <!--<url>http://jira.jboss.com/jira/browse/JBPORTAL</url>-->
+ <!--</issueManagement>-->
+ <!--<ciManagement>-->
+ <!--<system>cruisecontrol</system>-->
+ <!--</ciManagement>-->
- <licenses>
- <license>
- <name>LGPL 2.1</name>
- <url>http://www.gnu.org/licenses/lgpl.html</url>
- <distribution>repo</distribution>
- <comments>
- GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
- </comments>
- </license>
- </licenses>
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/portal/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/portal/trunk</developerConnection>
- <url>https://svn.jboss.org/repos/portal/trunk</url>
- </scm>
+ <!--<licenses>-->
+ <!--<license>-->
+ <!--<name>LGPL 2.1</name>-->
+ <!--<url>http://www.gnu.org/licenses/lgpl.html</url>-->
+ <!--<distribution>repo</distribution>-->
+ <!--<comments>-->
+ <!--GNU LESSER GENERAL PUBLIC LICENSE Version 2.1-->
+ <!--</comments>-->
+ <!--</license>-->
+ <!--</licenses>-->
+ <!--<scm>-->
+ <!--<connection>scm:svn:http://anonsvn.jboss.org/repos/portal/trunk</connection>-->
+ <!--<developerConnection>scm:svn:https://svn.jboss.org/repos/portal/trunk</developerConnection>-->
+ <!--<url>https://svn.jboss.org/repos/portal/trunk</url>-->
+ <!--</scm>-->
- <reporting>
- <plugins>
- <plugin>
- <artifactId>maven-changes-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
- <version>2.0</version>
- </plugin>
- <plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-jxr-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-pmd-plugin</artifactId>
- <configuration>
- <linkXref>true</linkXref>
- <targetJdk>1.5</targetJdk>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-report-plugin</artifactId>
- </plugin>
- </plugins>
- </reporting>
+ <!--<reporting>-->
+ <!--<plugins>-->
+ <!--<plugin>-->
+ <!--<artifactId>maven-changes-plugin</artifactId>-->
+ <!--</plugin>-->
+ <!--<plugin>-->
+ <!--<artifactId>maven-checkstyle-plugin</artifactId>-->
+ <!--</plugin>-->
+ <!--<plugin>-->
+ <!--<groupId>org.codehaus.mojo</groupId>-->
+ <!--<artifactId>cobertura-maven-plugin</artifactId>-->
+ <!--<version>2.0</version>-->
+ <!--</plugin>-->
+ <!--<plugin>-->
+ <!--<artifactId>maven-javadoc-plugin</artifactId>-->
+ <!--</plugin>-->
+ <!--<plugin>-->
+ <!--<artifactId>maven-jxr-plugin</artifactId>-->
+ <!--</plugin>-->
+ <!--<plugin>-->
+ <!--<artifactId>maven-pmd-plugin</artifactId>-->
+ <!--<configuration>-->
+ <!--<linkXref>true</linkXref>-->
+ <!--<targetJdk>1.5</targetJdk>-->
+ <!--</configuration>-->
+ <!--</plugin>-->
+ <!--<plugin>-->
+ <!--<artifactId>maven-surefire-report-plugin</artifactId>-->
+ <!--</plugin>-->
+ <!--</plugins>-->
+ <!--</reporting>-->
- <properties/>
+ <!--<properties/>-->
</project>
\ No newline at end of file
Modified: modules/test/trunk/remote/pom.xml
===================================================================
--- modules/test/trunk/remote/pom.xml 2007-11-07 18:04:40 UTC (rev 8840)
+++ modules/test/trunk/remote/pom.xml 2007-11-07 19:02:05 UTC (rev 8841)
@@ -2,7 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.portal.test</groupId>
- <artifactId>jboss-portal-modules-test-root</artifactId>
+ <artifactId>jboss-portal-modules-test</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -14,49 +14,25 @@
<dependency>
<groupId>org.jboss.portal.test</groupId>
<artifactId>jboss-unit</artifactId>
- <version>1.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jboss.portal.test</groupId>
- <artifactId>jboss-portal-modules-test-core</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <artifactId>portal-test</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.portal.common</groupId>
<artifactId>jboss-portal-modules-common</artifactId>
- <version>1.1.0-SNAPSHOT</version>
</dependency>
- <!--<dependency>-->
- <!--<groupId>apache-collections</groupId>-->
- <!--<artifactId>commons-collections</artifactId>-->
- <!--<version>2.1</version>-->
- <!--</dependency>-->
<dependency>
<groupId>apache-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
- <version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.jboss.microcontainer</groupId>
<artifactId>jboss-kernel</artifactId>
- <version>2.0.0.Beta4</version>
</dependency>
</dependencies>
- <build>
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
-
- </build>
-
<properties>
</properties>
Added: modules/test/trunk/test/agent/pom.xml
===================================================================
--- modules/test/trunk/test/agent/pom.xml (rev 0)
+++ modules/test/trunk/test/agent/pom.xml 2007-11-07 19:02:05 UTC (rev 8841)
@@ -0,0 +1,119 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.portal.test</groupId>
+ <artifactId>jboss-portal-modules-test</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>portal-test-agent</artifactId>
+ <packaging>jboss-sar</packaging>
+ <name>JBoss Portal Modules Test Agent </name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.portal.common</groupId>
+ <artifactId>jboss-portal-modules-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>cargo</groupId>
+ <artifactId>core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>sun-opends</groupId>
+ <artifactId>opends-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>hibernate</groupId>
+ <artifactId>hibernate3</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss.jbossas.core-libs</groupId>
+ <artifactId>jboss-transaction</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss.jbossas.core-libs</groupId>
+ <artifactId>jnpserver</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss.jbossas.core-libs</groupId>
+ <artifactId>jboss-jca</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss.jbossas.core-libs</groupId>
+ <artifactId>jboss-local-jdbc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss.jbossas.core-libs</groupId>
+ <artifactId>jboss</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.test</groupId>
+ <artifactId>portal-test</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.test</groupId>
+ <artifactId>portal-test-jboss</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>resources</directory>
+ </resource>
+ </resources>
+
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-packaging-maven-plugin</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ <extensions>true</extensions>
+ <configuration>
+ <excludes>
+ <exclude>jboss:jboss-jmx</exclude>
+ <exclude>jboss:jboss-backport-concurrent</exclude>
+ <exclude>jboss:jboss-common-logging-spi</exclude>
+ <exclude>junit:junit</exclude>
+ <exclude>jboss:jboss-remoting</exclude>
+ <exclude>jboss.jbossas.core-libs:jboss-local-jdbc</exclude>
+ <exclude>javax.servlet:servlet-api</exclude>
+ <exclude>ant:ant</exclude>
+ <exclude>jboss.jbossas.core-libs:jboss</exclude>
+ <exclude>jboss.jbossas.core-libs:jnpserver</exclude>
+ <exclude>ant:ant-launcher</exclude>
+ <exclude>jboss:jboss-common-core</exclude>
+ <exclude>jboss:jboss-j2ee</exclude>
+ <exclude>jboss:jboss-system</exclude>
+ <exclude>ant:ant-nodeps</exclude>
+ <exclude>javax.activation:activation</exclude>
+ <exclude>jboss.jbossas.core-libs:jboss-jca</exclude>
+ <exclude>cargo:core</exclude>
+ <exclude>hibernate:hibernate3</exclude>
+ <exclude>apache-xerces:xml-apis</exclude>
+ <exclude>jboss.jbossas.core-libs:jboss-transaction</exclude>
+ <exclude>dom4j:dom4j</exclude>
+ <exclude>oswego-concurrent:concurrent</exclude>
+ <exclude>apache-slide:webdavlib</exclude>
+ <exclude>sun-opends:opends-core</exclude>
+ <exclude>apache-httpclient:commons-httpclient</exclude>
+ <exclude>apache-log4j:log4j</exclude>
+ <exclude>org.codehaus.cargo:cargo-core-uberjar</exclude>
+ <exclude>xml-apis:xml-apis</exclude>
+ <exclude>ant:ant-junit</exclude>
+ </excludes>
+ <libDirectory>${project.build.directory}/${project.build.finalName}</libDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <properties>
+
+ </properties>
+</project>
\ No newline at end of file
Modified: modules/test/trunk/test/core/pom.xml
===================================================================
--- modules/test/trunk/test/core/pom.xml 2007-11-07 18:04:40 UTC (rev 8840)
+++ modules/test/trunk/test/core/pom.xml 2007-11-07 19:02:05 UTC (rev 8841)
@@ -2,11 +2,11 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.portal.test</groupId>
- <artifactId>jboss-portal-modules-test-root</artifactId>
+ <artifactId>jboss-portal-modules-test</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>jboss-portal-modules-test-core</artifactId>
+ <artifactId>portal-test</artifactId>
<packaging>jar</packaging>
<name>JBoss Portal Modules Test Core</name>
@@ -14,52 +14,42 @@
<dependency>
<groupId>org.jboss.portal.common</groupId>
<artifactId>jboss-portal-modules-common</artifactId>
- <version>1.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cargo</groupId>
<artifactId>core</artifactId>
- <version>0.9-portal</version>
</dependency>
<dependency>
<groupId>sun-opends</groupId>
<artifactId>opends-core</artifactId>
- <version>1.0.0-BUILD04</version>
</dependency>
<dependency>
<groupId>hibernate</groupId>
<artifactId>hibernate3</artifactId>
- <version>3.2.3.GA</version>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
- <version>1.6.1</version>
</dependency>
<dependency>
<groupId>jboss.jbossas.core-libs</groupId>
<artifactId>jboss-transaction</artifactId>
- <version>4.0.4.GA</version>
</dependency>
<dependency>
<groupId>jboss.jbossas.core-libs</groupId>
<artifactId>jnpserver</artifactId>
- <version>4.0.4.GA</version>
</dependency>
<dependency>
<groupId>jboss.jbossas.core-libs</groupId>
<artifactId>jboss-jca</artifactId>
- <version>4.0.4.GA</version>
</dependency>
<dependency>
<groupId>jboss.jbossas.core-libs</groupId>
<artifactId>jboss-local-jdbc</artifactId>
- <version>4.0.4.GA</version>
</dependency>
<dependency>
<groupId>jboss.jbossas.core-libs</groupId>
<artifactId>jboss</artifactId>
- <version>4.0.4.GA</version>
</dependency>
</dependencies>
@@ -78,11 +68,23 @@
</configuration>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
+ <artifactId>maven-assembly-plugin</artifactId>
<configuration>
- <skip>true</skip>
+ <finalName>opends</finalName>
+ <!--<appendAssemblyId>false</appendAssemblyId>-->
+ <descriptors>
+ <descriptor>src/assembly/opends.xml</descriptor>
+ </descriptors>
</configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
</plugins>
Added: modules/test/trunk/test/core/src/assembly/opends.xml
===================================================================
--- modules/test/trunk/test/core/src/assembly/opends.xml (rev 0)
+++ modules/test/trunk/test/core/src/assembly/opends.xml 2007-11-07 19:02:05 UTC (rev 8841)
@@ -0,0 +1,12 @@
+<assembly>
+ <id>config</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <fileSets>
+ <fileSet>
+ <directory>resources/config</directory>
+ <outputDirectory></outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
Modified: modules/test/trunk/test/generic/pom.xml
===================================================================
--- modules/test/trunk/test/generic/pom.xml 2007-11-07 18:04:40 UTC (rev 8840)
+++ modules/test/trunk/test/generic/pom.xml 2007-11-07 19:02:05 UTC (rev 8841)
@@ -2,11 +2,11 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.portal.test</groupId>
- <artifactId>jboss-portal-modules-test-root</artifactId>
+ <artifactId>jboss-portal-modules-test</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>jboss-portal-modules-test-generic</artifactId>
+ <artifactId>portal-test-generic</artifactId>
<packaging>jar</packaging>
<name>JBoss Portal Modules Test Generic</name>
@@ -14,57 +14,46 @@
<dependency>
<groupId>org.jboss.portal.common</groupId>
<artifactId>jboss-portal-modules-common</artifactId>
- <version>1.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cargo</groupId>
<artifactId>core</artifactId>
- <version>0.9-portal</version>
</dependency>
<dependency>
<groupId>sun-opends</groupId>
<artifactId>opends-core</artifactId>
- <version>1.0.0-BUILD04</version>
</dependency>
<dependency>
<groupId>hibernate</groupId>
<artifactId>hibernate3</artifactId>
- <version>3.2.3.GA</version>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
- <version>1.6.1</version>
</dependency>
<dependency>
<groupId>jboss.jbossas.core-libs</groupId>
<artifactId>jboss-transaction</artifactId>
- <version>4.0.4.GA</version>
</dependency>
<dependency>
<groupId>jboss.jbossas.core-libs</groupId>
<artifactId>jnpserver</artifactId>
- <version>4.0.4.GA</version>
</dependency>
<dependency>
<groupId>jboss.jbossas.core-libs</groupId>
<artifactId>jboss-jca</artifactId>
- <version>4.0.4.GA</version>
</dependency>
<dependency>
<groupId>jboss.jbossas.core-libs</groupId>
<artifactId>jboss-local-jdbc</artifactId>
- <version>4.0.4.GA</version>
</dependency>
<dependency>
<groupId>jboss.jbossas.core-libs</groupId>
<artifactId>jboss</artifactId>
- <version>4.0.4.GA</version>
</dependency>
<dependency>
<groupId>jboss</groupId>
<artifactId>jboss-remoting</artifactId>
- <version>2.2.1.GA</version>
</dependency>
</dependencies>
@@ -98,13 +87,13 @@
<!--</archive>-->
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
+ <!--<plugin>-->
+ <!--<groupId>org.apache.maven.plugins</groupId>-->
+ <!--<artifactId>maven-surefire-plugin</artifactId>-->
+ <!--<configuration>-->
+ <!--<skip>true</skip>-->
+ <!--</configuration>-->
+ <!--</plugin>-->
</plugins>
</build>
Modified: modules/test/trunk/test/jboss/pom.xml
===================================================================
--- modules/test/trunk/test/jboss/pom.xml 2007-11-07 18:04:40 UTC (rev 8840)
+++ modules/test/trunk/test/jboss/pom.xml 2007-11-07 19:02:05 UTC (rev 8841)
@@ -2,11 +2,11 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.portal.test</groupId>
- <artifactId>jboss-portal-modules-test-root</artifactId>
+ <artifactId>jboss-portal-modules-test</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>jboss-portal-modules-test-jboss</artifactId>
+ <artifactId>portal-test-jboss</artifactId>
<packaging>jar</packaging>
<name>JBoss Portal Modules Test JBoss</name>
@@ -14,57 +14,46 @@
<dependency>
<groupId>org.jboss.portal.common</groupId>
<artifactId>jboss-portal-modules-common</artifactId>
- <version>1.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cargo</groupId>
<artifactId>core</artifactId>
- <version>0.9-portal</version>
</dependency>
<dependency>
<groupId>sun-opends</groupId>
<artifactId>opends-core</artifactId>
- <version>1.0.0-BUILD04</version>
</dependency>
<dependency>
<groupId>hibernate</groupId>
<artifactId>hibernate3</artifactId>
- <version>3.2.3.GA</version>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
- <version>1.6.1</version>
</dependency>
<dependency>
<groupId>jboss.jbossas.core-libs</groupId>
<artifactId>jboss-transaction</artifactId>
- <version>4.0.4.GA</version>
</dependency>
<dependency>
<groupId>jboss.jbossas.core-libs</groupId>
<artifactId>jnpserver</artifactId>
- <version>4.0.4.GA</version>
</dependency>
<dependency>
<groupId>jboss.jbossas.core-libs</groupId>
<artifactId>jboss-jca</artifactId>
- <version>4.0.4.GA</version>
</dependency>
<dependency>
<groupId>jboss.jbossas.core-libs</groupId>
<artifactId>jboss-local-jdbc</artifactId>
- <version>4.0.4.GA</version>
</dependency>
<dependency>
<groupId>jboss.jbossas.core-libs</groupId>
<artifactId>jboss</artifactId>
- <version>4.0.4.GA</version>
</dependency>
<dependency>
<groupId>jboss</groupId>
<artifactId>jboss-remoting</artifactId>
- <version>2.2.1.GA</version>
</dependency>
</dependencies>
@@ -81,13 +70,6 @@
</includes>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
</plugins>
</build>
Modified: modules/test/trunk/tooling/ant/pom.xml
===================================================================
--- modules/test/trunk/tooling/ant/pom.xml 2007-11-07 18:04:40 UTC (rev 8840)
+++ modules/test/trunk/tooling/ant/pom.xml 2007-11-07 19:02:05 UTC (rev 8841)
@@ -14,40 +14,21 @@
<dependency>
<groupId>ant</groupId>
<artifactId>ant-junit</artifactId>
- <version>1.6.5</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
- <version>1.6.5</version>
</dependency>
<dependency>
<groupId>org.jboss.portal.test</groupId>
<artifactId>jboss-unit</artifactId>
- <version>1.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jboss.portal.test</groupId>
<artifactId>jboss-unit-tooling</artifactId>
- <version>1.1.0-SNAPSHOT</version>
</dependency>
</dependencies>
- <build>
-
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
-
- </build>
-
<properties>
</properties>
Modified: modules/test/trunk/tooling/core/pom.xml
===================================================================
--- modules/test/trunk/tooling/core/pom.xml 2007-11-07 18:04:40 UTC (rev 8840)
+++ modules/test/trunk/tooling/core/pom.xml 2007-11-07 19:02:05 UTC (rev 8841)
@@ -14,30 +14,14 @@
<dependency>
<groupId>ant</groupId>
<artifactId>ant-junit</artifactId>
- <version>1.6.5</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
- <version>1.6.5</version>
</dependency>
</dependencies>
- <build>
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
-
- </build>
-
<properties>
</properties>
Modified: modules/test/trunk/tooling/maven2/pom.xml
===================================================================
--- modules/test/trunk/tooling/maven2/pom.xml 2007-11-07 18:04:40 UTC (rev 8840)
+++ modules/test/trunk/tooling/maven2/pom.xml 2007-11-07 19:02:05 UTC (rev 8841)
@@ -14,57 +14,38 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
- <version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
- <version>2.0.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
- <version>2.0.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
- <version>2.0.6</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-junit</artifactId>
- <version>1.6.5</version>
</dependency>
<dependency>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
- <version>1.6.5</version>
</dependency>
<dependency>
<groupId>org.jboss.portal.test</groupId>
<artifactId>jboss-unit</artifactId>
- <version>1.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jboss.portal.test</groupId>
<artifactId>jboss-unit-tooling</artifactId>
- <version>1.1.0-SNAPSHOT</version>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
+
<properties/>
</project>
Modified: modules/test/trunk/tooling/pom.xml
===================================================================
--- modules/test/trunk/tooling/pom.xml 2007-11-07 18:04:40 UTC (rev 8840)
+++ modules/test/trunk/tooling/pom.xml 2007-11-07 19:02:05 UTC (rev 8841)
@@ -3,7 +3,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.portal.test</groupId>
- <artifactId>jboss-portal-modules-test-root</artifactId>
+ <artifactId>jboss-portal-modules-test</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/test/trunk/unit/pom.xml
===================================================================
--- modules/test/trunk/unit/pom.xml 2007-11-07 18:04:40 UTC (rev 8840)
+++ modules/test/trunk/unit/pom.xml 2007-11-07 19:02:05 UTC (rev 8841)
@@ -2,7 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.jboss.portal.test</groupId>
- <artifactId>jboss-portal-modules-test-root</artifactId>
+ <artifactId>jboss-portal-modules-test</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -12,20 +12,6 @@
<dependencies/>
- <build>
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
-
- </build>
-
<properties>
</properties>
18 years, 6 months
JBoss Portal SVN: r8840 - in modules/portlet/trunk/portlet/src/main/org/jboss/portal: test/portlet/jsr168/api/actionrequest and 13 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-11-07 13:04:40 -0500 (Wed, 07 Nov 2007)
New Revision: 8840
Modified:
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestSuite.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/AttributeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ConstantsTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ParameterTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/PropertyTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/EncodeURLTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/PropertyTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/RenderParameterTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalInfoTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PropertyTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/SupportedPortletModesTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/SupportedWindowStatesTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/InitParameterNamesTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/InitParameterTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletContextTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletNameTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/AttributeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/DispatcherTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/InitParameterTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/MimeTypeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextNameTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ResourcePathsTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ResourceTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ServerInfoTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/VersionTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/ConstructorTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/EqualsTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/HashCodeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/ModesTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ReadOnlyTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ResetNullKeyThrowsNPETestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ValueTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ZeroLengthArrayValueTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/AttributeNamesTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/ConstantsTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/CreationTimeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/GetAttributeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/InvalidateTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/NewTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/RemoveAttributeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/SetAttributeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/DecodeAttributeNameTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/DecodeScopeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/ParameterTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/AttributeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/ConstantsTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/ParameterTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/PropertyTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/ConstantsTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/ContentTypeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/EncodeURLTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/PropertyTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/ConstructorTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/EqualsTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/HashCodeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/StatesTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/annotations/TestCase.java
Log:
- annotate existing portlet test case with @TestCase
- filter test case using the @TestCase annotation
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestSuite.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestSuite.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestSuite.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -129,13 +129,15 @@
{
for (Class clazz : getClasses(event.getServletContext()))
{
- TestCase tck = ((AnnotatedElement)clazz).getAnnotation(TestCase.class);
+ TestCase testCaseAnnotation = ((AnnotatedElement)clazz).getAnnotation(TestCase.class);
//
- boolean active = true;
- if (tck != null)
+ if (testCaseAnnotation != null)
{
- for (Assertion assertion : tck.value())
+ boolean active = true;
+
+ //
+ for (Assertion assertion : testCaseAnnotation.value())
{
if (assertion.getStatus() instanceof Assertion.Inactive)
{
@@ -143,24 +145,28 @@
log.error("Skip test case " + clazz.getName() + " because the assertion " + assertion.getRef() + " is not enabled");
}
}
- }
- //
- if (active)
- {
- try
+ //
+ if (active)
{
- Constructor ctor = clazz.getConstructor(PortletTest.class);
- PortletTest testCase = new PortletTest();
- ctor.newInstance(testCase);
- String testCaseName = clazz.getSimpleName();
- driver.addSequence(testCaseName, testCase);
+ try
+ {
+ Constructor ctor = clazz.getConstructor(PortletTest.class);
+ PortletTest testCase = new PortletTest();
+ ctor.newInstance(testCase);
+ String testCaseName = clazz.getSimpleName();
+ driver.addSequence(testCaseName, testCase);
+ }
+ catch (Exception e)
+ {
+ log.error("Cannot obtain test case constructor " + clazz, e);
+ }
}
- catch (Exception e)
- {
- log.error("Cannot obtain test case constructor " + clazz, e);
- }
}
+ else
+ {
+ log.error("Skip test case " + clazz.getName() + " because it is not annotated as a test case");
+ }
}
}
catch (IOException e)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/AttributeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/AttributeTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/AttributeTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -27,6 +27,7 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -44,6 +45,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class AttributeTestCase
{
public AttributeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ConstantsTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ConstantsTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ConstantsTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertEquals;
@@ -42,6 +43,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class ConstantsTestCase
{
public ConstantsTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ParameterTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ParameterTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ParameterTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -27,6 +27,7 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -44,6 +45,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class ParameterTestCase
{
public ParameterTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/PropertyTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/PropertyTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/PropertyTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -27,6 +27,7 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -44,6 +45,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class PropertyTestCase
{
public PropertyTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/EncodeURLTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/EncodeURLTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/EncodeURLTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -27,6 +27,7 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -42,6 +43,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase({})
public class EncodeURLTestCase
{
public EncodeURLTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/PropertyTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/PropertyTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/PropertyTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -27,6 +27,7 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -42,6 +43,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class PropertyTestCase
{
public PropertyTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/RenderParameterTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/RenderParameterTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/RenderParameterTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -27,6 +27,7 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -44,6 +45,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class RenderParameterTestCase
{
public RenderParameterTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalInfoTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalInfoTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalInfoTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertTrue;
@@ -38,6 +39,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class PortalInfoTestCase
{
public PortalInfoTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PropertyTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PropertyTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PropertyTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -38,6 +39,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class PropertyTestCase
{
public PropertyTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/SupportedPortletModesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/SupportedPortletModesTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/SupportedPortletModesTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertTrue;
@@ -42,6 +43,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class SupportedPortletModesTestCase
{
public SupportedPortletModesTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/SupportedWindowStatesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/SupportedWindowStatesTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/SupportedWindowStatesTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertTrue;
@@ -42,6 +43,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class SupportedWindowStatesTestCase
{
public SupportedWindowStatesTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/InitParameterNamesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/InitParameterNamesTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/InitParameterNamesTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -28,6 +28,7 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTP2;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNotNull;
@@ -46,6 +47,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class InitParameterNamesTestCase
{
public InitParameterNamesTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/InitParameterTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/InitParameterTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/InitParameterTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -27,6 +27,7 @@
import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP2;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNotNull;
@@ -43,6 +44,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class InitParameterTestCase
{
public InitParameterTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletContextTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletContextTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletContextTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -27,6 +27,7 @@
import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNotNull;
@@ -41,6 +42,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class PortletContextTestCase
{
public PortletContextTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletNameTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletNameTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletNameTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -27,6 +27,7 @@
import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNotNull;
@@ -41,6 +42,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class PortletNameTestCase
{
public PortletNameTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/AttributeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/AttributeTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/AttributeTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -27,6 +27,7 @@
import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -39,6 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class AttributeTestCase
{
public AttributeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/DispatcherTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/DispatcherTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/DispatcherTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -27,6 +27,7 @@
import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNull;
@@ -39,6 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class DispatcherTestCase
{
public DispatcherTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/InitParameterTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/InitParameterTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/InitParameterTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -27,6 +27,7 @@
import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNull;
@@ -40,6 +41,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class InitParameterTestCase
{
public InitParameterTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/MimeTypeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/MimeTypeTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/MimeTypeTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -27,6 +27,7 @@
import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertEquals;
@@ -40,6 +41,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class MimeTypeTestCase
{
public MimeTypeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextNameTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextNameTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextNameTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -27,6 +27,7 @@
import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertEquals;
@@ -39,6 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class PortletContextNameTestCase
{
public PortletContextNameTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ResourcePathsTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ResourcePathsTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ResourcePathsTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -27,6 +27,7 @@
import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNull;
@@ -41,6 +42,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase({})
public class ResourcePathsTestCase
{
public ResourcePathsTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ResourceTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ResourceTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ResourceTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -27,6 +27,7 @@
import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -41,6 +42,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class ResourceTestCase
{
public ResourceTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ServerInfoTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ServerInfoTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ServerInfoTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -27,6 +27,7 @@
import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertTrue;
@@ -40,6 +41,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class ServerInfoTestCase
{
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/VersionTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/VersionTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/VersionTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -28,6 +28,7 @@
import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertEquals;
@@ -40,6 +41,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class VersionTestCase
{
public VersionTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/ConstructorTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/ConstructorTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/ConstructorTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertEquals;
@@ -39,6 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class ConstructorTestCase
{
public ConstructorTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/EqualsTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/EqualsTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/EqualsTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertTrue;
@@ -39,6 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class EqualsTestCase
{
public EqualsTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/HashCodeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/HashCodeTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/HashCodeTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertTrue;
@@ -40,6 +41,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class HashCodeTestCase
{
public HashCodeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/ModesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/ModesTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/ModesTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertEquals;
@@ -39,6 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class ModesTestCase
{
public ModesTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ReadOnlyTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ReadOnlyTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ReadOnlyTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -38,6 +39,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class ReadOnlyTestCase
{
public ReadOnlyTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ResetNullKeyThrowsNPETestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ResetNullKeyThrowsNPETestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ResetNullKeyThrowsNPETestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -39,6 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class ResetNullKeyThrowsNPETestCase
{
public ResetNullKeyThrowsNPETestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ValueTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ValueTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ValueTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -27,6 +27,7 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -44,6 +45,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class ValueTestCase
{
public ValueTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ZeroLengthArrayValueTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ZeroLengthArrayValueTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ZeroLengthArrayValueTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -27,6 +27,7 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP2;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertEquals;
@@ -47,6 +48,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class ZeroLengthArrayValueTestCase
{
public ZeroLengthArrayValueTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/AttributeNamesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/AttributeNamesTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/AttributeNamesTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -39,6 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class AttributeNamesTestCase
{
public AttributeNamesTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/ConstantsTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/ConstantsTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/ConstantsTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertEquals;
@@ -39,6 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class ConstantsTestCase
{
public ConstantsTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/CreationTimeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/CreationTimeTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/CreationTimeTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -39,6 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class CreationTimeTestCase
{
public CreationTimeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/GetAttributeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/GetAttributeTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/GetAttributeTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -39,6 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class GetAttributeTestCase
{
public GetAttributeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/InvalidateTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/InvalidateTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/InvalidateTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -39,6 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class InvalidateTestCase
{
public InvalidateTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/NewTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/NewTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/NewTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -39,6 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class NewTestCase
{
public NewTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/RemoveAttributeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/RemoveAttributeTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/RemoveAttributeTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -39,6 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class RemoveAttributeTestCase
{
public RemoveAttributeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/SetAttributeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/SetAttributeTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/SetAttributeTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -39,6 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class SetAttributeTestCase
{
public SetAttributeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/DecodeAttributeNameTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/DecodeAttributeNameTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/DecodeAttributeNameTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertEquals;
@@ -39,6 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class DecodeAttributeNameTestCase
{
public DecodeAttributeNameTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/DecodeScopeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/DecodeScopeTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/DecodeScopeTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertEquals;
@@ -40,6 +41,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class DecodeScopeTestCase
{
public DecodeScopeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/ParameterTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/ParameterTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/ParameterTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -41,6 +42,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class ParameterTestCase
{
public ParameterTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/AttributeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/AttributeTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/AttributeTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -38,6 +39,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class AttributeTestCase
{
public AttributeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/ConstantsTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/ConstantsTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/ConstantsTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertEquals;
@@ -38,6 +39,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class ConstantsTestCase
{
public ConstantsTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/ParameterTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/ParameterTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/ParameterTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -38,6 +39,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class ParameterTestCase
{
public ParameterTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/PropertyTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/PropertyTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/PropertyTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -38,6 +39,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class PropertyTestCase
{
public PropertyTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/ConstantsTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/ConstantsTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/ConstantsTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertEquals;
@@ -38,6 +39,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class ConstantsTestCase
{
public ConstantsTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/ContentTypeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/ContentTypeTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/ContentTypeTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -38,6 +39,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class ContentTypeTestCase
{
public ContentTypeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/EncodeURLTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/EncodeURLTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/EncodeURLTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -38,6 +39,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class EncodeURLTestCase
{
public EncodeURLTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/PropertyTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/PropertyTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/PropertyTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -38,6 +39,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class PropertyTestCase
{
public PropertyTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/ConstructorTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/ConstructorTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/ConstructorTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertEquals;
@@ -39,6 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class ConstructorTestCase
{
public ConstructorTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/EqualsTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/EqualsTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/EqualsTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertTrue;
@@ -39,6 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class EqualsTestCase
{
public EqualsTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/HashCodeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/HashCodeTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/HashCodeTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertTrue;
@@ -40,6 +41,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class HashCodeTestCase
{
public HashCodeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/StatesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/StatesTestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/StatesTestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -26,6 +26,7 @@
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;
+import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertEquals;
@@ -39,6 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
+@TestCase
public class StatesTestCase
{
public StatesTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/annotations/TestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/annotations/TestCase.java 2007-11-07 17:40:55 UTC (rev 8839)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/annotations/TestCase.java 2007-11-07 18:04:40 UTC (rev 8840)
@@ -42,5 +42,5 @@
/**
* The different assertions covered by this test case.
*/
- Assertion[] value();
+ Assertion[] value() default {};
}
18 years, 6 months
JBoss Portal SVN: r8839 - branches.
by portal-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2007-11-07 12:40:55 -0500 (Wed, 07 Nov 2007)
New Revision: 8839
Added:
branches/JBoss_Portal_2_6_2_CP/
Log:
Cumulative Patches for JBPortal 2.6.2 as discussed on QA meeting
Copied: branches/JBoss_Portal_2_6_2_CP (from rev 8838, branches/JBoss_Portal_2_6_2_JBPORTAL-1772)
18 years, 6 months
JBoss Portal SVN: r8838 - in modules/portlet/trunk/portlet/src: main/org/jboss/portal/test/portlet/jsr168/api/actionresponse and 24 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-11-07 12:20:52 -0500 (Wed, 07 Nov 2007)
New Revision: 8838
Added:
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/AttributeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ConstantsTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ParameterTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/PropertyTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/EncodeURLTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/PropertyTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/RenderParameterTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalInfoTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PropertyTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/SupportedPortletModesTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/SupportedWindowStatesTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/InitParameterNamesTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/InitParameterTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletContextTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletNameTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/AttributeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/DispatcherTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/InitParameterTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/MimeTypeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextNameTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ResourcePathsTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ResourceTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ServerInfoTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/VersionTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/ConstructorTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/EqualsTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/HashCodeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/ModesTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ReadOnlyTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ResetNullKeyThrowsNPETestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ValueTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ZeroLengthArrayValueTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/AttributeNamesTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/ConstantsTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/CreationTimeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/GetAttributeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/InvalidateTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/NewTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/RemoveAttributeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/SetAttributeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/DecodeAttributeNameTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/DecodeScopeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/ParameterTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/AttributeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/ConstantsTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/ParameterTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/PropertyTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/ConstantsTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/ContentTypeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/EncodeURLTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/PropertyTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/ConstructorTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/EqualsTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/HashCodeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/StatesTestCase.java
Removed:
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ActionRequestAPITestSuite.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ActionRequestSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/ActionResponseAPITestSuite.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/ActionResponseSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalContextAPITestSuite.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalContextSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletConfigAPITestSuite.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletConfigSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextAPITestSuite.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/PortletModeAPITestSuite.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/PortletModeSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/PortletPreferencesAPITestSuite.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/PortletPreferencesSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/PortletSessionAPITestSuite.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/PortletSessionSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/PortletSessionUtilAPITestSuite.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/PortletSessionUtilSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/PortletURLAPITestSuite.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/PortletURLSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/RenderRequestAPITestSuite.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/RenderRequestSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/RenderResponseAPITestSuite.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/RenderResponseSequenceBuilder.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/WindowStateAPITestSuite.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/WindowStateSequenceBuilder.java
Modified:
modules/portlet/trunk/portlet/src/resources/test/jsr168/api/actionrequest-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/api/actionresponse-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portalcontext-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletconfig-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletcontext-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletmode-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletpreferences-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletsession-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletsessionutil-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portleturl-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/api/renderrequest-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/api/renderresponse-war/WEB-INF/web.xml
modules/portlet/trunk/portlet/src/resources/test/jsr168/api/windowstate-war/WEB-INF/web.xml
Log:
- update API test cases to new test model
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ActionRequestAPITestSuite.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ActionRequestAPITestSuite.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ActionRequestAPITestSuite.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,82 +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.portlet.jsr168.api.actionrequest;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.com">Boleslaw Dawidowicz</a>
- * @version $Revision: 5510 $
- */
-public class ActionRequestAPITestSuite
-{
-
- public static void suite()
- {
-// TestSuite suite = new TestSuite("test-jsr168-api-actionrequest.war");
-//
-// /**
-// * ActionRequest.getPortletInputStream()
-// * ActionRequest.getReader()
-// *
-// * TESTED in TCK assertions
-// */
-//
-// /**
-// * ActionRequest.setCharacterEncoding()
-// *
-// * it is owned by PortletContainer - implementation simply throw IllegalStateException all the time
-// */
-//
-// //So here we go to PortletRequest interface asserts:
-//
-// /**
-// * ActionRequest.BASIC_AUTH
-// * ActionRequest.CLIENT_CERT_AUTH
-// * ActionRequest.DIGEST_AUTH
-// * ActionRequest.FORM_AUTH
-// * ActionRequest.USER_INFO
-// */
-// suite.addTest(new TestCase("Constants"));
-//
-// /**
-// * ActionRequest.getProperty()
-// * ActionRequest.getProperties()
-// */
-// suite.addTest(new TestCase("Property"));
-//
-// /**
-// * ActionRequest.getAttribute()
-// * ActionRequest.setAttribute()
-// * ActionRequest.removeAttribute()
-// */
-// suite.addTest(new TestCase("Attribute"));
-//
-// /**
-// * ActionRequest.getParameter()
-// * ActionRequest.getParameterValues()
-// */
-// suite.addTest(new TestCase("Parameter"));
-//
-//
-// return suite;
- }
-}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ActionRequestSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ActionRequestSequenceBuilder.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ActionRequestSequenceBuilder.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,230 +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.portlet.jsr168.api.actionrequest;
-
-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;
-import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import javax.portlet.Portlet;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class ActionRequestSequenceBuilder extends PortletTestSuite
-{
-
- //********************************
- //PortletRequest interface Asserts
- //********************************
-
- /**
- * ActionRequest.BASIC_AUTH ActionRequest.CLIENT_CERT_AUTH ActionRequest.DIGEST_AUTH ActionRequest.FORM_AUTH
- * ActionRequest.USER_INFO
- */
- public void createConstantsCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Constants", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
-
- assertEquals("javax.portlet.userinfo", ActionRequest.USER_INFO);
- assertEquals("BASIC", ActionRequest.BASIC_AUTH);
- assertEquals("FORM", ActionRequest.FORM_AUTH);
- assertEquals("CLIENT_CERT", ActionRequest.CLIENT_CERT_AUTH);
- assertEquals("DIGEST", ActionRequest.DIGEST_AUTH);
- return new EndTestResponse();
- }
- });
- }
-
- /** ActionRequest.getProperty() ActionRequest.getProperties() */
- public void createPropertyCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Property", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new InvokeGetResponse(response.createActionURL().toString());
- }
- });
-
- seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
- {
- try
- {
- request.getProperty(null);
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
- try
- {
- request.getProperties(null);
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
- }
- });
-
- seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
-
- return new EndTestResponse();
- }
- });
- }
-
- /** ActionRequest.getAttribute() ActionRequest.setAttribute() ActionRequest.removeAttribute() */
- public void createAttributeCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Attribute", seq);
-
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new InvokeGetResponse(response.createActionURL().toString());
- }
- });
-
- seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
- {
-
- try
- {
- request.getAttribute(null);
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
- try
- {
- request.setAttribute(null, new Object());
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
- try
- {
- request.removeAttribute(null);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- }
- }
- });
-
- seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new EndTestResponse();
- }
- });
- }
-
- /** ActionRequest.getParameter() ActionRequest.getParameterValues() */
- public void createParameterCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Parameter", seq);
-
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new InvokeGetResponse(response.createActionURL().toString());
- }
- });
-
- seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
- {
- try
- {
- request.getParameter(null);
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
- try
- {
- request.getParameterValues(null);
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
- }
- });
-
- seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new EndTestResponse();
- }
- });
- }
-
-
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/AttributeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/AttributeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/AttributeTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,101 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.actionrequest;
+
+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;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+
+/**
+ * ActionRequest.getAttribute() ActionRequest.setAttribute() ActionRequest.removeAttribute()
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class AttributeTestCase
+{
+ public AttributeTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new InvokeGetResponse(response.createActionURL().toString());
+ }
+ });
+
+ seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
+ {
+
+ try
+ {
+ request.getAttribute(null);
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ try
+ {
+ request.setAttribute(null, new Object());
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ try
+ {
+ request.removeAttribute(null);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ }
+ }
+ });
+
+ seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ConstantsTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ConstantsTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ConstantsTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.actionrequest;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ActionRequest;
+
+/**
+ * ActionRequest.BASIC_AUTH ActionRequest.CLIENT_CERT_AUTH ActionRequest.DIGEST_AUTH ActionRequest.FORM_AUTH
+ * ActionRequest.USER_INFO
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ConstantsTestCase
+{
+ public ConstantsTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+
+ assertEquals("javax.portlet.userinfo", ActionRequest.USER_INFO);
+ assertEquals("BASIC", ActionRequest.BASIC_AUTH);
+ assertEquals("FORM", ActionRequest.FORM_AUTH);
+ assertEquals("CLIENT_CERT", ActionRequest.CLIENT_CERT_AUTH);
+ assertEquals("DIGEST", ActionRequest.DIGEST_AUTH);
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ParameterTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ParameterTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/ParameterTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.actionrequest;
+
+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;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+
+/**
+ * ActionRequest.getParameter() ActionRequest.getParameterValues()
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ParameterTestCase
+{
+ public ParameterTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new InvokeGetResponse(response.createActionURL().toString());
+ }
+ });
+
+ seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
+ {
+ try
+ {
+ request.getParameter(null);
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ try
+ {
+ request.getParameterValues(null);
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+ }
+ });
+
+ seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/PropertyTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/PropertyTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionrequest/PropertyTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,92 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.actionrequest;
+
+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;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+
+/**
+ * ActionRequest.getProperty() ActionRequest.getProperties()
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PropertyTestCase
+{
+ public PropertyTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new InvokeGetResponse(response.createActionURL().toString());
+ }
+ });
+
+ seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
+ {
+ try
+ {
+ request.getProperty(null);
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ try
+ {
+ request.getProperties(null);
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+ }
+ });
+
+ seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/ActionResponseAPITestSuite.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/ActionResponseAPITestSuite.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/ActionResponseAPITestSuite.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,69 +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.portlet.jsr168.api.actionresponse;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.com">Boleslaw Dawidowicz</a>
- * @version $Revision: 5510 $
- */
-public class ActionResponseAPITestSuite
-{
-
- public static void suite()
- {
-// TestSuite suite = new TestSuite("test-jsr168-api-actionresponse.war");
-//
-// /**
-// * ActionResponse.setWindowState()
-// * ActionResponse.setPortletMode()
-// *
-// * TESTED in TCK asserts
-// */
-//
-// /**
-// * ActionResponse.setRedirect()
-// *
-// * TESTED in TCK asserts
-// */
-//
-// /**
-// * ActionResponse.setRenderParameter()
-// * ActionResponse.setRenderParameter()
-// * ActionResponse.setRenderParameters()
-// */
-// suite.addTest(new TestCase("RenderParameter"));
-//
-// /**
-// * ActionResponse.setProperty()
-// * ActionResponse.addProperty()
-// */
-// suite.addTest(new TestCase("Property"));
-//
-// /**
-// * ActionResponse.encodeURL()
-// */
-// suite.addTest(new TestCase("EncodeURL"));
-//
-// return suite;
- }
-}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/ActionResponseSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/ActionResponseSequenceBuilder.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/ActionResponseSequenceBuilder.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,290 +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.portlet.jsr168.api.actionresponse;
-
-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;
-import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import javax.portlet.Portlet;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class ActionResponseSequenceBuilder extends PortletTestSuite
-{
-
- /** ActionResponse.setRenderParameter() ActionResponse.setRenderParameter() ActionResponse.setRenderParameters() */
- public void createRenderParameterCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("RenderParameter", seq);
-
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new InvokeGetResponse(response.createActionURL().toString());
- }
- });
-
- seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
- {
-
- String val = null;
- String[] vals = null;
-
- try
- {
- response.setRenderParameter("name", val);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //expected
- }
-
- try
- {
- response.setRenderParameter(null, "val");
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
- try
- {
- response.setRenderParameter("name", vals);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
- try
- {
- response.setRenderParameter(null, new String[]{"val1, val2"});
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
- try
- {
- response.setRenderParameter(null, val);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
- try
- {
- response.setRenderParameter(null, vals);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
-
- try
- {
- response.setRenderParameters(null);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
- Map map = new HashMap();
-
- map.put("name", "val");
- map.put(null, "val");
-
- try
- {
- response.setRenderParameters(map);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
- map = new HashMap();
- map.put("name", "val");
- map.put("name2", new Object());
-
- try
- {
- response.setRenderParameters(map);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
- map = new HashMap();
- map.put("name", new String[]{"val"});
- map.put("name2", null);
-
- try
- {
- response.setRenderParameters(map);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
- }
- });
-
- seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new EndTestResponse();
- }
- });
- }
-
- //************************
- //PortletResponse methods:
- //************************
-
- /** ActionResponse.setProperty() ActionResponse.addProperty() */
- public void createPropertyCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Property", seq);
-
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new InvokeGetResponse(response.createActionURL().toString());
- }
- });
-
- seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
- {
- try
- {
- response.addProperty(null, "val");
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
- try
- {
- response.setProperty(null, "val");
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
- }
- });
-
- seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new EndTestResponse();
- }
- });
- }
-
- /** ActionResponse.encodeURL() */
- public void createEncodeURLCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("EncodeURL", seq);
-
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new InvokeGetResponse(response.createActionURL().toString());
- }
- });
-
- seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
- {
- try
- {
- response.encodeURL("not_absolute_and_not_slash_leading_path");
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
- }
- });
-
- seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new EndTestResponse();
- }
- });
- }
-
-
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/EncodeURLTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/EncodeURLTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/EncodeURLTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,80 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.actionresponse;
+
+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;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class EncodeURLTestCase
+{
+ public EncodeURLTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new InvokeGetResponse(response.createActionURL().toString());
+ }
+ });
+
+ seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
+ {
+ try
+ {
+ response.encodeURL("not_absolute_and_not_slash_leading_path");
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+ }
+ });
+
+ seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/PropertyTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/PropertyTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/PropertyTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,89 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.actionresponse;
+
+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;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PropertyTestCase
+{
+ public PropertyTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new InvokeGetResponse(response.createActionURL().toString());
+ }
+ });
+
+ seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
+ {
+ try
+ {
+ response.addProperty(null, "val");
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ try
+ {
+ response.setProperty(null, "val");
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+ }
+ });
+
+ seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/RenderParameterTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/RenderParameterTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/actionresponse/RenderParameterTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,191 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.actionresponse;
+
+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;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class RenderParameterTestCase
+{
+ public RenderParameterTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new InvokeGetResponse(response.createActionURL().toString());
+ }
+ });
+
+ seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context)
+ {
+
+ String val = null;
+ String[] vals = null;
+
+ try
+ {
+ response.setRenderParameter("name", val);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //expected
+ }
+
+ try
+ {
+ response.setRenderParameter(null, "val");
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+ try
+ {
+ response.setRenderParameter("name", vals);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+ try
+ {
+ response.setRenderParameter(null, new String[]{"val1, val2"});
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+ try
+ {
+ response.setRenderParameter(null, val);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+ try
+ {
+ response.setRenderParameter(null, vals);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+
+ try
+ {
+ response.setRenderParameters(null);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+ Map map = new HashMap();
+
+ map.put("name", "val");
+ map.put(null, "val");
+
+ try
+ {
+ response.setRenderParameters(map);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+ map = new HashMap();
+ map.put("name", "val");
+ map.put("name2", new Object());
+
+ try
+ {
+ response.setRenderParameters(map);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+ map = new HashMap();
+ map.put("name", new String[]{"val"});
+ map.put("name2", null);
+
+ try
+ {
+ response.setRenderParameters(map);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+ }
+ });
+
+ seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalContextAPITestSuite.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalContextAPITestSuite.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalContextAPITestSuite.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,59 +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.portlet.jsr168.api.portalcontext;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.com">Boleslaw Dawidowicz</a>
- * @version $Revision: 5510 $
- */
-public class PortalContextAPITestSuite
-{
-
- public static void suite()
- {
-// TestSuite suite = new TestSuite("test-jsr168-api-portalcontext.war");
-//
-// /**
-// * PortalContext.getSupportedPortletModes()
-// */
-// suite.addTest(new TestCase("SupportedPortletModes"));
-//
-// /**
-// * PortalContext.getSupportedWindowStates()
-// */
-// suite.addTest(new TestCase("SupportedWindowStates"));
-//
-// /**
-// * PortalContext.getPortalInfo()
-// */
-// suite.addTest(new TestCase("PortalInfo"));
-//
-// /**
-// * PortalContext.getProperty()
-// */
-// suite.addTest(new TestCase("Property"));
-//
-//
-// return suite;
- }
-}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalContextSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalContextSequenceBuilder.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalContextSequenceBuilder.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,154 +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.portlet.jsr168.api.portalcontext;
-
-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;
-import org.jboss.unit.driver.response.EndTestResponse;
-import org.jboss.unit.driver.DriverResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.Portlet;
-import javax.portlet.PortletMode;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.portlet.WindowState;
-import java.util.Enumeration;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class PortalContextSequenceBuilder extends PortletTestSuite
-{
- /** PortalContext.getSupportedPortletModes() */
- public void createSupportedPortletModesCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("SupportedPortletModes", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- Enumeration modesEnum = request.getPortalContext().getSupportedPortletModes();
-
- List modes = new LinkedList();
-
- while (modesEnum.hasMoreElements())
- {
- modes.add(modesEnum.nextElement());
- }
-
- //there should be three modes
- assertTrue(modes.size() == 3);
- assertTrue(modes.contains(PortletMode.VIEW));
- assertTrue(modes.contains(PortletMode.EDIT));
- assertTrue(modes.contains(PortletMode.HELP));
-
- return new EndTestResponse();
- }
- });
- }
-
- /** PortalContext.getSupportedWindowStates() */
- public void createSupportedWindowStatesCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("SupportedWindowStates", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- Enumeration statesEnum = request.getPortalContext().getSupportedWindowStates();
-
- List states = new LinkedList();
-
- while (statesEnum.hasMoreElements())
- {
- states.add(statesEnum.nextElement());
- }
-
- //there should be three modes
- assertTrue(states.size() == 3);
- assertTrue(states.contains(WindowState.NORMAL));
- assertTrue(states.contains(WindowState.MAXIMIZED));
- assertTrue(states.contains(WindowState.MINIMIZED));
-
-
- return new EndTestResponse();
- }
- });
- }
-
- /** PortalContext.getPortalInfo() */
- public void createPortalInfoCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("PortalInfo", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- String info = request.getPortalContext().getPortalInfo();
-
- assertTrue(info.length() > 0);
- assertTrue(info.startsWith("JBossPortal"));
-
- return new EndTestResponse();
- }
- });
- }
-
- /** PortalContext.getProperty() */
- public void createPropertyCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Property", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- //assert Exception is thrown
- try
- {
- request.getPortalContext().getProperty(null);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //expected
- }
-
- return new EndTestResponse();
- }
- });
- }
-
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalInfoTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalInfoTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PortalInfoTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portalcontext;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertTrue;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PortalInfoTestCase
+{
+ public PortalInfoTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ String info = request.getPortalContext().getPortalInfo();
+
+ assertTrue(info.length() > 0);
+ assertTrue(info.startsWith("JBossPortal"));
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PropertyTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PropertyTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/PropertyTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,64 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portalcontext;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PropertyTestCase
+{
+ public PropertyTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ //assert Exception is thrown
+ try
+ {
+ request.getPortalContext().getProperty(null);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //expected
+ }
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/SupportedPortletModesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/SupportedPortletModesTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/SupportedPortletModesTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -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.portlet.jsr168.api.portalcontext;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertTrue;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletMode;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.LinkedList;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class SupportedPortletModesTestCase
+{
+ public SupportedPortletModesTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ Enumeration modesEnum = request.getPortalContext().getSupportedPortletModes();
+
+ List modes = new LinkedList();
+
+ while (modesEnum.hasMoreElements())
+ {
+ modes.add(modesEnum.nextElement());
+ }
+
+ //there should be three modes
+ assertTrue(modes.size() == 3);
+ assertTrue(modes.contains(PortletMode.VIEW));
+ assertTrue(modes.contains(PortletMode.EDIT));
+ assertTrue(modes.contains(PortletMode.HELP));
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/SupportedWindowStatesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/SupportedWindowStatesTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portalcontext/SupportedWindowStatesTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,73 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portalcontext;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertTrue;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.WindowState;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.LinkedList;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class SupportedWindowStatesTestCase
+{
+ public SupportedWindowStatesTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ Enumeration statesEnum = request.getPortalContext().getSupportedWindowStates();
+
+ List states = new LinkedList();
+
+ while (statesEnum.hasMoreElements())
+ {
+ states.add(statesEnum.nextElement());
+ }
+
+ //there should be three modes
+ assertTrue(states.size() == 3);
+ assertTrue(states.contains(WindowState.NORMAL));
+ assertTrue(states.contains(WindowState.MAXIMIZED));
+ assertTrue(states.contains(WindowState.MINIMIZED));
+
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/InitParameterNamesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/InitParameterNamesTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/InitParameterNamesTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,100 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletconfig;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestContext;
+import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
+import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.portal.test.portlet.framework.UTP2;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNotNull;
+import static org.jboss.unit.api.Assert.assertTrue;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletConfig;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.LinkedList;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class InitParameterNamesTestCase
+{
+ public InitParameterNamesTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
+ PortletConfig config = aport.getPortletConfig();
+
+ assertNotNull(config);
+ Enumeration e = config.getInitParameterNames();
+
+ //should be EMPTY
+ assertTrue(!e.hasMoreElements());
+
+ //we do nothing. response will be rendered by other portlet. If failed there will be
+ //two results so whole test case will fail;
+ return null;
+ }
+ });
+
+ seq.addAction(0, UTP2.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
+ PortletConfig config = aport.getPortletConfig();
+
+ assertNotNull(config);
+
+ Enumeration enumer = config.getInitParameterNames();
+ //construct list from names enumeration
+ List names = new LinkedList();
+
+ while (enumer.hasMoreElements())
+ {
+ names.add(enumer.nextElement());
+ }
+
+ //assert it contains correct names
+ assertEquals(2, names.size());
+
+ assertTrue(names.contains("InitParamA"));
+ assertTrue(names.contains("InitParamB"));
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/InitParameterTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/InitParameterTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/InitParameterTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,81 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletconfig;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestContext;
+import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
+import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
+import org.jboss.portal.test.portlet.framework.UTP2;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNotNull;
+import static org.jboss.unit.api.Assert.assertEquals;
+import static org.jboss.unit.api.Assert.assertNull;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletConfig;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class InitParameterTestCase
+{
+ public InitParameterTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP2.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
+ PortletConfig config = aport.getPortletConfig();
+
+ assertNotNull(config);
+
+ //assert correct values
+ assertEquals("InitParamAValue", config.getInitParameter("InitParamA"));
+ assertEquals("InitParamBValue", config.getInitParameter("InitParamB"));
+
+ //assert param not exists
+ assertNull(config.getInitParameter("InitParamC"));
+
+ //assert IllegalArgumentException when name is null
+ try
+ {
+ config.getInitParameter(null);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //expected
+ }
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletConfigAPITestSuite.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletConfigAPITestSuite.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletConfigAPITestSuite.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,64 +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.portlet.jsr168.api.portletconfig;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.com">Boleslaw Dawidowicz</a>
- * @version $Revision: 5510 $
- */
-public class PortletConfigAPITestSuite
-{
-
- public static void suite()
- {
-// TestSuite suite = new TestSuite("test-jsr168-api-portletconfig.war");
-//
-// /**
-// * These are tested in TCKAssertion tests:
-// * PortletConfig.getResourceBundle
-// */
-//
-// /**
-// * PortletConfig.getPortletName()
-// */
-// suite.addTest(new TestCase("PortletName"));
-//
-// /**
-// * PortletConfig.getPortletContext()
-// */
-// suite.addTest(new TestCase("PortletContext"));
-//
-// /**
-// * PortletConfig.getInitParameter()
-// */
-// suite.addTest(new TestCase("InitParameter"));
-//
-// /**
-// * PortletConfig.getInitParameterNames()
-// */
-// suite.addTest(new TestCase("InitParameterNames"));
-//
-//
-// return suite;
- }
-}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletConfigSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletConfigSequenceBuilder.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletConfigSequenceBuilder.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,189 +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.portlet.jsr168.api.portletconfig;
-
-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;
-import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.test.portlet.framework.UTP2;
-import org.jboss.unit.driver.response.EndTestResponse;
-import org.jboss.unit.driver.DriverResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.Portlet;
-import javax.portlet.PortletConfig;
-import javax.portlet.PortletContext;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import java.util.Enumeration;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class PortletConfigSequenceBuilder extends PortletTestSuite
-{
-
- /** @portlet.api assert="PortletConfig.getPortletName()" */
- public void createPortletNameCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("PortletName", seq);
-
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
- PortletConfig config = aport.getPortletConfig();
- assertNotNull(config);
- assertEquals("TestUniversalPortletA", config.getPortletName());
- return new EndTestResponse();
- }
- });
- }
-
- /** @portlet.api assert="PortletConfig.getPortletContext()" */
- public void createPortletContextCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("PortletContext", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
- PortletConfig config = aport.getPortletConfig();
-
- assertNotNull(config);
-
- PortletContext portletContext = config.getPortletContext();
-
- assertNotNull(portletContext);
-
- return new EndTestResponse();
- }
- });
- }
-
- /** @portlet.api assert="PortletConfig.getInitParameter()" */
- public void createInitParameterCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("InitParameter", seq);
- seq.addAction(0, UTP2.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
- PortletConfig config = aport.getPortletConfig();
-
- assertNotNull(config);
-
- //assert correct values
- assertEquals("InitParamAValue", config.getInitParameter("InitParamA"));
- assertEquals("InitParamBValue", config.getInitParameter("InitParamB"));
-
- //assert param not exists
- assertNull(config.getInitParameter("InitParamC"));
-
- //assert IllegalArgumentException when name is null
- try
- {
- config.getInitParameter(null);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //expected
- }
-
- return new EndTestResponse();
- }
- });
- }
-
- /** @portlet.api assert="PortletConfig.getInitParameterNames()" */
- public void createInitParameterNamesCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("InitParameterNames", seq);
-
- //this portlet has no init params defined
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
- PortletConfig config = aport.getPortletConfig();
-
- assertNotNull(config);
- Enumeration e = config.getInitParameterNames();
-
- //should be EMPTY
- assertTrue(!e.hasMoreElements());
-
- //we do nothing. response will be rendered by other portlet. If failed there will be
- //two results so whole test case will fail;
- return null;
- }
- });
-
- seq.addAction(0, UTP2.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
- PortletConfig config = aport.getPortletConfig();
-
- assertNotNull(config);
-
- Enumeration enumer = config.getInitParameterNames();
- //construct list from names enumeration
- List names = new LinkedList();
-
- while (enumer.hasMoreElements())
- {
- names.add(enumer.nextElement());
- }
-
- //assert it contains correct names
- assertEquals(2, names.size());
-
- assertTrue(names.contains("InitParamA"));
- assertTrue(names.contains("InitParamB"));
-
- return new EndTestResponse();
- }
- });
- }
-
-
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletContextTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletContextTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletContextTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,65 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletconfig;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestContext;
+import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
+import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNotNull;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletContext;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PortletContextTestCase
+{
+ public PortletContextTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
+ PortletConfig config = aport.getPortletConfig();
+
+ assertNotNull(config);
+
+ PortletContext portletContext = config.getPortletContext();
+
+ assertNotNull(portletContext);
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletNameTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletNameTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletconfig/PortletNameTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletconfig;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestContext;
+import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
+import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNotNull;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletConfig;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PortletNameTestCase
+{
+ public PortletNameTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
+ PortletConfig config = aport.getPortletConfig();
+ assertNotNull(config);
+ assertEquals("TestUniversalPortletA", config.getPortletName());
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/AttributeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/AttributeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/AttributeTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,88 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletcontext;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestContext;
+import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
+import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class AttributeTestCase
+{
+ public AttributeTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+
+ AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
+
+ try
+ {
+ aport.getPortletContext().getAttribute(null);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //expected
+ }
+
+ try
+ {
+ aport.getPortletContext().setAttribute(null, null);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //expected
+ }
+
+ try
+ {
+ aport.getPortletContext().removeAttribute(null);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //expected
+ }
+
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/DispatcherTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/DispatcherTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/DispatcherTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletcontext;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestContext;
+import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
+import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNull;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class DispatcherTestCase
+{
+ public DispatcherTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
+
+ //when dispatcher is not obtained it should return null
+ //assertNull(aport.getPortletContext().getRequestDispatcher("/notExistingDispatcher.jsp"));
+ assertNull(aport.getPortletContext().getNamedDispatcher("NotExistingDispatcher"));
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/InitParameterTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/InitParameterTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/InitParameterTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,70 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletcontext;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestContext;
+import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
+import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNull;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class InitParameterTestCase
+{
+ public InitParameterTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+
+ AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
+
+ assertNull(aport.getPortletContext().getInitParameter("NotExistingParamName"));
+
+ try
+ {
+ aport.getPortletContext().getInitParameter(null);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //expected
+ }
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/MimeTypeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/MimeTypeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/MimeTypeTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletcontext;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestContext;
+import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
+import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+import static org.jboss.unit.api.Assert.assertNull;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class MimeTypeTestCase
+{
+ public MimeTypeTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
+ assertEquals("text/plain", aport.getPortletContext().getMimeType("/simple_resource.txt"));
+ assertNull(aport.getPortletContext().getMimeType("/notExistingResource"));
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextAPITestSuite.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextAPITestSuite.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextAPITestSuite.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,93 +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.portlet.jsr168.api.portletcontext;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.com">Boleslaw Dawidowicz</a>
- * @version $Revision: 5510 $
- */
-public class PortletContextAPITestSuite
-{
-
- public static void suite()
- {
-// TestSuite suite = new TestSuite("test-jsr168-api-portletcontext.war");
-//
-// /**
-// * PortletContext.getServerInfo()
-// */
-// suite.addTest(new TestCase("ServerInfo"));
-//
-// /**
-// * PortletContext.getRequestDispatcher()
-// * PortletContext.getNamedDispatcher()
-// */
-// suite.addTest(new TestCase("Dispatcher"));
-//
-// /**
-// * PortletContext.getResource()
-// * PortletContext.getResourceAsStream()
-// * tested in TCK asserts
-// */
-//
-// /**
-// * PortletContext.getMinorVersion()
-// * PortletContext.getMajorVersion()
-// */
-// suite.addTest(new TestCase("Version"));
-//
-// /**
-// * PortletContext.getMimeType()
-// */
-// suite.addTest(new TestCase("MimeType"));
-//
-// /**
-// * PortletContext.getResourcePaths()
-// */
-// suite.addTest(new TestCase("ResourcePaths"));
-//
-// /**
-// * PortletContext.getResource()
-// */
-// suite.addTest(new TestCase("Resource"));
-//
-// /**
-// * PortletContext.getAttribute()
-// * PortletContext.removeAttribute()
-// * PortletContext.setAttribute()
-// */
-// suite.addTest(new TestCase("Attribute"));
-//
-// /**
-// * PortletContext.getInitParameter()
-// */
-// suite.addTest(new TestCase("InitParameter"));
-//
-// /**
-// * PortletContext.getPortletContextName()
-// */
-// suite.addTest(new TestCase("PortletContextName"));
-//
-// return suite;
- }
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextNameTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextNameTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextNameTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletcontext;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestContext;
+import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
+import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PortletContextNameTestCase
+{
+ public PortletContextNameTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+
+ AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
+
+ assertEquals("PortletContext WebApp", aport.getPortletContext().getPortletContextName());
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextSequenceBuilder.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/PortletContextSequenceBuilder.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,288 +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.portlet.jsr168.api.portletcontext;
-
-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;
-import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
-import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.unit.driver.response.EndTestResponse;
-import org.jboss.unit.driver.DriverResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.Portlet;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import java.net.MalformedURLException;
-import java.util.Set;
-import java.util.regex.Pattern;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class PortletContextSequenceBuilder extends PortletTestSuite
-{
-
- /** . */
- private static final String VERSION_REGEX = "JBossPortal/[0-9]+\\.[0-9]+";
-
- /** . */
- private static final Pattern VERSION_PATTERN = Pattern.compile(VERSION_REGEX, Pattern.CASE_INSENSITIVE);
-
- /** PortletContext.getServerInfo() */
- public void createServerInfoCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("ServerInfo", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
- String info = aport.getPortletContext().getServerInfo();
- boolean matches = VERSION_PATTERN.matcher(info).matches();
- assertTrue("Version " + info + " does not match the format", matches);
- return new EndTestResponse();
- }
- });
- }
-
- /** PortletContext.getRequestDispatcher() PortletContext.getNamedDispatcher() */
- public void createDispatcherCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Dispatcher", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
-
- //when dispatcher is not obtained it should return null
- //assertNull(aport.getPortletContext().getRequestDispatcher("/notExistingDispatcher.jsp"));
- assertNull(aport.getPortletContext().getNamedDispatcher("NotExistingDispatcher"));
-
- return new EndTestResponse();
- }
- });
- }
-
- /** PortletContext.getMinorVersion() PortletContext.getMajorVersion() */
- public void createVersionCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Version", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
-
- assertEquals(TestContants.MINOR_VERSION, aport.getPortletContext().getMinorVersion());
- assertEquals(TestContants.MAJOR_VERSION, aport.getPortletContext().getMajorVersion());
- return new EndTestResponse();
- }
- });
- }
-
- /** PortletContext.getMimeType() */
- public void createMimeTypeCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("MimeType", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
- assertEquals("text/plain", aport.getPortletContext().getMimeType("/simple_resource.txt"));
- assertNull(aport.getPortletContext().getMimeType("/notExistingResource"));
- return new EndTestResponse();
- }
- });
- }
-
- /** PortletContext.getResourcePaths() */
- public void createResourcePathsCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("ResourcePaths", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
-
- assertNull(aport.getPortletContext().getResourcePaths("/NotExistingResourcePath/"));
-
- Set paths = aport.getPortletContext().getResourcePaths("/");
- assertTrue(paths.contains("/WEB-INF/"));
- assertTrue(paths.contains("/simple_resource.txt"));
-
- return new EndTestResponse();
- }
- });
- }
-
- /** PortletContext.getResource() */
- public void createResourceCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Resource", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
-
- //wrong url format
- try
- {
- aport.getPortletContext().getResource("simple_resource.txt");
- fail();
- }
- catch (MalformedURLException e)
- {
- //expected
- }
-
- //not existing resource
- try
- {
- assertNull(aport.getPortletContext().getResource("/NotExist.txt"));
- }
- catch (MalformedURLException e)
- {
- //something wrong?
- fail();
- }
-
-
- return new EndTestResponse();
- }
- });
- }
-
- /** PortletContext.getAttribute() PortletContext.removeAttribute() PortletContext.setAttribute() */
- public void createAttributeCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Attribute", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
-
- AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
-
- try
- {
- aport.getPortletContext().getAttribute(null);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //expected
- }
-
- try
- {
- aport.getPortletContext().setAttribute(null, null);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //expected
- }
-
- try
- {
- aport.getPortletContext().removeAttribute(null);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //expected
- }
-
-
- return new EndTestResponse();
- }
- });
- }
-
- /** PortletContext.getInitParameter() */
- public void createInitParameterCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("InitParameter", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
-
- AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
-
- assertNull(aport.getPortletContext().getInitParameter("NotExistingParamName"));
-
- try
- {
- aport.getPortletContext().getInitParameter(null);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //expected
- }
-
- return new EndTestResponse();
- }
- });
- }
-
- /** PortletContext.getPortletContextName() */
- public void createPortletContextNameCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("PortletContextName", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
-
- AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
-
- assertEquals("PortletContext WebApp", aport.getPortletContext().getPortletContextName());
- return new EndTestResponse();
- }
- });
- }
-
-
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ResourcePathsTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ResourcePathsTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ResourcePathsTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,64 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletcontext;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestContext;
+import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
+import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertNull;
+import static org.jboss.unit.api.Assert.assertTrue;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ResourcePathsTestCase
+{
+ public ResourcePathsTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
+
+ assertNull(aport.getPortletContext().getResourcePaths("/NotExistingResourcePath/"));
+
+ Set paths = aport.getPortletContext().getResourcePaths("/");
+ assertTrue(paths.contains("/WEB-INF/"));
+ assertTrue(paths.contains("/simple_resource.txt"));
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ResourceTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ResourceTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ResourceTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,81 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletcontext;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestContext;
+import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
+import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.fail;
+import static org.jboss.unit.api.Assert.assertNull;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.net.MalformedURLException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ResourceTestCase
+{
+ public ResourceTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
+
+ //wrong url format
+ try
+ {
+ aport.getPortletContext().getResource("simple_resource.txt");
+ fail();
+ }
+ catch (MalformedURLException e)
+ {
+ //expected
+ }
+
+ //not existing resource
+ try
+ {
+ assertNull(aport.getPortletContext().getResource("/NotExist.txt"));
+ }
+ catch (MalformedURLException e)
+ {
+ //something wrong?
+ fail();
+ }
+
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ServerInfoTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ServerInfoTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/ServerInfoTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,66 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletcontext;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestContext;
+import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
+import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertTrue;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.util.regex.Pattern;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ServerInfoTestCase
+{
+
+ /** . */
+ private static final String VERSION_REGEX = "JBossPortal/[0-9]+\\.[0-9]+";
+
+ /** . */
+ private static final Pattern VERSION_PATTERN = Pattern.compile(VERSION_REGEX, Pattern.CASE_INSENSITIVE);
+
+ public ServerInfoTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
+ String info = aport.getPortletContext().getServerInfo();
+ boolean matches = VERSION_PATTERN.matcher(info).matches();
+ assertTrue("Version " + info + " does not match the format", matches);
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/VersionTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/VersionTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletcontext/VersionTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletcontext;
+
+import org.jboss.portal.test.framework.portlet.PortletTest;
+import org.jboss.portal.test.framework.portlet.PortletTestContext;
+import org.jboss.portal.test.framework.portlet.TestContants;
+import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
+import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class VersionTestCase
+{
+ public VersionTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ AbstractUniversalTestPortlet aport = (AbstractUniversalTestPortlet)portlet;
+
+ assertEquals(TestContants.MINOR_VERSION, aport.getPortletContext().getMinorVersion());
+ assertEquals(TestContants.MAJOR_VERSION, aport.getPortletContext().getMajorVersion());
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/ConstructorTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/ConstructorTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/ConstructorTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletmode;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletMode;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ConstructorTestCase
+{
+ public ConstructorTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ assertEquals("testmode", "" + new PortletMode("testmode"));
+ assertEquals("testmode", "" + new PortletMode("TESTMODE"));
+ assertEquals("testmode", "" + new PortletMode("TestMode"));
+ assertEquals("", "" + new PortletMode(""));
+
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/EqualsTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/EqualsTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/EqualsTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,64 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletmode;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertTrue;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletMode;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class EqualsTestCase
+{
+ public EqualsTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletMode pm1 = new PortletMode("TestMode");
+ PortletMode pm2 = new PortletMode("TestMode");
+ PortletMode pm3 = new PortletMode("OtherMode");
+
+ //true
+ assertTrue(pm1.equals(pm2));
+ //false
+ assertTrue(!pm1.equals(pm3));
+
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/HashCodeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/HashCodeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/HashCodeTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,70 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletmode;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertTrue;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletMode;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class HashCodeTestCase
+{
+ public HashCodeTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletMode pm1 = new PortletMode("TestMode");
+ PortletMode pm2 = new PortletMode("TestMode");
+ PortletMode pm3 = new PortletMode("OtherMode");
+
+ //true
+ assertTrue(pm1.hashCode() == pm2.hashCode());
+ //false
+ assertTrue(pm1.hashCode() != pm3.hashCode());
+
+ //Hashcodes are constructed from strings
+ assertEquals("testmode".hashCode(), pm1.hashCode());
+ assertEquals("testmode".hashCode(), pm2.hashCode());
+ assertEquals("othermode".hashCode(), pm3.hashCode());
+
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/ModesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/ModesTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/ModesTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletmode;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletMode;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ModesTestCase
+{
+ public ModesTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ assertEquals("view", "" + PortletMode.VIEW);
+ assertEquals("edit", "" + PortletMode.EDIT);
+ assertEquals("help", "" + PortletMode.HELP);
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/PortletModeAPITestSuite.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/PortletModeAPITestSuite.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/PortletModeAPITestSuite.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,60 +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.portlet.jsr168.api.portletmode;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.com">Boleslaw Dawidowicz</a>
- * @version $Revision: 5510 $
- */
-public class PortletModeAPITestSuite
-{
-
- public static void suite()
- {
-// TestSuite suite = new TestSuite("test-jsr168-api-portletmode.war");
-//
-// /**
-// * PortletMode.VIEW
-// * PortletMode.EDIT
-// * PortletMode.HELP
-// */
-// suite.addTest(new TestCase("Modes"));
-//
-// /**
-// * PortletMode.PortletMode()
-// */
-// suite.addTest(new TestCase("Constructor"));
-//
-// /**
-// * @portlet.api assert="PortletConfig.equals()"
-// */
-// suite.addTest(new TestCase("Equals"));
-//
-// /**
-// * @portlet.api assert="PortletConfig.hashCode()"
-// */
-// suite.addTest(new TestCase("HashCode"));
-//
-// return suite;
- }
-}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/PortletModeSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/PortletModeSequenceBuilder.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletmode/PortletModeSequenceBuilder.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,138 +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.portlet.jsr168.api.portletmode;
-
-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;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.Portlet;
-import javax.portlet.PortletMode;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class PortletModeSequenceBuilder extends PortletTestSuite
-{
-
- /** @portlet.api assert="PortletMode.EDIT, PortletMode.HELP, PortletMode.VIEW" */
- public void createModesCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Modes", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- assertEquals("view", "" + PortletMode.VIEW);
- assertEquals("edit", "" + PortletMode.EDIT);
- assertEquals("help", "" + PortletMode.HELP);
-
- return new EndTestResponse();
- }
- });
- }
-
- /** @portlet.api assert="PortletMode.PortletMode()" */
- public void createConstructorCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Constructor", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- assertEquals("testmode", "" + new PortletMode("testmode"));
- assertEquals("testmode", "" + new PortletMode("TESTMODE"));
- assertEquals("testmode", "" + new PortletMode("TestMode"));
- assertEquals("", "" + new PortletMode(""));
-
-
- return new EndTestResponse();
- }
- });
- }
-
- /** @portlet.api assert="PortletConfig.equals()" */
- public void createEqualsCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Equals", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletMode pm1 = new PortletMode("TestMode");
- PortletMode pm2 = new PortletMode("TestMode");
- PortletMode pm3 = new PortletMode("OtherMode");
-
- //true
- assertTrue(pm1.equals(pm2));
- //false
- assertTrue(!pm1.equals(pm3));
-
-
- return new EndTestResponse();
- }
- });
- }
-
- /** @portlet.api assert="PortletConfig.hashCode()" */
- public void createHashCodeCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("HashCode", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletMode pm1 = new PortletMode("TestMode");
- PortletMode pm2 = new PortletMode("TestMode");
- PortletMode pm3 = new PortletMode("OtherMode");
-
- //true
- assertTrue(pm1.hashCode() == pm2.hashCode());
- //false
- assertTrue(pm1.hashCode() != pm3.hashCode());
-
- //Hashcodes are constructed from strings
- assertEquals("testmode".hashCode(), pm1.hashCode());
- assertEquals("testmode".hashCode(), pm2.hashCode());
- assertEquals("othermode".hashCode(), pm3.hashCode());
-
-
- return new EndTestResponse();
- }
- });
- }
-}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/PortletPreferencesAPITestSuite.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/PortletPreferencesAPITestSuite.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/PortletPreferencesAPITestSuite.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,58 +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.portlet.jsr168.api.portletpreferences;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.com">Boleslaw Dawidowicz</a>
- * @version $Revision: 5510 $
- */
-public class PortletPreferencesAPITestSuite
-{
-
- public static void suite()
- {
-// TestSuite suite = new TestSuite("test-jsr168-api-portletpreferences.war");
-//
-// /**
-// * PortletPreferences.isReadOnly()
-// */
-// suite.addTest(new TestCase("ReadOnly"));
-//
-// /**
-// * PortletPreferences.getValue()
-// * PortletPreferences.getValues()
-// * PortletPreferences.setValue()
-// * PortletPreferences.setValues()
-// */
-// suite.addTest(new TestCase("Value"));
-//
-// /**
-// * PortletPreferences.reset()
-// */
-// suite.addTest(new TestCase("ResetNullKeyThrowsNPE"));
-// suite.addTest(new TestCase("ZeroLengthArrayValue"));
-//
-//
-// return suite;
- }
-}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/PortletPreferencesSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/PortletPreferencesSequenceBuilder.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/PortletPreferencesSequenceBuilder.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,283 +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.portlet.jsr168.api.portletpreferences;
-
-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;
-import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.test.portlet.framework.UTP2;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-
-import static org.jboss.unit.api.Assert.*;
-import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
-
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import javax.portlet.Portlet;
-import javax.portlet.PortletPreferences;
-import javax.portlet.PortletURL;
-import javax.portlet.ReadOnlyException;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.portlet.ValidatorException;
-import java.io.IOException;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class PortletPreferencesSequenceBuilder extends PortletTestSuite
-{
-
- /** PortletPreferences.isReadOnly() */
- public void createReadOnlyCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("ReadOnly", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
-
- try
- {
- request.getPreferences().isReadOnly(null);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //expected
- }
- return new EndTestResponse();
- }
- });
- }
-
- /**
- * PortletPreferences.getValue() PortletPreferences.getValues() PortletPreferences.setValue()
- * PortletPreferences.setValues()
- */
- public void createValueCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Value", seq);
-
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new InvokeGetResponse(response.createActionURL().toString());
- }
- });
-
- seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws ReadOnlyException
- {
- PortletPreferences prefs = request.getPreferences();
-
- //correct
- try
- {
- prefs.getValue("name", null);
-
- }
- catch (IllegalArgumentException e)
- {
- fail();
- }
-
- try
- {
- prefs.getValues("name", null);
- }
- catch (IllegalArgumentException e)
- {
- fail();
- }
-
- //wrong
- try
- {
- prefs.getValue(null, "val");
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
- try
- {
- prefs.getValues(null, new String[]{"val"});
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
- //and the "set" ones
-
- //correct
- //(need user auth)
- /*try
- {
- prefs.setValue("name", null);
- }
- catch (IllegalArgumentException e)
- {
- fail();
- }
-
- try
- {
- prefs.setValues("name", null);
- }
- catch (IllegalArgumentException e)
- {
- fail();
- }*/
-
- //wrong
- try
- {
- prefs.setValue(null, null);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
- try
- {
- prefs.setValues(null, null);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
- }
- });
-
- seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- return new EndTestResponse();
- }
- });
- }
-
- /** PortletPreferences.reset() */
- public void createResetNullKeyThrowsNPE(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("ResetNullKeyThrowsNPE", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws ReadOnlyException
- {
- try
- {
- request.getPreferences().reset(null);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //expected
- }
- return new EndTestResponse();
- }
- });
- }
-
- /**
- *
- */
- public void createZeroLengthArrayValue(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("ZeroLengthArrayValue", seq);
- seq.addAction(0, UTP2.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletPreferences prefs = request.getPreferences();
-
- // With the default value coming from the portlet.xml descriptor
- String value = prefs.getValue("empty", "other");
- assertEquals("other", value);
- assertEquals(new String[0], prefs.getValues("empty", new String[]{"other"}));
-
- //
- PortletURL url = response.createActionURL();
- return new InvokeGetResponse(url.toString());
- }
- });
- seq.addAction(1, UTP2.ACTION_JOINPOINT, new PortletActionTestAction()
- {
- protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws ReadOnlyException, IOException, ValidatorException
- {
- PortletPreferences prefs = request.getPreferences();
-
- // Check it does not exist yet
- assertEquals("other", prefs.getValue("dynamic", "other"));
- assertEquals(new String[]{"other"}, prefs.getValues("dynamic", new String[]{"other"}));
-
- // Set the value to the empty array and check we get the other value
- prefs.setValues("dynamic", new String[0]);
- assertEquals("other", prefs.getValue("dynamic", "other"));
- assertEquals(new String[0], prefs.getValues("dynamic", new String[]{"other"}));
-
- // Commit change
- prefs.store();
-
- // Check we still have the other value
- assertEquals("other", prefs.getValue("dynamic", "other"));
- assertEquals(new String[0], prefs.getValues("dynamic", new String[]{"other"}));
- }
- });
- seq.addAction(1, UTP2.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletPreferences prefs = request.getPreferences();
-
- // Check we still have the other value
- assertEquals("other", prefs.getValue("dynamic", "other"));
- assertEquals(new String[0], prefs.getValues("dynamic", new String[]{"other"}));
-
- //
- return new EndTestResponse();
- }
- });
- }
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ReadOnlyTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ReadOnlyTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ReadOnlyTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,62 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletpreferences;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ReadOnlyTestCase
+{
+ public ReadOnlyTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ try
+ {
+ request.getPreferences().isReadOnly(null);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //expected
+ }
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ResetNullKeyThrowsNPETestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ResetNullKeyThrowsNPETestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ResetNullKeyThrowsNPETestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletpreferences;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ReadOnlyException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ResetNullKeyThrowsNPETestCase
+{
+ public ResetNullKeyThrowsNPETestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws ReadOnlyException
+ {
+ try
+ {
+ request.getPreferences().reset(null);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //expected
+ }
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ValueTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ValueTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ValueTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,159 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletpreferences;
+
+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;
+import org.jboss.portal.test.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.ReadOnlyException;
+import javax.portlet.PortletPreferences;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ValueTestCase
+{
+ public ValueTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new InvokeGetResponse(response.createActionURL().toString());
+ }
+ });
+
+ seq.addAction(1, UTP1.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws ReadOnlyException
+ {
+ PortletPreferences prefs = request.getPreferences();
+
+ //correct
+ try
+ {
+ prefs.getValue("name", null);
+
+ }
+ catch (IllegalArgumentException e)
+ {
+ fail();
+ }
+
+ try
+ {
+ prefs.getValues("name", null);
+ }
+ catch (IllegalArgumentException e)
+ {
+ fail();
+ }
+
+ //wrong
+ try
+ {
+ prefs.getValue(null, "val");
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+ try
+ {
+ prefs.getValues(null, new String[]{"val"});
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+ //and the "set" ones
+
+ //correct
+ //(need user auth)
+ /*try
+ {
+ prefs.setValue("name", null);
+ }
+ catch (IllegalArgumentException e)
+ {
+ fail();
+ }
+
+ try
+ {
+ prefs.setValues("name", null);
+ }
+ catch (IllegalArgumentException e)
+ {
+ fail();
+ }*/
+
+ //wrong
+ try
+ {
+ prefs.setValue(null, null);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+ try
+ {
+ prefs.setValues(null, null);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+ }
+ });
+
+ seq.addAction(1, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ZeroLengthArrayValueTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ZeroLengthArrayValueTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletpreferences/ZeroLengthArrayValueTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,108 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletpreferences;
+
+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;
+import org.jboss.portal.test.portlet.framework.UTP2;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletPreferences;
+import javax.portlet.PortletURL;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.ReadOnlyException;
+import javax.portlet.ValidatorException;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ZeroLengthArrayValueTestCase
+{
+ public ZeroLengthArrayValueTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP2.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletPreferences prefs = request.getPreferences();
+
+ // With the default value coming from the portlet.xml descriptor
+ String value = prefs.getValue("empty", "other");
+ assertEquals("other", value);
+ assertEquals(new String[0], prefs.getValues("empty", new String[]{"other"}));
+
+ //
+ PortletURL url = response.createActionURL();
+ return new InvokeGetResponse(url.toString());
+ }
+ });
+ seq.addAction(1, UTP2.ACTION_JOINPOINT, new PortletActionTestAction()
+ {
+ protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws ReadOnlyException, IOException, ValidatorException
+ {
+ PortletPreferences prefs = request.getPreferences();
+
+ // Check it does not exist yet
+ assertEquals("other", prefs.getValue("dynamic", "other"));
+ assertEquals(new String[]{"other"}, prefs.getValues("dynamic", new String[]{"other"}));
+
+ // Set the value to the empty array and check we get the other value
+ prefs.setValues("dynamic", new String[0]);
+ assertEquals("other", prefs.getValue("dynamic", "other"));
+ assertEquals(new String[0], prefs.getValues("dynamic", new String[]{"other"}));
+
+ // Commit change
+ prefs.store();
+
+ // Check we still have the other value
+ assertEquals("other", prefs.getValue("dynamic", "other"));
+ assertEquals(new String[0], prefs.getValues("dynamic", new String[]{"other"}));
+ }
+ });
+ seq.addAction(1, UTP2.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletPreferences prefs = request.getPreferences();
+
+ // Check we still have the other value
+ assertEquals("other", prefs.getValue("dynamic", "other"));
+ assertEquals(new String[0], prefs.getValues("dynamic", new String[]{"other"}));
+
+ //
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/AttributeNamesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/AttributeNamesTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/AttributeNamesTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,82 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletsession;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletSession;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class AttributeNamesTestCase
+{
+ public AttributeNamesTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletSession session = request.getPortletSession();
+
+ //before invalidate
+ session.getAttributeNames();
+ session.getAttributeNames(PortletSession.APPLICATION_SCOPE);
+
+ session.invalidate();
+
+ //after invalidate
+
+ try
+ {
+ session.getAttributeNames();
+ fail();
+ }
+ catch (IllegalStateException expected)
+ {
+ }
+
+ try
+ {
+ session.getAttributeNames(PortletSession.APPLICATION_SCOPE);
+ fail();
+ }
+ catch (IllegalStateException expected)
+ {
+ }
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/ConstantsTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/ConstantsTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/ConstantsTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,56 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletsession;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletSession;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ConstantsTestCase
+{
+ public ConstantsTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ assertEquals(0x01, PortletSession.APPLICATION_SCOPE);
+ assertEquals(0x02, PortletSession.PORTLET_SCOPE);
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/CreationTimeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/CreationTimeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/CreationTimeTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,70 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletsession;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletSession;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class CreationTimeTestCase
+{
+ public CreationTimeTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletSession session = request.getPortletSession();
+
+ //before invalidate
+ session.getCreationTime();
+
+ session.invalidate();
+
+ //after invalidate
+ try
+ {
+ session.getCreationTime();
+ fail();
+ }
+ catch (IllegalStateException expected)
+ {
+ }
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/GetAttributeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/GetAttributeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/GetAttributeTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,97 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletsession;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletSession;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class GetAttributeTestCase
+{
+ public GetAttributeTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletSession session = request.getPortletSession();
+
+ try
+ {
+ session.getAttribute(null);
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ try
+ {
+ session.getAttribute(null, PortletSession.APPLICATION_SCOPE);
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+
+ session.invalidate();
+
+ //After invalidate
+ try
+ {
+ session.getAttribute("name");
+ fail();
+ }
+ catch (IllegalStateException expecte)
+ {
+ }
+
+ try
+ {
+ session.getAttribute("name", PortletSession.PORTLET_SCOPE);
+ fail();
+ }
+ catch (IllegalStateException expected)
+ {
+ }
+
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/InvalidateTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/InvalidateTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/InvalidateTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,68 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletsession;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletSession;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class InvalidateTestCase
+{
+ public InvalidateTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletSession session = request.getPortletSession();
+
+ session.invalidate();
+
+ //one more...
+ try
+ {
+ session.invalidate();
+ fail();
+ }
+ catch (IllegalStateException expected)
+ {
+ }
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/NewTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/NewTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/NewTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,70 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletsession;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletSession;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class NewTestCase
+{
+ public NewTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletSession session = request.getPortletSession();
+
+ //before invalidation
+ session.isNew();
+
+ session.invalidate();
+
+ //after invalidation
+ try
+ {
+ session.isNew();
+ fail();
+ }
+ catch (IllegalStateException expected)
+ {
+ }
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/PortletSessionAPITestSuite.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/PortletSessionAPITestSuite.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/PortletSessionAPITestSuite.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,79 +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.portlet.jsr168.api.portletsession;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.com">Boleslaw Dawidowicz</a>
- * @version $Revision: 5510 $
- */
-public class PortletSessionAPITestSuite
-{
-
- public static void suite()
- {
-// TestSuite suite = new TestSuite("test-jsr168-api-portletsession.war");
-//
-// /**
-// * PortletSession.APPLICATION_SCOPE
-// * PortletSession.PORTLET_SCOPE
-// */
-// suite.addTest(new TestCase("Constants"));
-//
-// /**
-// * PortletSession.getAttribute()
-// */
-// suite.addTest(new TestCase("GetAttribute"));
-//
-// /**
-// * PortletSession.getAttributeNames()
-// */
-// suite.addTest(new TestCase("AttributeNames"));
-//
-// /**
-// * PortletSession.getCreationTime()
-// */
-// suite.addTest(new TestCase("CreationTime"));
-//
-// /**
-// * PortletSession.invalidate()
-// */
-// suite.addTest(new TestCase("Invalidate"));
-//
-// /**
-// * PortletSession.isNew()
-// */
-// suite.addTest(new TestCase("New"));
-//
-// /**
-// * PortletSession.removeAttribute()
-// */
-// suite.addTest(new TestCase("RemoveAttribute"));
-//
-// /**
-// * PortletSession.setAttribute()
-// */
-// suite.addTest(new TestCase("SetAttribute"));
-//
-// return suite;
- }
-}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/PortletSessionSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/PortletSessionSequenceBuilder.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/PortletSessionSequenceBuilder.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,371 +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.portlet.jsr168.api.portletsession;
-
-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;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.Portlet;
-import javax.portlet.PortletSession;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class PortletSessionSequenceBuilder extends PortletTestSuite
-{
-
- /** PortletSession.APPLICATION_SCOPE PortletSession.PORTLET_SCOPE */
- public void createConstantsCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Constants", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- assertEquals(0x01, PortletSession.APPLICATION_SCOPE);
- assertEquals(0x02, PortletSession.PORTLET_SCOPE);
- return new EndTestResponse();
- }
- });
- }
-
- /** PortletSession.getAttribute() */
- public void createGetAttributeCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("GetAttribute", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletSession session = request.getPortletSession();
-
- try
- {
- session.getAttribute(null);
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
- try
- {
- session.getAttribute(null, PortletSession.APPLICATION_SCOPE);
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
-
- session.invalidate();
-
- //After invalidate
- try
- {
- session.getAttribute("name");
- fail();
- }
- catch (IllegalStateException expecte)
- {
- }
-
- try
- {
- session.getAttribute("name", PortletSession.PORTLET_SCOPE);
- fail();
- }
- catch (IllegalStateException expected)
- {
- }
-
-
- return new EndTestResponse();
- }
- });
- }
-
- /** PortletSession.getAttributeNames() */
- public void createAttributeNamesCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("AttributeNames", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletSession session = request.getPortletSession();
-
- //before invalidate
- session.getAttributeNames();
- session.getAttributeNames(PortletSession.APPLICATION_SCOPE);
-
- session.invalidate();
-
- //after invalidate
-
- try
- {
- session.getAttributeNames();
- fail();
- }
- catch (IllegalStateException expected)
- {
- }
-
- try
- {
- session.getAttributeNames(PortletSession.APPLICATION_SCOPE);
- fail();
- }
- catch (IllegalStateException expected)
- {
- }
-
- return new EndTestResponse();
- }
- });
- }
-
- /** PortletSession.getCreationTime() */
- public void createCreationTimeCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("CreationTime", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletSession session = request.getPortletSession();
-
- //before invalidate
- session.getCreationTime();
-
- session.invalidate();
-
- //after invalidate
- try
- {
- session.getCreationTime();
- fail();
- }
- catch (IllegalStateException expected)
- {
- }
- return new EndTestResponse();
- }
- });
- }
-
- /** PortletSession.invalidate() */
- public void createInvalidateCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Invalidate", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletSession session = request.getPortletSession();
-
- session.invalidate();
-
- //one more...
- try
- {
- session.invalidate();
- fail();
- }
- catch (IllegalStateException expected)
- {
- }
-
- return new EndTestResponse();
- }
- });
- }
-
- /** PortletSession.isNew() */
- public void createNewCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("New", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletSession session = request.getPortletSession();
-
- //before invalidation
- session.isNew();
-
- session.invalidate();
-
- //after invalidation
- try
- {
- session.isNew();
- fail();
- }
- catch (IllegalStateException expected)
- {
- }
- return new EndTestResponse();
- }
- });
- }
-
- /** PortletSession.removeAttribute() */
- public void createRemoveAttributeCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("RemoveAttribute", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletSession session = request.getPortletSession();
-
- try
- {
- session.removeAttribute(null);
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
- try
- {
- session.removeAttribute(null, PortletSession.APPLICATION_SCOPE);
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
- //before invalidation
- session.removeAttribute("name");
- session.removeAttribute("name", PortletSession.APPLICATION_SCOPE);
-
- session.invalidate();
-
- //after invalidation
- try
- {
- session.removeAttribute("name");
- fail();
- }
- catch (IllegalStateException expected)
- {
- }
-
- try
- {
- session.removeAttribute("name", PortletSession.APPLICATION_SCOPE);
- fail();
- }
- catch (IllegalStateException expected)
- {
- }
-
-
- return new EndTestResponse();
- }
- });
- }
-
- /** PortletSession.setAttribute() */
- public void createSetAttributeCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("SetAttribute", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletSession session = request.getPortletSession();
-
- try
- {
- session.setAttribute(null, new Object());
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
- try
- {
- session.setAttribute(null, new Object(), PortletSession.APPLICATION_SCOPE);
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
- //before invalidation
- session.setAttribute("name", new Object());
- session.setAttribute("name", new Object(), PortletSession.APPLICATION_SCOPE);
-
- session.invalidate();
-
- //after invalidation
- try
- {
- session.setAttribute("name", new Object());
- fail();
- }
- catch (IllegalStateException expected)
- {
- }
-
- try
- {
- session.setAttribute("name", new Object(), PortletSession.APPLICATION_SCOPE);
- fail();
- }
- catch (IllegalStateException expected)
- {
- }
-
- return new EndTestResponse();
- }
- });
- }
-
-
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/RemoveAttributeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/RemoveAttributeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/RemoveAttributeTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,100 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletsession;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletSession;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class RemoveAttributeTestCase
+{
+ public RemoveAttributeTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletSession session = request.getPortletSession();
+
+ try
+ {
+ session.removeAttribute(null);
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ try
+ {
+ session.removeAttribute(null, PortletSession.APPLICATION_SCOPE);
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ //before invalidation
+ session.removeAttribute("name");
+ session.removeAttribute("name", PortletSession.APPLICATION_SCOPE);
+
+ session.invalidate();
+
+ //after invalidation
+ try
+ {
+ session.removeAttribute("name");
+ fail();
+ }
+ catch (IllegalStateException expected)
+ {
+ }
+
+ try
+ {
+ session.removeAttribute("name", PortletSession.APPLICATION_SCOPE);
+ fail();
+ }
+ catch (IllegalStateException expected)
+ {
+ }
+
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/SetAttributeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/SetAttributeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsession/SetAttributeTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,99 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletsession;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletSession;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class SetAttributeTestCase
+{
+ public SetAttributeTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletSession session = request.getPortletSession();
+
+ try
+ {
+ session.setAttribute(null, new Object());
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ try
+ {
+ session.setAttribute(null, new Object(), PortletSession.APPLICATION_SCOPE);
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ //before invalidation
+ session.setAttribute("name", new Object());
+ session.setAttribute("name", new Object(), PortletSession.APPLICATION_SCOPE);
+
+ session.invalidate();
+
+ //after invalidation
+ try
+ {
+ session.setAttribute("name", new Object());
+ fail();
+ }
+ catch (IllegalStateException expected)
+ {
+ }
+
+ try
+ {
+ session.setAttribute("name", new Object(), PortletSession.APPLICATION_SCOPE);
+ fail();
+ }
+ catch (IllegalStateException expected)
+ {
+ }
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/DecodeAttributeNameTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/DecodeAttributeNameTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/DecodeAttributeNameTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,67 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletsessionutil;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletSessionUtil;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class DecodeAttributeNameTestCase
+{
+ public DecodeAttributeNameTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+
+ assertEquals("name", PortletSessionUtil.decodeAttributeName("name"));
+ //PORTLET_SCOPE
+ assertEquals("name", PortletSessionUtil.decodeAttributeName("javax.portlet.p.id?name"));
+ assertEquals("name", PortletSessionUtil.decodeAttributeName("javax.portlet.p.some.strange.id?name"));
+ assertEquals("strange.long.name", PortletSessionUtil.decodeAttributeName("javax.portlet.p.some.strange.id?strange.long.name"));
+
+
+ assertEquals("javaxx.portlet.p.strange.id?name", PortletSessionUtil.decodeAttributeName("javaxx.portlet.p.strange.id?name"));
+ assertEquals("javax.portlet.p.strange.idname", PortletSessionUtil.decodeAttributeName("javax.portlet.p.strange.idname"));
+ assertEquals("javax.portlet.strange.id?name", PortletSessionUtil.decodeAttributeName("javax.portlet.strange.id?name"));
+
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/DecodeScopeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/DecodeScopeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/DecodeScopeTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,64 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portletsessionutil;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletSession;
+import javax.portlet.PortletSessionUtil;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class DecodeScopeTestCase
+{
+ public DecodeScopeTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ assertEquals(PortletSession.APPLICATION_SCOPE, PortletSessionUtil.decodeScope("simpleName"));
+ assertEquals(PortletSession.APPLICATION_SCOPE, PortletSessionUtil.decodeScope("javax.portlet.name"));
+ assertEquals(PortletSession.APPLICATION_SCOPE, PortletSessionUtil.decodeScope("javax.portlet.p.name"));
+ assertEquals(PortletSession.APPLICATION_SCOPE, PortletSessionUtil.decodeScope("jjavax.portlet.p.id?name"));
+ assertEquals(PortletSession.APPLICATION_SCOPE, PortletSessionUtil.decodeScope("id?name"));
+ assertEquals(PortletSession.APPLICATION_SCOPE, PortletSessionUtil.decodeScope("portlet.p.id?name"));
+
+
+ assertEquals(PortletSession.PORTLET_SCOPE, PortletSessionUtil.decodeScope("javax.portlet.p.id?name"));
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/PortletSessionUtilAPITestSuite.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/PortletSessionUtilAPITestSuite.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/PortletSessionUtilAPITestSuite.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,49 +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.portlet.jsr168.api.portletsessionutil;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.com">Boleslaw Dawidowicz</a>
- * @version $Revision: 5510 $
- */
-public class PortletSessionUtilAPITestSuite
-{
-
- public static void suite()
- {
-// TestSuite suite = new TestSuite("test-jsr168-api-portletsessionutil.war");
-//
-// /**
-// * PortletSessionUtil.decodeAttributeName();
-// */
-// suite.addTest(new TestCase("DecodeAttributeName"));
-//
-// /**
-// * PortletSessionUtil.decodeScope();
-// */
-// suite.addTest(new TestCase("DecodeScope"));
-//
-//
-// return suite;
- }
-}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/PortletSessionUtilSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/PortletSessionUtilSequenceBuilder.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portletsessionutil/PortletSessionUtilSequenceBuilder.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,95 +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.portlet.jsr168.api.portletsessionutil;
-
-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;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.Portlet;
-import javax.portlet.PortletSession;
-import javax.portlet.PortletSessionUtil;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class PortletSessionUtilSequenceBuilder extends PortletTestSuite
-{
- public void createDecodeAttributeNameCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("DecodeAttributeName", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
-
- assertEquals("name", PortletSessionUtil.decodeAttributeName("name"));
- //PORTLET_SCOPE
- assertEquals("name", PortletSessionUtil.decodeAttributeName("javax.portlet.p.id?name"));
- assertEquals("name", PortletSessionUtil.decodeAttributeName("javax.portlet.p.some.strange.id?name"));
- assertEquals("strange.long.name", PortletSessionUtil.decodeAttributeName("javax.portlet.p.some.strange.id?strange.long.name"));
-
-
- assertEquals("javaxx.portlet.p.strange.id?name", PortletSessionUtil.decodeAttributeName("javaxx.portlet.p.strange.id?name"));
- assertEquals("javax.portlet.p.strange.idname", PortletSessionUtil.decodeAttributeName("javax.portlet.p.strange.idname"));
- assertEquals("javax.portlet.strange.id?name", PortletSessionUtil.decodeAttributeName("javax.portlet.strange.id?name"));
-
-
- return new EndTestResponse();
- }
- });
- }
-
- public void createDecodeScopeCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("DecodeScope", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- assertEquals(PortletSession.APPLICATION_SCOPE, PortletSessionUtil.decodeScope("simpleName"));
- assertEquals(PortletSession.APPLICATION_SCOPE, PortletSessionUtil.decodeScope("javax.portlet.name"));
- assertEquals(PortletSession.APPLICATION_SCOPE, PortletSessionUtil.decodeScope("javax.portlet.p.name"));
- assertEquals(PortletSession.APPLICATION_SCOPE, PortletSessionUtil.decodeScope("jjavax.portlet.p.id?name"));
- assertEquals(PortletSession.APPLICATION_SCOPE, PortletSessionUtil.decodeScope("id?name"));
- assertEquals(PortletSession.APPLICATION_SCOPE, PortletSessionUtil.decodeScope("portlet.p.id?name"));
-
-
- assertEquals(PortletSession.PORTLET_SCOPE, PortletSessionUtil.decodeScope("javax.portlet.p.id?name"));
- return new EndTestResponse();
- }
- });
- }
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/ParameterTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/ParameterTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/ParameterTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,176 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.portleturl;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletURL;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ParameterTestCase
+{
+ public ParameterTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ PortletURL url = response.createRenderURL();
+
+ String val = null;
+ String[] vals = null;
+
+ try
+ {
+ url.setParameter("name", val);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //expected
+ }
+
+ try
+ {
+ url.setParameter(null, "val");
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+ try
+ {
+ url.setParameter("name", vals);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+ try
+ {
+ url.setParameter(null, new String[]{"val1, val2"});
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+ try
+ {
+ url.setParameter(null, val);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+ try
+ {
+ url.setParameter(null, vals);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+
+ try
+ {
+ url.setParameters(null);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+ Map map = new HashMap();
+
+ map.put("name", "val");
+ map.put(null, "val");
+
+ try
+ {
+ url.setParameters(map);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+ map = new HashMap();
+ map.put("name", "val");
+ map.put("name2", new Object());
+
+ try
+ {
+ url.setParameters(map);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+ map = new HashMap();
+ map.put("name", new String[]{"val"});
+ map.put("name2", null);
+
+ try
+ {
+ url.setParameters(map);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ //
+ }
+
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/PortletURLAPITestSuite.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/PortletURLAPITestSuite.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/PortletURLAPITestSuite.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,63 +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.portlet.jsr168.api.portleturl;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.com">Boleslaw Dawidowicz</a>
- * @version $Revision: 5510 $
- */
-public class PortletURLAPITestSuite
-{
-
- public static void suite()
- {
-// TestSuite suite = new TestSuite("test-jsr168-api-portleturl.war");
-//
-// /**
-// * PortletURL.setWindowState()
-// * PortletURL.setPortletMode()
-// *
-// * TESTED in TCK assertions
-// */
-//
-// /**
-// * PortletURL.setParameter()
-// * PortletURL.setParameter()
-// * PortletURL.setParameters()
-// */
-// suite.addTest(new TestCase("Parameter"));
-//
-// /**
-// * TODO: PortletURL.setSecure()
-// */
-//
-// /**
-// * PortletURL.toString()
-// *
-// * TESTED in most of assertions
-// */
-//
-//
-// return suite;
- }
-}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/PortletURLSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/PortletURLSequenceBuilder.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/portleturl/PortletURLSequenceBuilder.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,185 +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.portlet.jsr168.api.portleturl;
-
-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;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.Portlet;
-import javax.portlet.PortletURL;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class PortletURLSequenceBuilder extends PortletTestSuite
-{
-
- /** PortletURL.setParameter() PortletURL.setParameter() PortletURL.setParameters() */
- public void createParameterCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Parameter", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- PortletURL url = response.createRenderURL();
-
- String val = null;
- String[] vals = null;
-
- try
- {
- url.setParameter("name", val);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //expected
- }
-
- try
- {
- url.setParameter(null, "val");
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
- try
- {
- url.setParameter("name", vals);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
- try
- {
- url.setParameter(null, new String[]{"val1, val2"});
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
- try
- {
- url.setParameter(null, val);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
- try
- {
- url.setParameter(null, vals);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
-
- try
- {
- url.setParameters(null);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
- Map map = new HashMap();
-
- map.put("name", "val");
- map.put(null, "val");
-
- try
- {
- url.setParameters(map);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
- map = new HashMap();
- map.put("name", "val");
- map.put("name2", new Object());
-
- try
- {
- url.setParameters(map);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
- map = new HashMap();
- map.put("name", new String[]{"val"});
- map.put("name2", null);
-
- try
- {
- url.setParameters(map);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- //
- }
-
-
- return new EndTestResponse();
- }
- });
- }
-
-
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/AttributeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/AttributeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/AttributeTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,80 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.renderrequest;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class AttributeTestCase
+{
+ public AttributeTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ try
+ {
+ request.getAttribute(null);
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ try
+ {
+ request.setAttribute(null, new Object());
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ try
+ {
+ request.removeAttribute(null);
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ }
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/ConstantsTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/ConstantsTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/ConstantsTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.renderrequest;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ConstantsTestCase
+{
+ public ConstantsTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ assertEquals("javax.portlet.userinfo", RenderRequest.USER_INFO);
+ assertEquals("BASIC", RenderRequest.BASIC_AUTH);
+ assertEquals("FORM", RenderRequest.FORM_AUTH);
+ assertEquals("CLIENT_CERT", RenderRequest.CLIENT_CERT_AUTH);
+ assertEquals("DIGEST", RenderRequest.DIGEST_AUTH);
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/ParameterTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/ParameterTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/ParameterTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,71 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.renderrequest;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ParameterTestCase
+{
+ public ParameterTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ try
+ {
+ request.getParameter(null);
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ try
+ {
+ request.getParameterValues(null);
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/PropertyTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/PropertyTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/PropertyTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -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.portlet.jsr168.api.renderrequest;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PropertyTestCase
+{
+ public PropertyTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+
+ try
+ {
+ request.getProperty(null);
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ try
+ {
+ request.getProperties(null);
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/RenderRequestAPITestSuite.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/RenderRequestAPITestSuite.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/RenderRequestAPITestSuite.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,71 +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.portlet.jsr168.api.renderrequest;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.com">Boleslaw Dawidowicz</a>
- * @version $Revision: 5510 $
- */
-public class RenderRequestAPITestSuite
-{
-
- public static void suite()
- {
-// TestSuite suite = new TestSuite("test-jsr168-api-renderrequest.war");
-//
-// //So... all methods are from PortletRequest
-//
-// //And here we go to PortletRequest interface asserts:
-//
-// /**
-// * RenderRequest.BASIC_AUTH
-// * RenderRequest.CLIENT_CERT_AUTH
-// * RenderRequest.DIGEST_AUTH
-// * RenderRequest.FORM_AUTH
-// * RenderRequest.USER_INFO
-// */
-// suite.addTest(new TestCase("Constants"));
-//
-// /**
-// * RenderRequest.getProperty()
-// * RenderRequest.getProperties()
-// */
-// suite.addTest(new TestCase("Property"));
-//
-// /**
-// * RenderRequest.getAttribute()
-// * RenderRequest.setAttribute()
-// * RenderRequest.removeAttribute()
-// */
-// suite.addTest(new TestCase("Attribute"));
-//
-// /**
-// * RenderRequest.getParameter()
-// * RenderRequest.getParameterValues()
-// */
-// suite.addTest(new TestCase("Parameter"));
-//
-//
-// return suite;
- }
-}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/RenderRequestSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/RenderRequestSequenceBuilder.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderrequest/RenderRequestSequenceBuilder.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,180 +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.portlet.jsr168.api.renderrequest;
-
-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;
-import org.jboss.unit.driver.response.EndTestResponse;
-import org.jboss.unit.driver.DriverResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.Portlet;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class RenderRequestSequenceBuilder extends PortletTestSuite
-{
- //********************************
- //PortletRequest interface Asserts
- //********************************
-
- /**
- * RenderRequest.BASIC_AUTH RenderRequest.CLIENT_CERT_AUTH RenderRequest.DIGEST_AUTH RenderRequest.FORM_AUTH
- * RenderRequest.USER_INFO
- */
- public void createConstantsCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Constants", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
-
- assertEquals("javax.portlet.userinfo", RenderRequest.USER_INFO);
- assertEquals("BASIC", RenderRequest.BASIC_AUTH);
- assertEquals("FORM", RenderRequest.FORM_AUTH);
- assertEquals("CLIENT_CERT", RenderRequest.CLIENT_CERT_AUTH);
- assertEquals("DIGEST", RenderRequest.DIGEST_AUTH);
- return new EndTestResponse();
- }
- });
- }
-
- /** RenderRequest.getProperty() RenderRequest.getProperties() */
- public void createPropertyCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Property", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
-
- try
- {
- request.getProperty(null);
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
- try
- {
- request.getProperties(null);
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
- return new EndTestResponse();
- }
- });
- }
-
- /** RenderRequest.getAttribute() RenderRequest.setAttribute() RenderRequest.removeAttribute() */
- public void createAttributeCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Attribute", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- try
- {
- request.getAttribute(null);
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
- try
- {
- request.setAttribute(null, new Object());
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
- try
- {
- request.removeAttribute(null);
- fail();
- }
- catch (IllegalArgumentException e)
- {
- }
-
- return new EndTestResponse();
- }
- });
- }
-
- /** RenderRequest.getParameter() RenderRequest.getParameterValues() */
- public void createParameterCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Parameter", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- try
- {
- request.getParameter(null);
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
- try
- {
- request.getParameterValues(null);
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
- return new EndTestResponse();
- }
- });
- }
-
-
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/ConstantsTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/ConstantsTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/ConstantsTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,54 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.renderresponse;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ConstantsTestCase
+{
+ public ConstantsTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ assertEquals("portlet.expiration-cache", RenderResponse.EXPIRATION_CACHE);
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/ContentTypeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/ContentTypeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/ContentTypeTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,62 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.renderresponse;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ContentTypeTestCase
+{
+ public ContentTypeTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ try
+ {
+ response.setContentType("UNSUPPORTED/TYPE");
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/EncodeURLTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/EncodeURLTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/EncodeURLTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,62 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.renderresponse;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class EncodeURLTestCase
+{
+ public EncodeURLTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ try
+ {
+ response.encodeURL("not_absolute_and_not_slash_leading_path");
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/PropertyTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/PropertyTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/PropertyTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,70 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.renderresponse;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.fail;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PropertyTestCase
+{
+ public PropertyTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ try
+ {
+ response.addProperty(null, "val");
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+
+ try
+ {
+ response.setProperty(null, "val");
+ fail();
+ }
+ catch (IllegalArgumentException expected)
+ {
+ }
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/RenderResponseAPITestSuite.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/RenderResponseAPITestSuite.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/RenderResponseAPITestSuite.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,73 +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.portlet.jsr168.api.renderresponse;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.com">Boleslaw Dawidowicz</a>
- * @version $Revision: 5510 $
- */
-public class RenderResponseAPITestSuite
-{
-
- public static void suite()
- {
-// TestSuite suite = new TestSuite("test-jsr168-api-renderresponse.war");
-//
-// /**
-// * RenderResponse.EXPIRATION_CACHE
-// */
-// suite.addTest(new TestCase("Constants"));
-//
-// /**
-// * RenderResponse.setContentType()
-// */
-// suite.addTest(new TestCase("ContentType"));
-//
-// /**
-// * RenderResponse.getWriter()
-// * RenderResponse.getPortletOutputStream()
-// *
-// * TESTED in TCK asserts
-// */
-//
-// /**
-// * RenderResponse.setBufferSize()
-// *
-// * TESTED in TCK asserts
-// * (and it's not implemented in portal now)
-// */
-//
-// /**
-// * ActionResponse.setProperty()
-// * ActionResponse.addProperty()
-// */
-// suite.addTest(new TestCase("Property"));
-//
-// /**
-// * ActionResponse.encodeURL()
-// */
-// suite.addTest(new TestCase("EncodeURL"));
-//
-// return suite;
- }
-}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/RenderResponseSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/RenderResponseSequenceBuilder.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/renderresponse/RenderResponseSequenceBuilder.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,146 +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.portlet.jsr168.api.renderresponse;
-
-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;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.Portlet;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class RenderResponseSequenceBuilder extends PortletTestSuite
-{
-
- /** RenderResponse.EXPIRATION_CACHE */
- public void createConstantsCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Constants", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- assertEquals("portlet.expiration-cache", RenderResponse.EXPIRATION_CACHE);
- return new EndTestResponse();
- }
- });
- }
-
- /** RenderResponse.setContentType() */
- public void createContentTypeCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("ContentType", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- try
- {
- response.setContentType("UNSUPPORTED/TYPE");
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
- return new EndTestResponse();
- }
- });
- }
-
- //************************
- //PortletResponse methods:
- //************************
-
- /** RenderResponse.setProperty() RenderResponse.addProperty() */
- public void createPropertyCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Property", seq);
-
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- try
- {
- response.addProperty(null, "val");
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
- try
- {
- response.setProperty(null, "val");
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
- return new EndTestResponse();
- }
- });
- }
-
- /** RenderResponse.encodeURL() */
- public void createEncodeURLCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("EncodeURL", seq);
-
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- try
- {
- response.encodeURL("not_absolute_and_not_slash_leading_path");
- fail();
- }
- catch (IllegalArgumentException expected)
- {
- }
-
- return new EndTestResponse();
- }
- });
- }
-
-
-}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/ConstructorTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/ConstructorTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/ConstructorTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.windowstate;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.WindowState;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ConstructorTestCase
+{
+ public ConstructorTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ assertEquals("teststate", "" + new WindowState("teststate"));
+ assertEquals("teststate", "" + new WindowState("TESTSTATE"));
+ assertEquals("teststate", "" + new WindowState("TestState"));
+ assertEquals("", "" + new WindowState(""));
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/EqualsTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/EqualsTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/EqualsTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.windowstate;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertTrue;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.WindowState;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class EqualsTestCase
+{
+ public EqualsTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ WindowState ws1 = new WindowState("TestState");
+ WindowState ws2 = new WindowState("teststate");
+ WindowState ws3 = new WindowState("OtherState");
+
+ //true
+ assertTrue(ws1.equals(ws2));
+ //false
+ assertTrue(!ws1.equals(ws3));
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/HashCodeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/HashCodeTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/HashCodeTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,70 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.windowstate;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertTrue;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.WindowState;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class HashCodeTestCase
+{
+ public HashCodeTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ WindowState ws1 = new WindowState("TestState");
+ WindowState ws2 = new WindowState("teststate");
+ WindowState ws3 = new WindowState("OtherState");
+
+ //true
+ assertTrue(ws1.hashCode() == ws2.hashCode());
+ //false
+ assertTrue(ws1.hashCode() != ws3.hashCode());
+
+ //Hashcodes are constructed from strings
+ assertEquals("teststate".hashCode(), ws1.hashCode());
+ assertEquals("teststate".hashCode(), ws2.hashCode());
+ assertEquals("otherstate".hashCode(), ws3.hashCode());
+
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Added: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/StatesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/StatesTestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/StatesTestCase.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * 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.portlet.jsr168.api.windowstate;
+
+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.portlet.framework.UTP1;
+import org.jboss.unit.driver.DriverResponse;
+import org.jboss.unit.driver.response.EndTestResponse;
+import static org.jboss.unit.api.Assert.assertEquals;
+
+import javax.portlet.Portlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.WindowState;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class StatesTestCase
+{
+ public StatesTestCase(PortletTest seq)
+ {
+ seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
+ {
+ assertEquals("minimized", "" + WindowState.MINIMIZED);
+ assertEquals("maximized", "" + WindowState.MAXIMIZED);
+ assertEquals("normal", "" + WindowState.NORMAL);
+
+ return new EndTestResponse();
+ }
+ });
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/WindowStateAPITestSuite.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/WindowStateAPITestSuite.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/WindowStateAPITestSuite.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,60 +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.portlet.jsr168.api.windowstate;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.com">Boleslaw Dawidowicz</a>
- * @version $Revision: 5510 $
- */
-public class WindowStateAPITestSuite
-{
-
- public static void suite()
- {
-// TestSuite suite = new TestSuite("test-jsr168-api-windowstate.war");
-//
-// /**
-// * WindowState.MAXIMIZED
-// * WindowState.MINIMIZED
-// * WindowState.NORMAL
-// */
-// suite.addTest(new TestCase("States"));
-//
-// /**
-// * WindowState.WindowState()
-// */
-// suite.addTest(new TestCase("Constructor"));
-//
-// /**
-// * @portlet.api assert="WindowState.equals()"
-// */
-// suite.addTest(new TestCase("Equals"));
-//
-// /**
-// * @portlet.api assert="WindowState.hashCode()"
-// */
-// suite.addTest(new TestCase("HashCode"));
-//
-// return suite;
- }
-}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/WindowStateSequenceBuilder.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/WindowStateSequenceBuilder.java 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/api/windowstate/WindowStateSequenceBuilder.java 2007-11-07 17:20:52 UTC (rev 8838)
@@ -1,138 +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.portlet.jsr168.api.windowstate;
-
-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;
-import org.jboss.unit.driver.DriverResponse;
-import org.jboss.unit.driver.response.EndTestResponse;
-
-import static org.jboss.unit.api.Assert.*;
-
-import javax.portlet.Portlet;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.portlet.WindowState;
-
-/**
- * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
- * @version $Revision: 7954 $
- */
-public class WindowStateSequenceBuilder extends PortletTestSuite
-{
-
- /** @portlet.api assert="WindowState.MINIMIZED WindowState.MAXIMIZED WindowState.NORMAL" */
- public void createStatesCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("States", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- assertEquals("minimized", "" + WindowState.MINIMIZED);
- assertEquals("maximized", "" + WindowState.MAXIMIZED);
- assertEquals("normal", "" + WindowState.NORMAL);
-
- return new EndTestResponse();
- }
- });
- }
-
- /** @portlet.api assert="WindowState.WindowState()" */
- public void createConstructorCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Constructor", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- assertEquals("teststate", "" + new WindowState("teststate"));
- assertEquals("teststate", "" + new WindowState("TESTSTATE"));
- assertEquals("teststate", "" + new WindowState("TestState"));
- assertEquals("", "" + new WindowState(""));
-
-
- return new EndTestResponse();
- }
- });
- }
-
- /** @portlet.api assert="WindowState.equals()" */
- public void createEqualsCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("Equals", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- WindowState ws1 = new WindowState("TestState");
- WindowState ws2 = new WindowState("teststate");
- WindowState ws3 = new WindowState("OtherState");
-
- //true
- assertTrue(ws1.equals(ws2));
- //false
- assertTrue(!ws1.equals(ws3));
-
-
- return new EndTestResponse();
- }
- });
- }
-
- /** @portlet.api assert="WindowState.hashCode()" */
- public void createHashCodeCase(PortletTestDriver registry)
- {
- PortletTest seq = new PortletTest();
- registry.addSequence("HashCode", seq);
- seq.addAction(0, UTP1.RENDER_JOINPOINT, new PortletRenderTestAction()
- {
- protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
- {
- WindowState ws1 = new WindowState("TestState");
- WindowState ws2 = new WindowState("teststate");
- WindowState ws3 = new WindowState("OtherState");
-
- //true
- assertTrue(ws1.hashCode() == ws2.hashCode());
- //false
- assertTrue(ws1.hashCode() != ws3.hashCode());
-
- //Hashcodes are constructed from strings
- assertEquals("teststate".hashCode(), ws1.hashCode());
- assertEquals("teststate".hashCode(), ws2.hashCode());
- assertEquals("otherstate".hashCode(), ws3.hashCode());
-
-
- return new EndTestResponse();
- }
- });
- }
-}
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/api/actionrequest-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/api/actionrequest-war/WEB-INF/web.xml 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/api/actionrequest-war/WEB-INF/web.xml 2007-11-07 17:20:52 UTC (rev 8838)
@@ -27,6 +27,6 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.api.actionrequest.ActionRequestSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/api/actionresponse-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/api/actionresponse-war/WEB-INF/web.xml 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/api/actionresponse-war/WEB-INF/web.xml 2007-11-07 17:20:52 UTC (rev 8838)
@@ -27,6 +27,6 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.api.actionresponse.ActionResponseSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portalcontext-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portalcontext-war/WEB-INF/web.xml 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portalcontext-war/WEB-INF/web.xml 2007-11-07 17:20:52 UTC (rev 8838)
@@ -27,6 +27,6 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.api.portalcontext.PortalContextSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletconfig-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletconfig-war/WEB-INF/web.xml 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletconfig-war/WEB-INF/web.xml 2007-11-07 17:20:52 UTC (rev 8838)
@@ -27,6 +27,6 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.api.portletconfig.PortletConfigSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletcontext-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletcontext-war/WEB-INF/web.xml 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletcontext-war/WEB-INF/web.xml 2007-11-07 17:20:52 UTC (rev 8838)
@@ -28,6 +28,6 @@
<web-app>
<display-name>PortletContext WebApp</display-name>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.api.portletcontext.PortletContextSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletmode-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletmode-war/WEB-INF/web.xml 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletmode-war/WEB-INF/web.xml 2007-11-07 17:20:52 UTC (rev 8838)
@@ -27,6 +27,6 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.api.portletmode.PortletModeSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletpreferences-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletpreferences-war/WEB-INF/web.xml 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletpreferences-war/WEB-INF/web.xml 2007-11-07 17:20:52 UTC (rev 8838)
@@ -27,6 +27,6 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.api.portletpreferences.PortletPreferencesSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletsession-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletsession-war/WEB-INF/web.xml 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletsession-war/WEB-INF/web.xml 2007-11-07 17:20:52 UTC (rev 8838)
@@ -27,6 +27,6 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.api.portletsession.PortletSessionSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletsessionutil-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletsessionutil-war/WEB-INF/web.xml 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portletsessionutil-war/WEB-INF/web.xml 2007-11-07 17:20:52 UTC (rev 8838)
@@ -27,6 +27,6 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.api.portletsessionutil.PortletSessionUtilSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portleturl-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portleturl-war/WEB-INF/web.xml 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/api/portleturl-war/WEB-INF/web.xml 2007-11-07 17:20:52 UTC (rev 8838)
@@ -27,6 +27,6 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.api.portleturl.PortletURLSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/api/renderrequest-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/api/renderrequest-war/WEB-INF/web.xml 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/api/renderrequest-war/WEB-INF/web.xml 2007-11-07 17:20:52 UTC (rev 8838)
@@ -27,6 +27,6 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.api.renderrequest.RenderRequestSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/api/renderresponse-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/api/renderresponse-war/WEB-INF/web.xml 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/api/renderresponse-war/WEB-INF/web.xml 2007-11-07 17:20:52 UTC (rev 8838)
@@ -27,6 +27,6 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.api.renderresponse.RenderResponseSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
Modified: modules/portlet/trunk/portlet/src/resources/test/jsr168/api/windowstate-war/WEB-INF/web.xml
===================================================================
--- modules/portlet/trunk/portlet/src/resources/test/jsr168/api/windowstate-war/WEB-INF/web.xml 2007-11-07 15:15:08 UTC (rev 8837)
+++ modules/portlet/trunk/portlet/src/resources/test/jsr168/api/windowstate-war/WEB-INF/web.xml 2007-11-07 17:20:52 UTC (rev 8838)
@@ -27,6 +27,6 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<listener>
- <listener-class>org.jboss.portal.test.portlet.jsr168.api.windowstate.WindowStateSequenceBuilder</listener-class>
+ <listener-class>org.jboss.portal.test.framework.portlet.PortletTestSuite</listener-class>
</listener>
</web-app>
18 years, 6 months
JBoss Portal SVN: r8837 - in modules/portlet/trunk/portlet/src/main/org/jboss/portal: test/portlet/jsr168/tck/dispatcher and 12 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-11-07 10:15:08 -0500 (Wed, 07 Nov 2007)
New Revision: 8837
Added:
modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/Assertion.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/annotations/TestCase.java
Removed:
modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/TCKAssertion.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/annotations/TCK.java
Modified:
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestSuite.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/DispatchedRequestTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ErrorHandlingTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/GETMethodTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/IncludedRequestAttributesTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/IncludedRequestParametersTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ObtainingDispatcherTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/QueryStringInRequestDispatcherTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/RequestObjectTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ResponseObjectTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletconfig/InlineValuesNotInResourceBundleTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletconfig/InlineValuesWithNoResourceBundleDefinedTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/AccessSameSetOfResourcesTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/ContextAttributesTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/InitializationParametersTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/TempDirTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/ExceptionsDuringRequestHandlingTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/ExceptionsOnInitTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/InitializeBeforeHandleTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/InvokeActionFirstTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/InvokeRenderAfterActionURLTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/InvokeRenderAfterRenderURLTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/SendRedirectDuringActionTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletmode/NotInvokeModeDeclaredForNotSupportedMarkupTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletmode/RequestDispatchingDependingOnModeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ActionToRenderParametersTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ActionToRequestParametersNotPropagatedTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/AuthTypeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ContentTypeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ContextPathTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ObtainingInputStreamAndReaderTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ParameterAccessMethodTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ParametersDuringRenderNotTargetedTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/BufferResetTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/BufferSizeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/GetContentTypeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/IllegalStateExceptionAfterSendRedirectTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/NamespaceEncodingTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/NotAllowedModeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/NotSupportedWindowStateTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/OutputStreamOrWriterTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/ParametersSetAfterSendRedirectTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/RenderParametersTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/SendRedirectAfterChangeStateMethodsTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/SendRedirectWithRelativeURLTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/SetContentTypeBeforeOutputStreamOrWriterTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/SetNotSupportedContentTypeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/StateChangesAfterRedirectionSendTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/HTTPSessionInvalidatesPortletSessionTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/HTTPSessionRelationsTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/PortletSessionInvalidatesHTTPSessionTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/SessionAttributesTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/SessionCreateTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/SessionInvalidationTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/PortletURLParametersTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/PortletURLWithNotSupportedModeTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/PortletURLWithNotSupportedStateTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/RenderURLNotInvokeActionTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/SecurityLevelTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/CanModifyNonReadOnlyPreferenceTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/ChangesMadeButNotStoredAreDiscardedTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/CreateASingleInstanceOfValidatorTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/DynamicPreferenceTreatedLikeModifiablePreferenceTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/InvalidationCancelsStoreTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/PreferencesCanBeSetToNullTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/PreferencesMapModificationDoesNotModifyPreferencesValuesTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/ReadOnlyPreferenceCannotBeModifiedTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/ResetPreferenceHavingNoDefaultValueDeletesItTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/StoreCalledDuringRenderThrowsIllegalArgumentExceptionTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/ValidationStoresTestCase.java
modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/windowstates/CustomStateNotMappedNotInvokedTestCase.java
Log:
- make TCK and TCKAssertion more generic as TestCase and Assertion in order to reuse them for the API and EXT test cases
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestSuite.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestSuite.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/framework/portlet/PortletTestSuite.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.common.net.URLNavigator;
import org.jboss.portal.common.net.URLVisitor;
import org.jboss.portal.common.net.URLFilter;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
@@ -129,18 +129,18 @@
{
for (Class clazz : getClasses(event.getServletContext()))
{
- TCK tck = ((AnnotatedElement)clazz).getAnnotation(TCK.class);
+ TestCase tck = ((AnnotatedElement)clazz).getAnnotation(TestCase.class);
//
boolean active = true;
if (tck != null)
{
- for (TCKAssertion assertion : tck.value())
+ for (Assertion assertion : tck.value())
{
- if (assertion.getStatus() instanceof TCKAssertion.Inactive)
+ if (assertion.getStatus() instanceof Assertion.Inactive)
{
active = false;
- log.error("Skip test case " + clazz.getName() + " because the assertion " + assertion.getId() + " is not enabled");
+ log.error("Skip test case " + clazz.getName() + " because the assertion " + assertion.getRef() + " is not enabled");
}
}
}
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/DispatchedRequestTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/DispatchedRequestTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/DispatchedRequestTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -29,8 +29,8 @@
import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNotNull;
@@ -51,7 +51,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_124,TCKAssertion.JSR168_125})
+(a)TestCase({Assertion.JSR168_124, Assertion.JSR168_125})
public class DispatchedRequestTestCase
{
public DispatchedRequestTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ErrorHandlingTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ErrorHandlingTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ErrorHandlingTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -29,8 +29,8 @@
import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNotNull;
@@ -52,7 +52,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_142,TCKAssertion.JSR168_143})
+(a)TestCase({Assertion.JSR168_142, Assertion.JSR168_143})
public class ErrorHandlingTestCase
{
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/GETMethodTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/GETMethodTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/GETMethodTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -29,8 +29,8 @@
import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNotNull;
@@ -51,7 +51,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_126})
+(a)TestCase({Assertion.JSR168_126})
public class GETMethodTestCase
{
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/IncludedRequestAttributesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/IncludedRequestAttributesTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/IncludedRequestAttributesTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -29,8 +29,8 @@
import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNotNull;
@@ -51,7 +51,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_128})
+(a)TestCase({Assertion.JSR168_128})
public class IncludedRequestAttributesTestCase
{
public IncludedRequestAttributesTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/IncludedRequestParametersTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/IncludedRequestParametersTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/IncludedRequestParametersTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -29,8 +29,8 @@
import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNotNull;
@@ -52,7 +52,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_127})
+(a)TestCase({Assertion.JSR168_127})
public class IncludedRequestParametersTestCase
{
public IncludedRequestParametersTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ObtainingDispatcherTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ObtainingDispatcherTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ObtainingDispatcherTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -22,13 +22,12 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr168.tck.dispatcher;
-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.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNotNull;
@@ -43,7 +42,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_121,TCKAssertion.JSR168_122})
+(a)TestCase({Assertion.JSR168_121, Assertion.JSR168_122})
public class ObtainingDispatcherTestCase
{
public ObtainingDispatcherTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/QueryStringInRequestDispatcherTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/QueryStringInRequestDispatcherTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/QueryStringInRequestDispatcherTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -30,8 +30,8 @@
import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -56,7 +56,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_123})
+(a)TestCase({Assertion.JSR168_123})
public class QueryStringInRequestDispatcherTestCase
{
public QueryStringInRequestDispatcherTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/RequestObjectTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/RequestObjectTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/RequestObjectTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -29,8 +29,8 @@
import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNotNull;
@@ -57,7 +57,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_129,TCKAssertion.JSR168_130,TCKAssertion.JSR168_131,TCKAssertion.JSR168_132,TCKAssertion.JSR168_133,TCKAssertion.JSR168_134,TCKAssertion.JSR168_137})
+(a)TestCase({Assertion.JSR168_129, Assertion.JSR168_130, Assertion.JSR168_131, Assertion.JSR168_132, Assertion.JSR168_133, Assertion.JSR168_134, Assertion.JSR168_137})
public class RequestObjectTestCase
{
public RequestObjectTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ResponseObjectTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ResponseObjectTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/dispatcher/ResponseObjectTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -29,8 +29,8 @@
import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNotNull;
@@ -52,7 +52,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_138,TCKAssertion.JSR168_141})
+(a)TestCase({Assertion.JSR168_138, Assertion.JSR168_141})
public class ResponseObjectTestCase
{
public ResponseObjectTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletconfig/InlineValuesNotInResourceBundleTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletconfig/InlineValuesNotInResourceBundleTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletconfig/InlineValuesNotInResourceBundleTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.jsr168.tck.portletconfig.spec.InlineValuesNotInResourceBundlePortlet;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertEquals;
@@ -44,7 +44,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_24})
+(a)TestCase({Assertion.JSR168_24})
public class InlineValuesNotInResourceBundleTestCase
{
public InlineValuesNotInResourceBundleTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletconfig/InlineValuesWithNoResourceBundleDefinedTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletconfig/InlineValuesWithNoResourceBundleDefinedTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletconfig/InlineValuesWithNoResourceBundleDefinedTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.jsr168.tck.portletconfig.spec.InlineValuesWithNoResourceBundleDefinedPortlet;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -46,7 +46,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_24})
+(a)TestCase({Assertion.JSR168_24})
public class InlineValuesWithNoResourceBundleDefinedTestCase
{
public InlineValuesWithNoResourceBundleDefinedTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/AccessSameSetOfResourcesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/AccessSameSetOfResourcesTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/AccessSameSetOfResourcesTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -30,8 +30,8 @@
import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNotNull;
@@ -55,7 +55,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_45})
+(a)TestCase({Assertion.JSR168_45})
public class AccessSameSetOfResourcesTestCase
{
public AccessSameSetOfResourcesTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/ContextAttributesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/ContextAttributesTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/ContextAttributesTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -30,8 +30,8 @@
import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNotNull;
@@ -53,7 +53,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_44})
+(a)TestCase({Assertion.JSR168_44})
public class ContextAttributesTestCase
{
public ContextAttributesTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/InitializationParametersTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/InitializationParametersTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/InitializationParametersTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -31,8 +31,8 @@
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTS1;
import org.jboss.portal.common.util.Tools;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNotNull;
@@ -55,7 +55,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_43})
+(a)TestCase({Assertion.JSR168_43})
public class InitializationParametersTestCase
{
public InitializationParametersTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/TempDirTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/TempDirTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletcontext/TempDirTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -30,8 +30,8 @@
import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNotNull;
@@ -53,7 +53,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_46})
+(a)TestCase({Assertion.JSR168_46})
public class TempDirTestCase
{
public TempDirTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/ExceptionsDuringRequestHandlingTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/ExceptionsDuringRequestHandlingTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/ExceptionsDuringRequestHandlingTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -23,8 +23,8 @@
package org.jboss.portal.test.portlet.jsr168.tck.portletinterface;
import org.jboss.portal.test.framework.portlet.PortletTest;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
/**
* This case is based on:
@@ -42,7 +42,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_17,TCKAssertion.JSR168_18,TCKAssertion.JSR168_19})
+(a)TestCase({Assertion.JSR168_17, Assertion.JSR168_18, Assertion.JSR168_19})
public class ExceptionsDuringRequestHandlingTestCase
{
public ExceptionsDuringRequestHandlingTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/ExceptionsOnInitTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/ExceptionsOnInitTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/ExceptionsOnInitTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -29,8 +29,8 @@
import org.jboss.portal.test.portlet.jsr168.tck.portletinterface.spec.RuntimeExceptionDuringInitPortlet;
import org.jboss.portal.test.portlet.jsr168.tck.portletinterface.spec.UnavailableExceptionDuringInitPortlet;
import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -44,7 +44,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_5,TCKAssertion.JSR168_6,TCKAssertion.JSR168_8})
+(a)TestCase({Assertion.JSR168_5, Assertion.JSR168_6, Assertion.JSR168_8})
public class ExceptionsOnInitTestCase
{
public ExceptionsOnInitTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/InitializeBeforeHandleTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/InitializeBeforeHandleTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/InitializeBeforeHandleTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -26,8 +26,8 @@
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.jsr168.tck.portletinterface.spec.InitializeBeforeHandlePortlet;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertTrue;
@@ -40,7 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_4})
+(a)TestCase({Assertion.JSR168_4})
public class InitializeBeforeHandleTestCase
{
public InitializeBeforeHandleTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/InvokeActionFirstTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/InvokeActionFirstTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/InvokeActionFirstTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -44,7 +44,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_9})
+(a)TestCase({Assertion.JSR168_9})
public class InvokeActionFirstTestCase
{
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/InvokeRenderAfterActionURLTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/InvokeRenderAfterActionURLTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/InvokeRenderAfterActionURLTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -28,8 +28,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTP2;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -46,7 +46,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_10})
+(a)TestCase({Assertion.JSR168_10})
public class InvokeRenderAfterActionURLTestCase
{
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/InvokeRenderAfterRenderURLTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/InvokeRenderAfterRenderURLTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/InvokeRenderAfterRenderURLTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTP2;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -42,7 +42,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_11})
+(a)TestCase({Assertion.JSR168_11})
public class InvokeRenderAfterRenderURLTestCase
{
public InvokeRenderAfterRenderURLTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/SendRedirectDuringActionTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/SendRedirectDuringActionTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletinterface/SendRedirectDuringActionTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -29,8 +29,8 @@
import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.driver.response.FailureResponse;
@@ -54,7 +54,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_12})
+(a)TestCase({Assertion.JSR168_12})
public class SendRedirectDuringActionTestCase
{
public SendRedirectDuringActionTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletmode/NotInvokeModeDeclaredForNotSupportedMarkupTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletmode/NotInvokeModeDeclaredForNotSupportedMarkupTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletmode/NotInvokeModeDeclaredForNotSupportedMarkupTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.jsr168.tck.portletmode.spec.NotInvokeModeDeclaredForNotSupportedMarkupHelperPortlet;
import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -45,7 +45,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK(TCKAssertion.JSR168_38)
+(a)TestCase(Assertion.JSR168_38)
public class NotInvokeModeDeclaredForNotSupportedMarkupTestCase
{
public NotInvokeModeDeclaredForNotSupportedMarkupTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletmode/RequestDispatchingDependingOnModeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletmode/RequestDispatchingDependingOnModeTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletmode/RequestDispatchingDependingOnModeTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -23,15 +23,14 @@
package org.jboss.portal.test.portlet.jsr168.tck.portletmode;
import org.jboss.portal.test.framework.portlet.PortletTest;
-import org.jboss.portal.test.portlet.jsr168.tck.portletmode.spec.RequestDispatchingDependingOnModePortlet;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_36,TCKAssertion.JSR168_37})
+(a)TestCase({Assertion.JSR168_36, Assertion.JSR168_37})
public class RequestDispatchingDependingOnModeTestCase
{
public RequestDispatchingDependingOnModeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ActionToRenderParametersTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ActionToRenderParametersTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ActionToRenderParametersTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr168.tck.portletrequests;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
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;
@@ -45,7 +45,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK(TCKAssertion.JSR168_52)
+(a)TestCase(Assertion.JSR168_52)
public class ActionToRenderParametersTestCase
{
public ActionToRenderParametersTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ActionToRequestParametersNotPropagatedTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ActionToRequestParametersNotPropagatedTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ActionToRequestParametersNotPropagatedTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr168.tck.portletrequests;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
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;
@@ -46,7 +46,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK(TCKAssertion.JSR168_50)
+(a)TestCase(Assertion.JSR168_50)
public class ActionToRequestParametersNotPropagatedTestCase
{
public ActionToRequestParametersNotPropagatedTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/AuthTypeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/AuthTypeTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/AuthTypeTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr168.tck.portletrequests;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
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;
@@ -45,7 +45,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK(TCKAssertion.JSR168_60)
+(a)TestCase(Assertion.JSR168_60)
public class AuthTypeTestCase
{
public AuthTypeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ContentTypeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ContentTypeTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ContentTypeTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr168.tck.portletrequests;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
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;
@@ -46,7 +46,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK(TCKAssertion.JSR168_61)
+(a)TestCase(Assertion.JSR168_61)
public class ContentTypeTestCase
{
public ContentTypeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ContextPathTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ContextPathTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ContextPathTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr168.tck.portletrequests;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
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;
@@ -45,7 +45,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_58,TCKAssertion.JSR168_59})
+(a)TestCase({Assertion.JSR168_58, Assertion.JSR168_59})
public class ContextPathTestCase
{
public ContextPathTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ObtainingInputStreamAndReaderTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ObtainingInputStreamAndReaderTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ObtainingInputStreamAndReaderTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr168.tck.portletrequests;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
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;
@@ -46,7 +46,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK(TCKAssertion.JSR168_63)
+(a)TestCase(Assertion.JSR168_63)
public class ObtainingInputStreamAndReaderTestCase
{
public ObtainingInputStreamAndReaderTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ParameterAccessMethodTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ParameterAccessMethodTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ParameterAccessMethodTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr168.tck.portletrequests;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
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;
@@ -45,7 +45,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_55,TCKAssertion.JSR168_56})
+(a)TestCase({Assertion.JSR168_55, Assertion.JSR168_56})
public class ParameterAccessMethodTestCase
{
public ParameterAccessMethodTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ParametersDuringRenderNotTargetedTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ParametersDuringRenderNotTargetedTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletrequests/ParametersDuringRenderNotTargetedTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr168.tck.portletrequests;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
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;
@@ -44,7 +44,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_51,TCKAssertion.JSR168_54})
+(a)TestCase({Assertion.JSR168_51, Assertion.JSR168_54})
public class ParametersDuringRenderNotTargetedTestCase
{
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/BufferResetTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/BufferResetTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/BufferResetTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -26,8 +26,8 @@
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;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -43,7 +43,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_83})
+(a)TestCase({Assertion.JSR168_83})
public class BufferResetTestCase
{
public BufferResetTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/BufferSizeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/BufferSizeTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/BufferSizeTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -26,8 +26,8 @@
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;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertEquals;
@@ -41,7 +41,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_80,TCKAssertion.JSR168_81})
+(a)TestCase({Assertion.JSR168_80, Assertion.JSR168_81})
public class BufferSizeTestCase
{
public BufferSizeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/GetContentTypeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/GetContentTypeTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/GetContentTypeTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -26,8 +26,8 @@
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;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertNull;
@@ -41,7 +41,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_78})
+(a)TestCase({Assertion.JSR168_78})
public class GetContentTypeTestCase
{
public GetContentTypeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/IllegalStateExceptionAfterSendRedirectTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/IllegalStateExceptionAfterSendRedirectTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/IllegalStateExceptionAfterSendRedirectTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -29,8 +29,8 @@
import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTS2;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.FailureResponse;
import org.jboss.unit.driver.response.EndTestResponse;
@@ -53,7 +53,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_71})
+(a)TestCase({Assertion.JSR168_71})
public class IllegalStateExceptionAfterSendRedirectTestCase
{
public IllegalStateExceptionAfterSendRedirectTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/NamespaceEncodingTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/NamespaceEncodingTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/NamespaceEncodingTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -26,8 +26,8 @@
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;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertTrue;
@@ -41,7 +41,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_86,TCKAssertion.JSR168_87,TCKAssertion.JSR168_88})
+(a)TestCase({Assertion.JSR168_86, Assertion.JSR168_87, Assertion.JSR168_88})
public class NamespaceEncodingTestCase
{
public NamespaceEncodingTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/NotAllowedModeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/NotAllowedModeTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/NotAllowedModeTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -47,7 +47,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_67})
+(a)TestCase({Assertion.JSR168_67})
public class NotAllowedModeTestCase
{
public NotAllowedModeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/NotSupportedWindowStateTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/NotSupportedWindowStateTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/NotSupportedWindowStateTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -47,7 +47,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_68})
+(a)TestCase({Assertion.JSR168_68})
public class NotSupportedWindowStateTestCase
{
public NotSupportedWindowStateTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/OutputStreamOrWriterTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/OutputStreamOrWriterTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/OutputStreamOrWriterTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -26,8 +26,8 @@
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;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -43,7 +43,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_79})
+(a)TestCase({Assertion.JSR168_79})
public class OutputStreamOrWriterTestCase
{
public OutputStreamOrWriterTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/ParametersSetAfterSendRedirectTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/ParametersSetAfterSendRedirectTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/ParametersSetAfterSendRedirectTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -29,8 +29,8 @@
import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.driver.response.FailureResponse;
@@ -56,7 +56,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_74,TCKAssertion.JSR168_75})
+(a)TestCase({Assertion.JSR168_74, Assertion.JSR168_75})
public class ParametersSetAfterSendRedirectTestCase
{
public ParametersSetAfterSendRedirectTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/RenderParametersTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/RenderParametersTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/RenderParametersTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -46,7 +46,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_72,TCKAssertion.JSR168_73})
+(a)TestCase({Assertion.JSR168_72, Assertion.JSR168_73})
public class RenderParametersTestCase
{
public RenderParametersTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/SendRedirectAfterChangeStateMethodsTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/SendRedirectAfterChangeStateMethodsTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/SendRedirectAfterChangeStateMethodsTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -52,7 +52,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_66})
+(a)TestCase({Assertion.JSR168_66})
public class SendRedirectAfterChangeStateMethodsTestCase
{
public SendRedirectAfterChangeStateMethodsTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/SendRedirectWithRelativeURLTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/SendRedirectWithRelativeURLTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/SendRedirectWithRelativeURLTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -46,7 +46,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_65})
+(a)TestCase({Assertion.JSR168_65})
public class SendRedirectWithRelativeURLTestCase
{
public SendRedirectWithRelativeURLTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/SetContentTypeBeforeOutputStreamOrWriterTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/SetContentTypeBeforeOutputStreamOrWriterTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/SetContentTypeBeforeOutputStreamOrWriterTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -26,8 +26,8 @@
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;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -42,7 +42,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_77})
+(a)TestCase({Assertion.JSR168_77})
public class SetContentTypeBeforeOutputStreamOrWriterTestCase
{
public SetContentTypeBeforeOutputStreamOrWriterTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/SetNotSupportedContentTypeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/SetNotSupportedContentTypeTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/SetNotSupportedContentTypeTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -26,8 +26,8 @@
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;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -40,7 +40,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_76})
+(a)TestCase({Assertion.JSR168_76})
public class SetNotSupportedContentTypeTestCase
{
public SetNotSupportedContentTypeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/StateChangesAfterRedirectionSendTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/StateChangesAfterRedirectionSendTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletresponses/StateChangesAfterRedirectionSendTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -29,8 +29,8 @@
import org.jboss.portal.test.framework.portlet.actions.ServletServiceTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTS1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.driver.response.FailureResponse;
@@ -58,7 +58,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_69,TCKAssertion.JSR168_70})
+(a)TestCase({Assertion.JSR168_69, Assertion.JSR168_70})
public class StateChangesAfterRedirectionSendTestCase
{
public StateChangesAfterRedirectionSendTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/HTTPSessionInvalidatesPortletSessionTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/HTTPSessionInvalidatesPortletSessionTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/HTTPSessionInvalidatesPortletSessionTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr168.tck.portletsession;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.portal.test.framework.portlet.PortletTest;
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.components.AbstractUniversalTestPortlet;
@@ -47,7 +47,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_115})
+(a)TestCase({Assertion.JSR168_115})
public class HTTPSessionInvalidatesPortletSessionTestCase
{
public HTTPSessionInvalidatesPortletSessionTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/HTTPSessionRelationsTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/HTTPSessionRelationsTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/HTTPSessionRelationsTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr168.tck.portletsession;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
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;
@@ -49,7 +49,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_113,TCKAssertion.JSR168_114})
+(a)TestCase({Assertion.JSR168_113, Assertion.JSR168_114})
public class HTTPSessionRelationsTestCase
{
public HTTPSessionRelationsTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/PortletSessionInvalidatesHTTPSessionTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/PortletSessionInvalidatesHTTPSessionTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/PortletSessionInvalidatesHTTPSessionTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr168.tck.portletsession;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
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;
@@ -45,7 +45,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_116})
+(a)TestCase({Assertion.JSR168_116})
public class PortletSessionInvalidatesHTTPSessionTestCase
{
public PortletSessionInvalidatesHTTPSessionTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/SessionAttributesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/SessionAttributesTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/SessionAttributesTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr168.tck.portletsession;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
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;
@@ -59,7 +59,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_110,TCKAssertion.JSR168_111,TCKAssertion.JSR168_112,TCKAssertion.JSR168_117,TCKAssertion.JSR168_118,TCKAssertion.JSR168_119})
+(a)TestCase({Assertion.JSR168_110, Assertion.JSR168_111, Assertion.JSR168_112, Assertion.JSR168_117, Assertion.JSR168_118, Assertion.JSR168_119})
public class SessionAttributesTestCase
{
public SessionAttributesTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/SessionCreateTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/SessionCreateTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/SessionCreateTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -22,8 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr168.tck.portletsession;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
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;
@@ -45,7 +45,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_106,TCKAssertion.JSR168_107})
+(a)TestCase({Assertion.JSR168_106, Assertion.JSR168_107})
public class SessionCreateTestCase
{
public SessionCreateTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/SessionInvalidationTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/SessionInvalidationTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portletsession/SessionInvalidationTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -22,15 +22,15 @@
******************************************************************************/
package org.jboss.portal.test.portlet.jsr168.tck.portletsession;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.portal.test.framework.portlet.PortletTest;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_120})
+(a)TestCase({Assertion.JSR168_120})
public class SessionInvalidationTestCase
{
public SessionInvalidationTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/PortletURLParametersTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/PortletURLParametersTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/PortletURLParametersTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -48,7 +48,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_27,TCKAssertion.JSR168_28,TCKAssertion.JSR168_29})
+(a)TestCase({Assertion.JSR168_27, Assertion.JSR168_28, Assertion.JSR168_29})
public class PortletURLParametersTestCase
{
public PortletURLParametersTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/PortletURLWithNotSupportedModeTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/PortletURLWithNotSupportedModeTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/PortletURLWithNotSupportedModeTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -26,8 +26,8 @@
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;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -43,7 +43,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_32})
+(a)TestCase({Assertion.JSR168_32})
public class PortletURLWithNotSupportedModeTestCase
{
public PortletURLWithNotSupportedModeTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/PortletURLWithNotSupportedStateTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/PortletURLWithNotSupportedStateTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/PortletURLWithNotSupportedStateTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -26,8 +26,8 @@
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;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -43,7 +43,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_34})
+(a)TestCase({Assertion.JSR168_34})
public class PortletURLWithNotSupportedStateTestCase
{
public PortletURLWithNotSupportedStateTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/RenderURLNotInvokeActionTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/RenderURLNotInvokeActionTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/RenderURLNotInvokeActionTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -45,7 +45,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_26})
+(a)TestCase({Assertion.JSR168_26})
public class RenderURLNotInvokeActionTestCase
{
public RenderURLNotInvokeActionTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/SecurityLevelTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/SecurityLevelTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/portleturl/SecurityLevelTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -45,7 +45,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_35})
+(a)TestCase({Assertion.JSR168_35})
public class SecurityLevelTestCase
{
public SecurityLevelTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/CanModifyNonReadOnlyPreferenceTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/CanModifyNonReadOnlyPreferenceTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/CanModifyNonReadOnlyPreferenceTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -48,7 +48,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_99})
+(a)TestCase({Assertion.JSR168_99})
public class CanModifyNonReadOnlyPreferenceTestCase
{
public CanModifyNonReadOnlyPreferenceTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/ChangesMadeButNotStoredAreDiscardedTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/ChangesMadeButNotStoredAreDiscardedTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/ChangesMadeButNotStoredAreDiscardedTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP3;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -46,7 +46,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_96})
+(a)TestCase({Assertion.JSR168_96})
public class ChangesMadeButNotStoredAreDiscardedTestCase
{
public ChangesMadeButNotStoredAreDiscardedTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/CreateASingleInstanceOfValidatorTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/CreateASingleInstanceOfValidatorTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/CreateASingleInstanceOfValidatorTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP6;
import org.jboss.portal.test.portlet.jsr168.tck.preferences.spec.CreateASingleInstanceOfValidatorValidator;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.assertEquals;
@@ -41,7 +41,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_101})
+(a)TestCase({Assertion.JSR168_101})
public class CreateASingleInstanceOfValidatorTestCase
{
public CreateASingleInstanceOfValidatorTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/DynamicPreferenceTreatedLikeModifiablePreferenceTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/DynamicPreferenceTreatedLikeModifiablePreferenceTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/DynamicPreferenceTreatedLikeModifiablePreferenceTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP4;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -48,7 +48,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_100})
+(a)TestCase({Assertion.JSR168_100})
public class DynamicPreferenceTreatedLikeModifiablePreferenceTestCase
{
public DynamicPreferenceTreatedLikeModifiablePreferenceTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/InvalidationCancelsStoreTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/InvalidationCancelsStoreTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/InvalidationCancelsStoreTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP7;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -49,7 +49,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_104})
+(a)TestCase({Assertion.JSR168_104})
public class InvalidationCancelsStoreTestCase
{
public InvalidationCancelsStoreTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/PreferencesCanBeSetToNullTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/PreferencesCanBeSetToNullTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/PreferencesCanBeSetToNullTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP2;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -48,7 +48,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_90})
+(a)TestCase({Assertion.JSR168_90})
public class PreferencesCanBeSetToNullTestCase
{
public PreferencesCanBeSetToNullTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/PreferencesMapModificationDoesNotModifyPreferencesValuesTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/PreferencesMapModificationDoesNotModifyPreferencesValuesTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/PreferencesMapModificationDoesNotModifyPreferencesValuesTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -46,7 +46,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_91})
+(a)TestCase({Assertion.JSR168_91})
public class PreferencesMapModificationDoesNotModifyPreferencesValuesTestCase
{
public PreferencesMapModificationDoesNotModifyPreferencesValuesTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/ReadOnlyPreferenceCannotBeModifiedTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/ReadOnlyPreferenceCannotBeModifiedTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/ReadOnlyPreferenceCannotBeModifiedTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP5;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -47,7 +47,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_93})
+(a)TestCase({Assertion.JSR168_93})
public class ReadOnlyPreferenceCannotBeModifiedTestCase
{
public ReadOnlyPreferenceCannotBeModifiedTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/ResetPreferenceHavingNoDefaultValueDeletesItTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/ResetPreferenceHavingNoDefaultValueDeletesItTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/ResetPreferenceHavingNoDefaultValueDeletesItTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP4;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -48,7 +48,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_92})
+(a)TestCase({Assertion.JSR168_92})
public class ResetPreferenceHavingNoDefaultValueDeletesItTestCase
{
public ResetPreferenceHavingNoDefaultValueDeletesItTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/StoreCalledDuringRenderThrowsIllegalArgumentExceptionTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/StoreCalledDuringRenderThrowsIllegalArgumentExceptionTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/StoreCalledDuringRenderThrowsIllegalArgumentExceptionTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -26,8 +26,8 @@
import org.jboss.portal.test.framework.portlet.PortletTestContext;
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP4;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.fail;
@@ -43,7 +43,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_97})
+(a)TestCase({Assertion.JSR168_97})
public class StoreCalledDuringRenderThrowsIllegalArgumentExceptionTestCase
{
public StoreCalledDuringRenderThrowsIllegalArgumentExceptionTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/ValidationStoresTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/ValidationStoresTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/preferences/ValidationStoresTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -28,8 +28,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletActionTestAction;
import org.jboss.portal.test.portlet.framework.UTP8;
import org.jboss.portal.test.portlet.jsr168.tck.preferences.spec.ValidationStoresValidator;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
@@ -50,7 +50,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_103,TCKAssertion.JSR168_105})
+(a)TestCase({Assertion.JSR168_103, Assertion.JSR168_105})
public class ValidationStoresTestCase
{
public ValidationStoresTestCase(PortletTest seq)
Modified: modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/windowstates/CustomStateNotMappedNotInvokedTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/windowstates/CustomStateNotMappedNotInvokedTestCase.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/test/portlet/jsr168/tck/windowstates/CustomStateNotMappedNotInvokedTestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -27,8 +27,8 @@
import org.jboss.portal.test.framework.portlet.actions.PortletRenderTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.portal.test.portlet.framework.UTP2;
-import org.jboss.portal.unit.annotations.TCK;
-import org.jboss.portal.unit.TCKAssertion;
+import org.jboss.portal.unit.annotations.TestCase;
+import org.jboss.portal.unit.Assertion;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.FailureResponse;
import org.jboss.unit.driver.response.EndTestResponse;
@@ -46,7 +46,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-(a)TCK({TCKAssertion.JSR168_40})
+(a)TestCase({Assertion.JSR168_40})
public class CustomStateNotMappedNotInvokedTestCase
{
public CustomStateNotMappedNotInvokedTestCase(PortletTest seq)
Copied: modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/Assertion.java (from rev 8836, modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/TCKAssertion.java)
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/Assertion.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/Assertion.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -0,0 +1,624 @@
+/******************************************************************************
+ * 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.unit;
+
+/**
+ * Define TCK assertions.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public enum Assertion
+{
+
+ JSR168_4(new TCK(4), "After the portlet object is instantiated, the portlet container must" +
+ " initialize the portlet before invoking it to handle requests"),
+
+ JSR168_5(new TCK(5), "During initialization, the portlet object may throw an" +
+ " UnavailableException or a PortletException. In this case, the portlet container must not place the portlet object" +
+ " into active service and it must release the portlet object."),
+
+ JSR168_6(new TCK(6), "The destroy method must not be called because the initialization is" +
+ " considered unsuccessful."),
+
+ JSR168_8(new TCK(8), "A RuntimeException thrown during initialization must be handled as a" +
+ " PortletException."),
+
+ JSR168_9(new TCK(9), "If the client request is triggered by an action URL, the" +
+ " portal/portlet-container must first trigger the action request by invoking the processAction method of the" +
+ " targeted portlet."),
+
+ JSR168_10(new TCK(10), "The portal/portlet-container must wait until the action request finishes." +
+ " 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."),
+
+ JSR168_11(new TCK(11), "If the client request is triggered by a render URL, the" +
+ " 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."),
+
+ JSR168_12(new TCK(12), "While processing an action request, the portlet may instruct the" +
+ " 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"),
+
+ JSR168_17(new TCK(17), "A PortletException signals that an error has occurred during the processing" +
+ " of the request and that the portlet container should take appropriate measures to clean up the request. If a portlet" +
+ " throws an exception in the processAction method, all operations on the ActionResponse must be ignored and the render" +
+ " method must not be invoked within the current client request", Status.disabled("spec?")),
+
+ JSR168_18(new TCK(18), "If a permanent unavailability is indicated by the UnavailableException, the" +
+ " portlet container must remove the portlet from service immediately, call the portlet�s destroy method, and release" +
+ " the portlet object.", Status.disabled("spec?")),
+
+ JSR168_19(new TCK(19), "A RuntimeException thrown during the request handling must be handled as a" +
+ " PortletException", Status.disabled("spec?")),
+
+ JSR168_24(new TCK(24), ""),
+
+ JSR168_26(new TCK(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."),
+
+ JSR168_27(new TCK(27), "The portal/portlet-container must ensure that all the parameters set when" +
+ " constructing the render URL become render parameters of the subsequent render requests for the portlet."),
+
+ JSR168_28(new TCK(28), "Portlets can add application specific parameters to the PortletURL" +
+ " objects using the setParameter and setParameters methods. A call to any of the setParameter methods must replace" +
+ " any parameter with the same name previously set."),
+
+ JSR168_30(new TCK(30), "", Status.jbossUntestable("why?")),
+
+ JSR168_31(new TCK(31), "", Status.jbossUntestable("why?")),
+
+ JSR168_29(new TCK(29), "All the parameters a portlet adds to a PortletURL object must be made" +
+ " available to the portlet as request parameters"),
+
+ JSR168_32(new TCK(32), "A portlet cannot create a portlet URL using a portlet mode that is not" +
+ " 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."),
+
+ JSR168_34(new TCK(34), "A portlet cannot create a portlet URL using a window state that is not" +
+ " supported by the portlet container. The setWindowState method must throw a WindowStateException if that is the" +
+ " case"),
+
+ JSR168_35(new TCK(35), "The setSecure method of the PortletURL interface allows a portlet to" +
+ " 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."),
+
+ JSR168_36(new TCK(36), "The GenericPortlet class implementation of the render method dispatches" +
+ " requests to the doView, doEdit or doHelp method depending on the portlet mode indicated in the request using the" +
+ " doDispatch method"),
+
+ JSR168_33(new TCK(33), "", Status.duplicate(JSR168_36, "")),
+
+ JSR168_37(new TCK(37), "", Status.duplicate(JSR168_36, "RequestDispatchingDependingOnModePortlet as VIEW mode isn't specified in descriptor")),
+
+ JSR168_38(new TCK(38), "The portlet must not be invoked in a portlet mode that has not been" +
+ " declared as supported for a given markup type", Status.disabled("spec?")),
+
+ JSR168_40(new TCK(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."),
+
+ JSR168_43(new TCK(43), "The initialization parameters accessible through the PortletContext must" +
+ " be the same that are accessible through the ServletContext of the portlet application."),
+
+ JSR168_44(new TCK(44), "Context attributes set using the PortletContext must be stored in the" +
+ " 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."),
+
+ JSR168_45(new TCK(45), "The PortletContext must offer access to the same set of resources the" +
+ " ServletContext exposes."),
+
+ JSR168_46(new TCK(46), "The PortletContext must handle the same temporary working directory the" +
+ " 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."),
+
+ JSR168_47(new TCK(47), "", Status.postponed("spec?")),
+
+ JSR168_48(new TCK(48), "", Status.postponed("spec?")),
+
+ JSR168_49(new TCK(49), "", Status.postponed("spec?")),
+
+ JSR168_50(new TCK(50), "The portlet-container must not propagate parameters received in an action" +
+ " request to subsequent render requests of the portlet."),
+
+ JSR168_51(new TCK(51), "If a portlet receives a render request that is the result of a client" +
+ " request targeted to another portlet in the portal page, the parameters must be the same parameters as of the" +
+ " previous render request."),
+
+ JSR168_52(new TCK(52), "If a portlet receives a render request following an action request as" +
+ " part of the same client request, the parameters received with render request must be the render parameters set" +
+ " during the action request."),
+
+ JSR168_53(new TCK(53), "", Status.postponed("spec?")),
+
+ JSR168_54(new TCK(54), "A portlet must not see any parameter targeted to other portlets."),
+
+ JSR168_55(new TCK(55), "The getParameterValues method returns an array of String objects" +
+ " containing all the parameter values associated with a parameter name. The value returned from the getParameter" +
+ " method must be the first value in the array of String objects returned by getParameterValues"),
+
+ JSR168_56(new TCK(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"),
+
+ JSR168_57(new TCK(57), "", Status.specUntestable("")),
+
+ JSR168_58(new TCK(58), "The context path of a request is exposed via the request object. The" +
+ " context path is the path prefix associated with the deployed portlet application. If the portlet application is" +
+ " rooted at the base of the web server URL namespace (also known as \"default\" context), this path must be an empty" +
+ " string"),
+
+ JSR168_59(new TCK(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."),
+
+ JSR168_60(new TCK(60), "If the user is not authenticated the getAuthType method must return null"),
+
+ JSR168_61(new TCK(61), "If the portlet container supports additional content types for the" +
+ " portlet�s output, it must declare the additional content types through the getResponseContentTypes method of the" +
+ " request object. The returned Enumeration of strings should contain the content types the portlet container" +
+ " supports in order of preference. The first element of the enumeration must be the same content type returned by" +
+ " the getResponseContentType method."),
+
+ JSR168_62(new TCK(62), "", Status.jbossUntestable("PORTAL DOESN'T SUPPORT ADDITIONAL CONTENT TYPES")),
+
+ JSR168_63(new TCK(63), "Only one of the two methods, getPortletInputStream or getReader, can be" +
+ " used during an action request. If the input stream is obtained, a call to the getReader must throw an" +
+ " IllegalStateException. Similarly, if the reader is obtained, a call to the getPortletInputStream must throw an" +
+ " IllegalStateException."),
+
+ JSR168_64(new TCK(64), "", Status.postponed("")),
+
+ JSR168_65(new TCK(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."),
+
+ JSR168_66(new TCK(66), "If the sendRedirect method is called after the setPortletMode," +
+ " setWindowState, setRenderParameter or setRenderParameters methods of the ActionResponse interface, an" +
+ " IllegalStateException must be thrown and the redirection must not be executed"),
+
+ JSR168_67(new TCK(67), "The setPortletMode method allows a portlet to change its current portlet" +
+ " 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."),
+
+ JSR168_68(new TCK(68), "The setWindowState method allows a portlet to change its current window" +
+ " 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."),
+
+ JSR168_69(new TCK(69), "If the setPortletMode or setWindowState methods are called after the" +
+ " sendRedirect method has been called an IllegalStateException must be thrown."),
+
+ JSR168_70(new TCK(70), "If the exception is caught by the portlet, the redirection must be" +
+ " executed."),
+
+ JSR168_71(new TCK(71), "If the setPortletMode or setWindowState methods are called after the" +
+ " 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.", Status.disabled("This is disabled as after propagating IllegalStateException to PortletContainer" +
+ " '500' code is returned which doesn't allow us to end test properly")),
+
+ JSR168_72(new TCK(72), "Using the setRenderParameter and setRenderParameters methods of the" +
+ " ActionResponse interface portlets may set render parameters during an action request. A call to any of the" +
+ " setRenderParameter methods must replace any parameter with the same name previously set."),
+
+ JSR168_73(new TCK(73), "If no render parameters are set during the processAction invocation, the" +
+ " render request must not contain any request parameters."),
+
+ JSR168_74(new TCK(74), "If the setRenderParameter or setRenderParameters methods are called after" +
+ " the sendRedirect method has been called an IllegalStateException must be thrown"),
+
+ // done only partially - see SPEC:71 comment for the reason
+ JSR168_75(new TCK(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."),
+
+ JSR168_76(new TCK(76), "A portlet must set the content type of the response using the" +
+ " setContentType method of the RenderResponse interface. The setContentType method must throw an" +
+ " 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"),
+
+ JSR168_77(new TCK(77), "If the getWriter or getPortletOutputStream methods are called before the" +
+ " setContentType method, they must throw an IllegalStateException."),
+
+ JSR168_78(new TCK(78), "If the portlet has set a content type, the getContentType method must" +
+ " return it. Otherwise, the getContentType method must return null."),
+
+ JSR168_79(new TCK(79), "A portlet may generate its content by writing to the OutputStream or to" +
+ " 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."),
+
+ JSR168_80(new TCK(80), "The getBufferSize method returns the size of the underlying buffer being" +
+ " used. If no buffering is being used, this method must return the int value of 0 (zero)", Status.disabled("no buffering is implemented yet")),
+
+ JSR168_81(new TCK(81), "The portlet can request a preferred buffer size by using the" +
+ " 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.", Status.disabled("no buffering is implemented yet")),
+
+ JSR168_82(new TCK(82), "", Status.postponed("")),
+
+ JSR168_83(new TCK(83), "If the response is committed and the reset or resetBuffer method is" +
+ " called, an IllegalStateException must be thrown.", Status.disabled("no buffering is implemented yet")),
+
+ JSR168_84(new TCK(84), "", Status.postponed("")),
+
+ JSR168_85(new TCK(85), "", Status.postponed("")),
+
+ JSR168_86(new TCK(86), "The getNamespace method must provide the portlet with a mechanism that" +
+ " ensures the uniqueness of the returned string in the whole portal page"),
+
+ JSR168_87(new TCK(87), "The getNamespace method must return the same value if invoked multiple" +
+ " times within a render request."),
+
+ JSR168_88(new TCK(88), "The getNamespace method must return a valid identifier as defined in the" +
+ " 3.8 Identifier Section of the Java Language Specification Second Edition."),
+
+ JSR168_90(new TCK(90), "Preference attributes are String array objects. Preferences attributes can" +
+ " be set to null."),
+
+ JSR168_91(new TCK(91), "The getMap method returns an immutable Map of String keys and String[]" +
+ " values containing all current preference values. Preferences values must not be modified if the values in the Map" +
+ " are altered."),
+
+ // Does not cover restore to default test yet.
+ JSR168_92(new TCK(92), "The reset method must reset a preference attribute to its default value." +
+ " If there is no default value, the preference attribute must be deleted."),
+
+ JSR168_93(new TCK(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"),
+
+ JSR168_94(new TCK(94), "", Status.disabled("Tested in every over case in this chapter... DONE")),
+
+ JSR168_95(new TCK(95), "", Status.postponed("why?")),
+
+ JSR168_96(new TCK(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."),
+
+ JSR168_97(new TCK(97), "If the store method is invoked within the scope of a render method" +
+ " invocation, it must throw an IllegalStateException."),
+
+ JSR168_98(new TCK(98), "", Status.postponed("why?")),
+
+ JSR168_99(new TCK(99), "If a preference attribute definition does not contain the read-only" +
+ " 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)."),
+
+ JSR168_100(new TCK(100), "Portlets are not restricted to use preference attributes defined in the" +
+ " 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."),
+
+ JSR168_101(new TCK(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 ;)"),
+
+ JSR168_102(new TCK(102), "", Status.specUntestable("")),
+
+ JSR168_103(new TCK(103), "When a validator is associated with the preferences of a portlet" +
+ " definition, the store method of the PortletPreferences implementation must invoke the validate method of the" +
+ " validator before writing the changes to the persistent store."),
+
+ JSR168_104(new TCK(104), "If the validation fails, the PreferencesValidator implementation must" +
+ " 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"),
+
+ JSR168_105(new TCK(105), "If the validation is successful, the store operation must be completed"),
+
+ JSR168_106(new TCK(106), "For portlets within the same portlet application, a portlet container" +
+ " must ensure that every portlet request generated as result of a group of requests originated from the portal to" +
+ " complete a single client request receive or acquire the same session"),
+
+ JSR168_107(new TCK(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"),
+
+ JSR168_110(new TCK(110), "Any object stored in the session using the APPLICATION_SCOPE is" +
+ " available to any other portlet that belongs to the same portlet application and that handles a request identified" +
+ " as being a part of the same session."),
+
+ JSR168_111(new TCK(111), "Objects stored in the session using the PORTLET_SCOPE must be available" +
+ " to the portlet during requests for the same portlet window that the objects where stored from."),
+
+ JSR168_112(new TCK(112), "The object must be stored in the APPLICATION_SCOPE with the following" +
+ " fabricated attribute name 'javax.portlet.p.<ID>?<ATTRIBUTE_NAME>'. <ID> is a unique identification for the portlet" +
+ " window (assigned by the portal/portlet-container) that must not contain a '?' character."),
+
+ JSR168_113(new TCK(113), "The PortletSession must store all attributes in the HttpSession of the" +
+ " portlet application. A direct consequence of this is that data stored in the HttpSession by servlets or JSPs is" +
+ " accessible to portlets through the PortletSession in the portlet application scope."),
+
+ JSR168_114(new TCK(114), "Conversely, data stored by portlets in the PortletSession in the portlet" +
+ " application scope is accessible to servlets and JSPs through the HttpSession."),
+
+ JSR168_115(new TCK(115), "If the HttpSession object is invalidated, the PortletSession object must" +
+ " also be invalidated by the portlet container."),
+
+ JSR168_116(new TCK(116), "If the PortletSession object is invalidated by a portlet, the portlet" +
+ " container must invalidate the associated HttpSession object."),
+
+ JSR168_117(new TCK(117), "The attribute names must be the same if APPLICATION_SCOPE scope is" +
+ " used."),
+
+ JSR168_118(new TCK(118), "The attribute name has to conform with the specified prefixing if" +
+ " PORTLET_SCOPE is used"),
+
+ JSR168_119(new TCK(119), "The variant of these methods that does not receive a scope must be" +
+ " treated as PORTLET_SCOPE."),
+
+ JSR168_120(new TCK(120), "", Status.jbossUntestable("why?")),
+
+ JSR168_121(new TCK(121), "The getRequestDispatcher method takes a String argument describing a" +
+ " path within the scope of the PortletContext of a portlet application. This path must begin with a �/� and it is" +
+ " relative to the PortletContext root."),
+
+ JSR168_122(new TCK(122), "The getNamedDispatcher method takes a String argument indicating the" +
+ " 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"),
+
+ JSR168_123(new TCK(123), "The parameters associated with a PortletRequestDispatcher are scoped to" +
+ " apply only for the duration of the include call."),
+
+ JSR168_124(new TCK(124), "To include a servlet or a JSP, a portlet calls the include method of the" +
+ " PortletRequestDispatcher interface. The parameters to these methods must be the request and response arguments" +
+ " that were passed in via the render method of the Portlet interface."),
+
+ JSR168_125(new TCK(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."),
+
+ JSR168_126(new TCK(126), "Servlets and JSPs included from portlets must be handled as HTTP GET requests."),
+
+ JSR168_127(new TCK(127), "Except for servlets obtained by using the getNamedDispatcher method, a" +
+ " servlet or JSP being used from within an include call has access to the path used to obtain the" +
+ " PortletRequestDispatcher. The following request attributes must be set: javax.servlet.include.request_uri," +
+ " javax.servlet.include.context_path javax.servlet.include.servlet_path, javax.servlet.include.path_info," +
+ " javax.servlet.include.query_string"),
+
+ JSR168_128(new TCK(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."),
+
+ JSR168_129(new TCK(129), "The following methods of the HttpServletRequest must return null:" +
+ " getProtocol, getRemoteAddr, getRemoteHost, getRealPath, and getRequestURL."),
+
+ JSR168_130(new TCK(130), "The following methods of the HttpServletRequest must return the path and"+
+ " query string information used to obtain the PortletRequestDispatcher object: getPathInfo, getPathTranslated,"+
+ " getQueryString, getRequestURI and getServletPath"),
+
+ JSR168_131(new TCK(131), "The following methods of the HttpServletRequest must be equivalent to" +
+ " the methods of the PortletRequest of similar name: getScheme, getServerName,getServerPort, getAttribute," +
+ " getAttributeNames, setAttribute,removeAttribute, getLocale, getLocales, isSecure, getAuthType, getContextPath," +
+ " getRemoteUser, getUserPrincipal, getRequestedSessionId, isRequestedSessionIdValid"),
+
+ JSR168_132(new TCK(132), "The following methods of the HttpServletRequest must be equivalent to" +
+ " the methods of the PortletRequest of similar name with the provision defined in PLT.16.1.1 Query Strings in" +
+ " Request Dispatcher Paths Section: getParameter, getParameterNames, getParameterValues and getParameterMap."),
+
+ JSR168_133(new TCK(133), "The following methods of the HttpServletRequest must do no operations" +
+ " and return null: getCharacterEncoding, setCharacterEncoding, getContentType, getInputStream and getReader."),
+
+ JSR168_134(new TCK(134), "The getContentLength method of the HttpServletRequest must return 0."),
+
+
+ JSR168_137(new TCK(137), "The getMethod method of the HttpServletRequest must always return 'GET'"),
+
+ JSR168_138(new TCK(138), "The following methods of the HttpServletResponse must return" +
+ " null:encodeRedirectURL and encodeRedirectUrl"),
+
+ JSR168_141(new TCK(141), "The getLocale method of the HttpServletResponse must be based on the" +
+ " getLocale method of the RenderResponse."),
+
+ JSR168_142(new TCK(142), "If the servlet or JSP that is the target of a request dispatcher throws" +
+ " a runtime exception or a checked exception of type IOException, it must be propagated to the calling portlet."),
+
+ JSR168_143(new TCK(143), "All other exceptions, including a ServletException, must be wrapped with" +
+ " a PortletException. The root cause of the exception must be set to the original exception before being" +
+ " propagated."),
+
+ ;
+
+ /**
+ * An abstract reference.
+ */
+ public abstract static class Ref
+ {
+ public abstract String toString();
+ }
+
+ /**
+ * A reference to a JSR 168 TCK test.
+ */
+ public static class TCK extends Ref
+ {
+
+ /** . */
+ private int index;
+
+ public TCK(int index)
+ {
+ this.index = index;
+ }
+
+ public int getIndex()
+ {
+ return index;
+ }
+
+ public String toString()
+ {
+ return "TCK[" + index + "]";
+ }
+ }
+
+ /**
+ * The status of an assertion.
+ */
+ public abstract static class Status
+ {
+ protected Status()
+ {
+ }
+
+ private static Inactive disabled(String cause)
+ {
+ return new Inactive(Inactive.Type.DISABLED, cause);
+ }
+
+ private static Inactive todo(String cause)
+ {
+ return new Inactive(Inactive.Type.TODO, cause);
+ }
+
+ private static Inactive postponed(String cause)
+ {
+ return new Inactive(Inactive.Type.POSTPONED, cause);
+ }
+
+ private static Inactive specUntestable(String cause)
+ {
+ return new Untestable(Untestable.Kind.SPEC, cause);
+ }
+
+ private static Inactive jbossUntestable(String cause)
+ {
+ return new Untestable(Untestable.Kind.JBOSS, cause);
+ }
+
+ private static Duplicate duplicate(Assertion target, String description)
+ {
+ return new Duplicate(target, description);
+ }
+ }
+
+ public static class Active extends Status
+ {
+
+ }
+
+ public static class Inactive extends Status
+ {
+
+ /** . */
+ private final Type type;
+
+ /** . */
+ private final String msg;
+
+ public enum Type
+ {
+ POSTPONED, TODO, DISABLED, UNTESTABLE
+ }
+
+ public Inactive(Type type, String msg)
+ {
+ this.type = type;
+ this.msg = msg;
+ }
+
+ public Type getType()
+ {
+ return type;
+ }
+
+ public String getMessage()
+ {
+ return msg;
+ }
+ }
+
+ public static class Untestable extends Inactive
+ {
+
+ public enum Kind
+ {
+ JBOSS, SPEC
+ }
+
+ /** . */
+ private final Kind kind;
+
+ public Untestable(Kind kind, String msg)
+ {
+ super(Inactive.Type.UNTESTABLE, msg);
+
+ //
+ this.kind = kind;
+ }
+
+ public Kind getKind()
+ {
+ return kind;
+ }
+ }
+
+ public static class Duplicate extends Active
+ {
+
+ /** . */
+ private final Assertion target;
+
+ /** . */
+ private final String description;
+
+ private Duplicate(Assertion target, String description)
+ {
+ this.target = target;
+ this.description = description;
+ }
+
+ public Assertion getTarget()
+ {
+ return target;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+ }
+
+ /** . */
+ private final Ref ref;
+
+ /** . */
+ private final String description;
+
+ /** . */
+ private Status status;
+
+ Assertion(Ref ref, String description)
+ {
+ this(ref, description, new Active());
+ }
+
+ Assertion(Ref ref, String description, Status status)
+ {
+ this.ref = ref;
+ this.description = description;
+ this.status = status;
+ }
+
+ public Ref getRef()
+ {
+ return ref;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public Status getStatus()
+ {
+ return status;
+ }
+}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/TCKAssertion.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/TCKAssertion.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/TCKAssertion.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -1,588 +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.unit;
-
-/**
- * Define TCK assertions.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public enum TCKAssertion
-{
-
- JSR168_4(4, "After the portlet object is instantiated, the portlet container must" +
- " initialize the portlet before invoking it to handle requests"),
-
- JSR168_5(5, "During initialization, the portlet object may throw an" +
- " UnavailableException or a PortletException. In this case, the portlet container must not place the portlet object" +
- " into active service and it must release the portlet object."),
-
- JSR168_6(6, "The destroy method must not be called because the initialization is" +
- " considered unsuccessful."),
-
- JSR168_8(8, "A RuntimeException thrown during initialization must be handled as a" +
- " PortletException."),
-
- JSR168_9(9, "If the client request is triggered by an action URL, the" +
- " portal/portlet-container must first trigger the action request by invoking the processAction method of the" +
- " targeted portlet."),
-
- JSR168_10(10, "The portal/portlet-container must wait until the action request finishes." +
- " 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."),
-
- JSR168_11(11, "If the client request is triggered by a render URL, the" +
- " 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."),
-
- JSR168_12(12, "While processing an action request, the portlet may instruct the" +
- " 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"),
-
- JSR168_17(17, "A PortletException signals that an error has occurred during the processing" +
- " of the request and that the portlet container should take appropriate measures to clean up the request. If a portlet" +
- " throws an exception in the processAction method, all operations on the ActionResponse must be ignored and the render" +
- " method must not be invoked within the current client request", Status.disabled("spec?")),
-
- JSR168_18(18, "If a permanent unavailability is indicated by the UnavailableException, the" +
- " portlet container must remove the portlet from service immediately, call the portlet�s destroy method, and release" +
- " the portlet object.", Status.disabled("spec?")),
-
- JSR168_19(19, "A RuntimeException thrown during the request handling must be handled as a" +
- " PortletException", Status.disabled("spec?")),
-
- JSR168_24(24, ""),
-
- JSR168_26(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."),
-
- JSR168_27(27, "The portal/portlet-container must ensure that all the parameters set when" +
- " constructing the render URL become render parameters of the subsequent render requests for the portlet."),
-
- JSR168_28(28, "Portlets can add application specific parameters to the PortletURL" +
- " objects using the setParameter and setParameters methods. A call to any of the setParameter methods must replace" +
- " any parameter with the same name previously set."),
-
- JSR168_30(30, "", Status.jbossUntestable("why?")),
-
- JSR168_31(31, "", Status.jbossUntestable("why?")),
-
- JSR168_29(29, "All the parameters a portlet adds to a PortletURL object must be made" +
- " available to the portlet as request parameters"),
-
- JSR168_32(32, "A portlet cannot create a portlet URL using a portlet mode that is not" +
- " 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."),
-
- JSR168_34(34, "A portlet cannot create a portlet URL using a window state that is not" +
- " supported by the portlet container. The setWindowState method must throw a WindowStateException if that is the" +
- " case"),
-
- JSR168_35(35, "The setSecure method of the PortletURL interface allows a portlet to" +
- " 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."),
-
- JSR168_36(36, "The GenericPortlet class implementation of the render method dispatches" +
- " requests to the doView, doEdit or doHelp method depending on the portlet mode indicated in the request using the" +
- " doDispatch method"),
-
- JSR168_33(33, "", Status.duplicate(JSR168_36, "")),
-
- JSR168_37(37, "", Status.duplicate(JSR168_36, "RequestDispatchingDependingOnModePortlet as VIEW mode isn't specified in descriptor")),
-
- JSR168_38(38, "The portlet must not be invoked in a portlet mode that has not been" +
- " declared as supported for a given markup type", Status.disabled("spec?")),
-
- JSR168_40(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."),
-
- JSR168_43(43, "The initialization parameters accessible through the PortletContext must" +
- " be the same that are accessible through the ServletContext of the portlet application."),
-
- JSR168_44(44, "Context attributes set using the PortletContext must be stored in the" +
- " 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."),
-
- JSR168_45(45, "The PortletContext must offer access to the same set of resources the" +
- " ServletContext exposes."),
-
- JSR168_46(46, "The PortletContext must handle the same temporary working directory the" +
- " 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."),
-
- JSR168_47(47, "", Status.postponed("spec?")),
-
- JSR168_48(48, "", Status.postponed("spec?")),
-
- JSR168_49(49, "", Status.postponed("spec?")),
-
- JSR168_50(50, "The portlet-container must not propagate parameters received in an action" +
- " request to subsequent render requests of the portlet."),
-
- JSR168_51(51, "If a portlet receives a render request that is the result of a client" +
- " request targeted to another portlet in the portal page, the parameters must be the same parameters as of the" +
- " previous render request."),
-
- JSR168_52(52, "If a portlet receives a render request following an action request as" +
- " part of the same client request, the parameters received with render request must be the render parameters set" +
- " during the action request."),
-
- JSR168_53(53, "", Status.postponed("spec?")),
-
- JSR168_54(54, "A portlet must not see any parameter targeted to other portlets."),
-
- JSR168_55(55, "The getParameterValues method returns an array of String objects" +
- " containing all the parameter values associated with a parameter name. The value returned from the getParameter" +
- " method must be the first value in the array of String objects returned by getParameterValues"),
-
- JSR168_56(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"),
-
- JSR168_57(57, "", Status.specUntestable("")),
-
- JSR168_58(58, "The context path of a request is exposed via the request object. The" +
- " context path is the path prefix associated with the deployed portlet application. If the portlet application is" +
- " rooted at the base of the web server URL namespace (also known as \"default\" context), this path must be an empty" +
- " string"),
-
- JSR168_59(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."),
-
- JSR168_60(60, "If the user is not authenticated the getAuthType method must return null"),
-
- JSR168_61(61, "If the portlet container supports additional content types for the" +
- " portlet�s output, it must declare the additional content types through the getResponseContentTypes method of the" +
- " request object. The returned Enumeration of strings should contain the content types the portlet container" +
- " supports in order of preference. The first element of the enumeration must be the same content type returned by" +
- " the getResponseContentType method."),
-
- JSR168_62(62, "", Status.jbossUntestable("PORTAL DOESN'T SUPPORT ADDITIONAL CONTENT TYPES")),
-
- JSR168_63(63, "Only one of the two methods, getPortletInputStream or getReader, can be" +
- " used during an action request. If the input stream is obtained, a call to the getReader must throw an" +
- " IllegalStateException. Similarly, if the reader is obtained, a call to the getPortletInputStream must throw an" +
- " IllegalStateException."),
-
- JSR168_64(64, "", Status.postponed("")),
-
- JSR168_65(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."),
-
- JSR168_66(66, "If the sendRedirect method is called after the setPortletMode," +
- " setWindowState, setRenderParameter or setRenderParameters methods of the ActionResponse interface, an" +
- " IllegalStateException must be thrown and the redirection must not be executed"),
-
- JSR168_67(67, "The setPortletMode method allows a portlet to change its current portlet" +
- " 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."),
-
- JSR168_68(68, "The setWindowState method allows a portlet to change its current window" +
- " 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."),
-
- JSR168_69(69, "If the setPortletMode or setWindowState methods are called after the" +
- " sendRedirect method has been called an IllegalStateException must be thrown."),
-
- JSR168_70(70, "If the exception is caught by the portlet, the redirection must be" +
- " executed."),
-
- JSR168_71(71, "If the setPortletMode or setWindowState methods are called after the" +
- " 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.", Status.disabled("This is disabled as after propagating IllegalStateException to PortletContainer" +
- " '500' code is returned which doesn't allow us to end test properly")),
-
- JSR168_72(72, "Using the setRenderParameter and setRenderParameters methods of the" +
- " ActionResponse interface portlets may set render parameters during an action request. A call to any of the" +
- " setRenderParameter methods must replace any parameter with the same name previously set."),
-
- JSR168_73(73, "If no render parameters are set during the processAction invocation, the" +
- " render request must not contain any request parameters."),
-
- JSR168_74(74, "If the setRenderParameter or setRenderParameters methods are called after" +
- " the sendRedirect method has been called an IllegalStateException must be thrown"),
-
- // done only partially - see SPEC:71 comment for the reason
- JSR168_75(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."),
-
- JSR168_76(76, "A portlet must set the content type of the response using the" +
- " setContentType method of the RenderResponse interface. The setContentType method must throw an" +
- " 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"),
-
- JSR168_77(77, "If the getWriter or getPortletOutputStream methods are called before the" +
- " setContentType method, they must throw an IllegalStateException."),
-
- JSR168_78(78, "If the portlet has set a content type, the getContentType method must" +
- " return it. Otherwise, the getContentType method must return null."),
-
- JSR168_79(79, "A portlet may generate its content by writing to the OutputStream or to" +
- " 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."),
-
- JSR168_80(80, "The getBufferSize method returns the size of the underlying buffer being" +
- " used. If no buffering is being used, this method must return the int value of 0 (zero)", Status.disabled("no buffering is implemented yet")),
-
- JSR168_81(81, "The portlet can request a preferred buffer size by using the" +
- " 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.", Status.disabled("no buffering is implemented yet")),
-
- JSR168_82(82, "", Status.postponed("")),
-
- JSR168_83(83, "If the response is committed and the reset or resetBuffer method is" +
- " called, an IllegalStateException must be thrown.", Status.disabled("no buffering is implemented yet")),
-
- JSR168_84(84, "", Status.postponed("")),
-
- JSR168_85(85, "", Status.postponed("")),
-
- JSR168_86(86, "The getNamespace method must provide the portlet with a mechanism that" +
- " ensures the uniqueness of the returned string in the whole portal page"),
-
- JSR168_87(87, "The getNamespace method must return the same value if invoked multiple" +
- " times within a render request."),
-
- JSR168_88(88, "The getNamespace method must return a valid identifier as defined in the" +
- " 3.8 Identifier Section of the Java Language Specification Second Edition."),
-
- JSR168_90(90, "Preference attributes are String array objects. Preferences attributes can" +
- " be set to null."),
-
- JSR168_91(91, "The getMap method returns an immutable Map of String keys and String[]" +
- " values containing all current preference values. Preferences values must not be modified if the values in the Map" +
- " are altered."),
-
- // Does not cover restore to default test yet.
- JSR168_92(92, "The reset method must reset a preference attribute to its default value." +
- " If there is no default value, the preference attribute must be deleted."),
-
- JSR168_93(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"),
-
- JSR168_94(94, "", Status.disabled("Tested in every over case in this chapter... DONE")),
-
- JSR168_95(95, "", Status.postponed("why?")),
-
- JSR168_96(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."),
-
- JSR168_97(97, "If the store method is invoked within the scope of a render method" +
- " invocation, it must throw an IllegalStateException."),
-
- JSR168_98(98, "", Status.postponed("why?")),
-
- JSR168_99(99, "If a preference attribute definition does not contain the read-only" +
- " 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)."),
-
- JSR168_100(100, "Portlets are not restricted to use preference attributes defined in the" +
- " 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."),
-
- JSR168_101(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 ;)"),
-
- JSR168_102(102, "", Status.specUntestable("")),
-
- JSR168_103(103, "When a validator is associated with the preferences of a portlet" +
- " definition, the store method of the PortletPreferences implementation must invoke the validate method of the" +
- " validator before writing the changes to the persistent store."),
-
- JSR168_104(104, "If the validation fails, the PreferencesValidator implementation must" +
- " 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"),
-
- JSR168_105(105, "If the validation is successful, the store operation must be completed"),
-
- JSR168_106(106, "For portlets within the same portlet application, a portlet container" +
- " must ensure that every portlet request generated as result of a group of requests originated from the portal to" +
- " complete a single client request receive or acquire the same session"),
-
- JSR168_107(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"),
-
- JSR168_110(110, "Any object stored in the session using the APPLICATION_SCOPE is" +
- " available to any other portlet that belongs to the same portlet application and that handles a request identified" +
- " as being a part of the same session."),
-
- JSR168_111(111, "Objects stored in the session using the PORTLET_SCOPE must be available" +
- " to the portlet during requests for the same portlet window that the objects where stored from."),
-
- JSR168_112(112, "The object must be stored in the APPLICATION_SCOPE with the following" +
- " fabricated attribute name 'javax.portlet.p.<ID>?<ATTRIBUTE_NAME>'. <ID> is a unique identification for the portlet" +
- " window (assigned by the portal/portlet-container) that must not contain a '?' character."),
-
- JSR168_113(113, "The PortletSession must store all attributes in the HttpSession of the" +
- " portlet application. A direct consequence of this is that data stored in the HttpSession by servlets or JSPs is" +
- " accessible to portlets through the PortletSession in the portlet application scope."),
-
- JSR168_114(114, "Conversely, data stored by portlets in the PortletSession in the portlet" +
- " application scope is accessible to servlets and JSPs through the HttpSession."),
-
- JSR168_115(115, "If the HttpSession object is invalidated, the PortletSession object must" +
- " also be invalidated by the portlet container."),
-
- JSR168_116(116, "If the PortletSession object is invalidated by a portlet, the portlet" +
- " container must invalidate the associated HttpSession object."),
-
- JSR168_117(117, "The attribute names must be the same if APPLICATION_SCOPE scope is" +
- " used."),
-
- JSR168_118(118, "The attribute name has to conform with the specified prefixing if" +
- " PORTLET_SCOPE is used"),
-
- JSR168_119(119, "The variant of these methods that does not receive a scope must be" +
- " treated as PORTLET_SCOPE."),
-
- JSR168_120(120, "", Status.jbossUntestable("why?")),
-
- JSR168_121(121, "The getRequestDispatcher method takes a String argument describing a" +
- " path within the scope of the PortletContext of a portlet application. This path must begin with a �/� and it is" +
- " relative to the PortletContext root."),
-
- JSR168_122(122, "The getNamedDispatcher method takes a String argument indicating the" +
- " 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"),
-
- JSR168_123(123, "The parameters associated with a PortletRequestDispatcher are scoped to" +
- " apply only for the duration of the include call."),
-
- JSR168_124(124, "To include a servlet or a JSP, a portlet calls the include method of the" +
- " PortletRequestDispatcher interface. The parameters to these methods must be the request and response arguments" +
- " that were passed in via the render method of the Portlet interface."),
-
- JSR168_125(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."),
-
- JSR168_126(126, "Servlets and JSPs included from portlets must be handled as HTTP GET requests."),
-
- JSR168_127(127, "Except for servlets obtained by using the getNamedDispatcher method, a" +
- " servlet or JSP being used from within an include call has access to the path used to obtain the" +
- " PortletRequestDispatcher. The following request attributes must be set: javax.servlet.include.request_uri," +
- " javax.servlet.include.context_path javax.servlet.include.servlet_path, javax.servlet.include.path_info," +
- " javax.servlet.include.query_string"),
-
- JSR168_128(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."),
-
- JSR168_129(129, "The following methods of the HttpServletRequest must return null:" +
- " getProtocol, getRemoteAddr, getRemoteHost, getRealPath, and getRequestURL."),
-
- JSR168_130(130, "The following methods of the HttpServletRequest must return the path and"+
- " query string information used to obtain the PortletRequestDispatcher object: getPathInfo, getPathTranslated,"+
- " getQueryString, getRequestURI and getServletPath"),
-
- JSR168_131(131, "The following methods of the HttpServletRequest must be equivalent to" +
- " the methods of the PortletRequest of similar name: getScheme, getServerName,getServerPort, getAttribute," +
- " getAttributeNames, setAttribute,removeAttribute, getLocale, getLocales, isSecure, getAuthType, getContextPath," +
- " getRemoteUser, getUserPrincipal, getRequestedSessionId, isRequestedSessionIdValid"),
-
- JSR168_132(132, "The following methods of the HttpServletRequest must be equivalent to" +
- " the methods of the PortletRequest of similar name with the provision defined in PLT.16.1.1 Query Strings in" +
- " Request Dispatcher Paths Section: getParameter, getParameterNames, getParameterValues and getParameterMap."),
-
- JSR168_133(133, "The following methods of the HttpServletRequest must do no operations" +
- " and return null: getCharacterEncoding, setCharacterEncoding, getContentType, getInputStream and getReader."),
-
- JSR168_134(134, "The getContentLength method of the HttpServletRequest must return 0."),
-
-
- JSR168_137(137, "The getMethod method of the HttpServletRequest must always return 'GET'"),
-
- JSR168_138(138, "The following methods of the HttpServletResponse must return" +
- " null:encodeRedirectURL and encodeRedirectUrl"),
-
- JSR168_141(141, "The getLocale method of the HttpServletResponse must be based on the" +
- " getLocale method of the RenderResponse."),
-
- JSR168_142(142, "If the servlet or JSP that is the target of a request dispatcher throws" +
- " a runtime exception or a checked exception of type IOException, it must be propagated to the calling portlet."),
-
- JSR168_143(143, "All other exceptions, including a ServletException, must be wrapped with" +
- " a PortletException. The root cause of the exception must be set to the original exception before being" +
- " propagated."),
-
- ;
-
- public abstract static class Status
- {
- protected Status()
- {
- }
-
- private static Inactive disabled(String cause)
- {
- return new Inactive(Inactive.Type.DISABLED, cause);
- }
-
- private static Inactive todo(String cause)
- {
- return new Inactive(Inactive.Type.TODO, cause);
- }
-
- private static Inactive postponed(String cause)
- {
- return new Inactive(Inactive.Type.POSTPONED, cause);
- }
-
- private static Inactive specUntestable(String cause)
- {
- return new Untestable(Untestable.Kind.SPEC, cause);
- }
-
- private static Inactive jbossUntestable(String cause)
- {
- return new Untestable(Untestable.Kind.JBOSS, cause);
- }
-
- private static Duplicate duplicate(TCKAssertion target, String description)
- {
- return new Duplicate(target, description);
- }
- }
-
- public static class Active extends Status
- {
-
- }
-
- public static class Inactive extends Status
- {
-
- /** . */
- private final Type type;
-
- /** . */
- private final String msg;
-
- public enum Type
- {
- POSTPONED, TODO, DISABLED, UNTESTABLE
- }
-
- public Inactive(Type type, String msg)
- {
- this.type = type;
- this.msg = msg;
- }
-
- public Type getType()
- {
- return type;
- }
-
- public String getMessage()
- {
- return msg;
- }
- }
-
- public static class Untestable extends Inactive
- {
-
- public enum Kind
- {
- JBOSS, SPEC
- }
-
- /** . */
- private final Kind kind;
-
- public Untestable(Kind kind, String msg)
- {
- super(Inactive.Type.UNTESTABLE, msg);
-
- //
- this.kind = kind;
- }
-
- public Kind getKind()
- {
- return kind;
- }
- }
-
- public static class Duplicate extends Active
- {
-
- /** . */
- private final TCKAssertion target;
-
- /** . */
- private final String description;
-
- private Duplicate(TCKAssertion target, String description)
- {
- this.target = target;
- this.description = description;
- }
-
- public TCKAssertion getTarget()
- {
- return target;
- }
-
- public String getDescription()
- {
- return description;
- }
- }
-
- /** . */
- private final int id;
-
- /** . */
- private final String description;
-
- /** . */
- private Status status;
-
- TCKAssertion(int id, String description)
- {
- this(id, description, new Active());
- }
-
- TCKAssertion(int id, String description, Status status)
- {
- this.id = id;
- this.description = description;
- this.status = status;
- }
-
- public int getId()
- {
- return id;
- }
-
- public String getDescription()
- {
- return description;
- }
-
- public Status getStatus()
- {
- return status;
- }
-}
Deleted: modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/annotations/TCK.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/annotations/TCK.java 2007-11-07 14:52:33 UTC (rev 8836)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/annotations/TCK.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -1,43 +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.unit.annotations;
-
-import org.jboss.portal.unit.TCKAssertion;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
-
-/**
- * Annotates a portlet test for documenting its purpose with respect to the Java Portlet TCK.
- *
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-(a)Retention(RetentionPolicy.RUNTIME)
-(a)Target(ElementType.TYPE)
-public @interface TCK
-{
- TCKAssertion[] value();
-}
Copied: modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/annotations/TestCase.java (from rev 8834, modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/annotations/TCK.java)
===================================================================
--- modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/annotations/TestCase.java (rev 0)
+++ modules/portlet/trunk/portlet/src/main/org/jboss/portal/unit/annotations/TestCase.java 2007-11-07 15:15:08 UTC (rev 8837)
@@ -0,0 +1,46 @@
+/******************************************************************************
+ * 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.unit.annotations;
+
+import org.jboss.portal.unit.Assertion;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+
+/**
+ * Annotates a portlet test for documenting its purpose..
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+(a)Retention(RetentionPolicy.RUNTIME)
+(a)Target(ElementType.TYPE)
+public @interface TestCase
+{
+ /**
+ * The different assertions covered by this test case.
+ */
+ Assertion[] value();
+}
18 years, 6 months