Author: bdaw
Date: 2008-01-14 04:41:39 -0500 (Mon, 14 Jan 2008)
New Revision: 9496
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/Assertion.java
Log:
Assertions for JSR286 PLT.6 and PLT.15
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-14
00:16:23 UTC (rev 9495)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/Assertion.java 2008-01-14
09:41:39 UTC (rev 9496)
@@ -66,7 +66,7 @@
" 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" +
+ " 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" +
@@ -173,7 +173,7 @@
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" +
+ " 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."),
@@ -360,7 +360,7 @@
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" +
+ " 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" +
@@ -429,6 +429,71 @@
//
******************************************************************************************************************
JSR168_1000(new TCK(1000), "todo ???"),
+ // PLT.6 Portlet Config
+ JSR286_26(new TCK(26), "PLT.6.2", "If the root resource bundle does not
contain the resources for these values and " +
+ "the values are defined inline, the portlet container must add the inline
values as resources of the root " +
+ "resource bundle."),
+ JSR286_27(new TCK(27), "PLT.6.2", "If the portlet definition does not
define a resource bundle and the information" +
+ " is defined inline in the deployment descriptor, the portlet container must
create a ResourceBundle and populate" +
+ " it, with the inline values, using the keys defined in the PLT.25.10 Resource
Bundles Section."),
+ JSR286_28(new TCK(28), "PLT.6.3", "The getDefaultNamespace method of
the PortletConfig interface returns the " +
+ "default namespace for events and public render parameters set in the portlet
deployment descriptor with " +
+ "the default-namespace element, or the XML default namespace
XMLConstants.NULL_NS_URI if no default namespace" +
+ " is provided in the portlet deployment descriptor."),
+ JSR286_29(new TCK(29), "PLT.6.4", "The getPublicRenderParameterNames
method of the PortletConfig interface returns" +
+ " the public render parameter names found in the portlet definition in the
deployment descriptor with the " +
+ "supported-public-render-parameter element or an empty enumeration if no
public render parameters are defined" +
+ " for the current portlet definition."),
+ JSR286_30(new TCK(30), "PLT.6.5", "The getPublishingEventQNames method
of the PortletConfig interface returns the" +
+ " publishing event QNames found in the portlet definition in the deployment
descriptor with the " +
+ "supported-publishing-event element or an empty enumeration if no publishing
events are defined for the " +
+ "current portlet definition."),
+ JSR286_31(new TCK(31), "PLT.6.5", "If the event was defined using the
name element instead of the qname element " +
+ "the defined default namespace must be added as namespace for the returned
QName."),
+ JSR286_32(new TCK(32), "PLT.6.6", "The getProcessingEventQNames method
of the PortletConfig interface returns " +
+ "the processing event QNames found in the portlet definition in the deployment
descriptor with the " +
+ "supported-processing-event element or an empty enumeration if no processing
events are defined for the current" +
+ " portlet definition."),
+ JSR286_33(new TCK(33), "PLT.6.6", "If the event was defined using the
name element instead of the qname element the" +
+ " defined default namespace must be added as namespace for the returned
Qname."),
+ JSR286_34(new TCK(34), "PLT.6.7", "The getSupportedLocales method of
the PortletConfig interface returns the " +
+ "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.15 Coordination between portlets
+ JSR286_133(new TCK(133), "PLT.15.2.2", "The event must always have a
name and may optionally have a value."),
+ JSR286_134(new TCK(134), "PLT.15.2.2", "If the event has a value it
must be based on the type defined in the " +
+ "deployment descriptor." ),
+ JSR286_135(new TCK(135), "PLT.15.2.3", "The portlet can publish events
via the StateAwareResponse.setEvent " +
+ "method."),
+ JSR286_136(new TCK(136), "PLT.15.2.3", "It is also valid to call
StateAwareResponse.setEvent multiple times " +
+ "in the current processAction or processEvent method." ),
+ JSR286_137(new TCK(137), "PLT.15.2.3", "If only the local part is
specified the namespace must be the default " +
+ "namespace defined in the portlet deployment descriptor with the default
namespace element."),
+ JSR286_138(new TCK(138), "PLT.15.2.3", "If no such element is provided
in the portlet deployment descriptor the " +
+ "XML default namespace javax.xml.XMLConstants.NULL_NS_URI must be
assumed."),
+ JSR286_139(new TCK(139), "PLT.15.2.3", "Otherwise the setEvent method
on the StateAwareResponse must throw a " +
+ "java.lang.IllegalArgumentException. Otherwise the setEvent method on the
StateAwareResponse must throw a " +
+ "java.lang.IllegalArgumentException."),
+ JSR286_140(new TCK(140), "PLT.15.2.4.1", "The event definition must
contain an event name."),
+ JSR286_141(new TCK(141), "PLT.15.2.4.1", "The portlet container must
use the event name entry in the portlet " +
+ "deployment descriptor as event name when submitting an event to the
portlet."),
+ JSR286_143(new TCK(142), "PLT.15.2.4", "The portlet can send events
which are not declared in the portlet " +
+ "deployment descriptor at runtime using the setEvent method on either the
ActionResponse or EventResponse."),
+ JSR286_144(new TCK(143), "PLT.15.2.5", "Events are valid only in the
current client request and the portlet " +
+ "container must therefore deliver all events within the current client
request."),
+ JSR286_145(new TCK(144), "PLT.15.2.5", "Event distribution must be
serialized for a specific portlet window per " +
+ "client request so that at any given time a portlet window is only processing
one event in the processEvent " +
+ "method for the current client request."),
+ JSR286_146(new TCK(145), "PLT.15.2.5", "Portlet event processing may
occur after the processing of the action, " +
+ "if the portlet was target of an action URL, and must be finished before the
render phase."),
+ JSR286_147(new TCK(146), "PLT.15.2.6", "If a portlet throws an
exception in the processEvent method, all operations" +
+ " on the EventResponse must be ignored."),
+ JSR286_148(new TCK(147), "PLT.15.2.6", "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.")
+
;
/**
@@ -598,6 +663,9 @@
private final String description;
/** . */
+ private final String section;
+
+ /** . */
private Status status;
Assertion(Ref ref, String description)
@@ -605,13 +673,29 @@
this(ref, description, new Active());
}
+ Assertion(Ref ref, String section, String description)
+ {
+ this(ref, description, section, new Active());
+ }
+
Assertion(Ref ref, String description, Status status)
{
this.ref = ref;
this.description = description;
+ this.section = null;
this.status = status;
}
+ Assertion(Ref ref, String section, String description, Status status)
+ {
+ this.ref = ref;
+ this.description = description;
+ this.section = section;
+ this.status = status;
+ }
+
+
+
public Ref getRef()
{
return ref;
@@ -626,4 +710,9 @@
{
return status;
}
+
+ public String getSection()
+ {
+ return section;
+ }
}