Author: bdaw
Date: 2008-01-22 09:10:48 -0500 (Tue, 22 Jan 2008)
New Revision: 9553
Modified:
modules/portlet/trunk/portlet/pom.xml
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/Assertion.java
Log:
JSR 286 PLT.11 assertions
Modified: modules/portlet/trunk/portlet/pom.xml
===================================================================
--- modules/portlet/trunk/portlet/pom.xml 2008-01-22 13:31:02 UTC (rev 9552)
+++ modules/portlet/trunk/portlet/pom.xml 2008-01-22 14:10:48 UTC (rev 9553)
@@ -82,6 +82,13 @@
</execution>
</executions>
<configuration>
+
+ <!--Uncomment if needed-->
+ <!--<jpda>false</jpda>-->
+ <!--<jpdaPort>9000</jpdaPort>-->
+ <!--<jpdaSuspend>true</jpdaSuspend>-->
+ <!--<failOnError>false</failOnError>-->
+ <!--<assertions>true</assertions>-->
<testsuites>
<testsuite>
<config>local-jboss-unit.xml</config>
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/Assertion.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/Assertion.java 2008-01-22
13:31:02 UTC (rev 9552)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/Assertion.java 2008-01-22
14:10:48 UTC (rev 9553)
@@ -460,6 +460,86 @@
"supported locales found in the portlet definition in the deployment
descriptor with the supported-locale " +
"element or an empty enumeration if no supported locales are defined for the
current portlet definition."),
+ // PLT.11
+
+ JSR_286_67(new TCK(67), "If a portlet receives a request from a client request
targeted to the portlet itself, the" +
+ " parameters must be the string parameters encoded in the URL (added when
creating the PortletURL) and the " +
+ "string parameters sent by the client to the portlet as part of the client
request."),
+ JSR_286_68(new TCK(68), "The parameters the request object returns must be
\"x-www-formurlencoded\" decoded."),
+ JSR_286_69(new TCK(69), "The value returned from the getParameter method must be
the first value in the array " +
+ "of String objects returned by getParameterValues"),
+ JSR_286_70(new TCK(70), "If there is a single parameter value associated with a
parameter name the method must" +
+ " return is an array of size one containing the parameter value."),
+ JSR_286_71(new TCK(71), "The getParameterMap method must return an unmodifiable
Map object."),
+ JSR_286_72(new TCK(72), "If the request does not have any parameters, the
getParameterMap must return an empty" +
+ " Map object"),
+ JSR_286_73(new TCK(73), "Parameters set on the portlet URL and the post body are
aggregated into the request " +
+ "parameter set. Portlet URL parameters are presented before post body
data."),
+ JSR_286_74(new TCK(74), "The portlet-container must not propagate parameters
received in an action or event " +
+ "request to subsequent render requests of the portlet."),
+ JSR_286_75(new TCK(75), "The portlet-container must not propagate parameters
received in an action to subsequent " +
+ "event requests of the portlet."),
+ JSR_286_76(new TCK(76), "The set render parameters must be provided to the
processEvent and render calls of at " +
+ "least the current client request."),
+ JSR_286_77(new TCK(77), "If a portlet receives a render request following an
action or event request as part of " +
+ "the same client request, the parameters received with render request must be
the render parameters set during " +
+ "the action or event request."),
+ JSR_286_78(new TCK(78), "If a portlet receives a render request that is the
result of invoking a render URL " +
+ "targeting this portlet the render parameters received with the render request
must be the parameters set on " +
+ "the render URL if these were not changed by the portlet as a result of an
container event received for this " +
+ "render URL."),
+ JSR_286_79(new TCK(79), "Commonly, portals provide controls to change the portlet
mode and the window state of " +
+ "portlets. The URLs these controls use are generated by the portal. Client
requests triggered by those URLs " +
+ "must be treated as render URLs and the existing render parameters must be
preserved."),
+ JSR_286_80(new TCK(80), "A portlet must not see any parameter targeted to other
portlets."),
+ JSR_286_81(new TCK(81), "The supportedpublic-render-parameter element must
reference the identifier of a public " +
+ "render parameter defined in the portlet application section in a
public-render-parameter element"),
+ JSR_286_82(new TCK(82), "The portlet container must only send those public render
parameters to a portlet which " +
+ "the portlet has defined support for using supported-public-render-parameter
element in the portlet.xml."),
+ JSR_286_83(new TCK(83), "The portlet container must only share those render
parameters of a portlet which the " +
+ "portlet has declared as supported public render parameters using
supported-public-render-parameter element in " +
+ "the portlet.xml"),
+ JSR_286_84(new TCK(84), "If the portlet was the target of a render URL and this
render URL has set a specific " +
+ "public render parameter the portlet must receive at least this render
parameter"),
+ JSR_286_85(new TCK(85), "If a action or resource parameter has the same name as a
public render parameter the " +
+ "public render parameter values must be the last entries in the parameter
value array."),
+ JSR_286_86(new TCK(86), "Portlets can access a merged set of public and private
parameters via the getParameter " +
+ "methods on the PortletRequest or separated as maps of private parameters via
the getPrivateParameterMap method " +
+ "and public parameters via the getPublicParameterMap method."),
+ JSR_286_87(new TCK(87), "Extra parameters used by the portal/portlet-container
must be invisible to the portlets " +
+ "receiving the request.."),
+ JSR_286_88(new TCK(88), "The portlet can access a map with user information
attributes via the request attribute " +
+ "PortletRequest.USER_INFO."),
+ JSR_286_89(new TCK(89), "The PortletRequest.CCPP_PROFILE request attribute must
return a javax.ccpp.Profile based " +
+ "on the current portlet request."),
+ JSR_286_90(new TCK(90), "The LIFECYCLE_PHASE request attribute of the
PortletRequest interface allows a portlet to " +
+ "determine the current lifecycle phase of this request. This attribute value
must be ACTION_PHASE if the " +
+ "current request is of type ActionRequest, EVENT_PHASE if the current request
is of type EventRequest, " +
+ "RENDER_PHASE if the current request is of type RenderRequest, and
RESOURCE_SERVING_PHASE if the current " +
+ "request is of type ResourceRequest."),
+ JSR_286_91(new TCK(91), "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."),
+ JSR_286_92(new TCK(92), "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."),
+ JSR_286_93(new TCK(93), "If the user is not authenticated the getAuthType method
must return null. "),
+ JSR_286_94(new TCK(94), "The first element of the enumeration must be the same
content type returned by the " +
+ "getResponseContentType method."),
+ JSR_286_95(new TCK(95), "If the getResponseContentType or getResponseContentTypes
methods are exposed via an " +
+ "ActionRequest, EventRequest, or RenderRequest the following additional
restrictions apply: The content " +
+ "type must only includes the MIME type, not the character set."),
+ JSR_286_96(new TCK(96), "If the getResponseContentType or getResponseContentTypes
methods are exposed via an " +
+ "ActionRequest, EventRequest, or RenderRequest the following additional
restrictions apply: " +
+ "The getResponseContentTypes method must return only the content types
supported by the current portlet mode " +
+ "of the portlet."),
+ JSR_286_97(new TCK(97), "The portlet window ID retrieved with the getWindowID
method must be the same as the one " +
+ "that is used by the portlet container for scoping the portlet-scope session
attributes."),
+ JSR_286_98(new TCK(98), "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."),
+ JSR_286_99(new TCK(99), "If the user request HTTP POST data is of type
application/x-www-form-urlencoded, this " +
+ "data has been already processed by the portal/portlet-container and is
available as request parameters. The " +
+ "getPortletInputStream and getReader methods must throw an
IllegalStateException if called."),
+
// PLT.12 Portlet Responses
JSR286_103(new TCK(103), "Using the setRenderParameter and setRenderParameters
methods portlets may set " +