Author: bdaw
Date: 2008-03-22 11:09:03 -0400 (Sat, 22 Mar 2008)
New Revision: 10364
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/reports/ResultProducingListener.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/TestCaseAnnotationProcessor.java
Log:
- API tests report
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-03-22
01:46:36 UTC (rev 10363)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/Assertion.java 2008-03-22
15:09:03 UTC (rev 10364)
@@ -1428,7 +1428,7 @@
//
******************************************************************************************************************
- API286_ACTION_REQUEST_1(new API(ActionRequest.class), Status.disabled("no
methods"), "none"),
+ API286_ACTION_REQUEST_1(new API(ActionRequest.class), "ACTION_NAME"),
API286_ACTION_RESPONSE_1(new API(ActionResponse.class), "sendRedirect()"),
@@ -1441,20 +1441,60 @@
API286_BASE_URL_7(new API(BaseURL.class), "setProperty()"),
API286_BASE_URL_8(new API(BaseURL.class), "setParameters()"),
- API286_CACHE_CONTROL(new API(CacheControl.class), ""),
+ API286_CACHE_CONTROL_1(new API(CacheControl.class), "getETag()"),
+ API286_CACHE_CONTROL_2(new API(CacheControl.class),
"getExpiriationTime()"),
+ API286_CACHE_CONTROL_3(new API(CacheControl.class), "isPublicScope()"),
+ API286_CACHE_CONTROL_4(new API(CacheControl.class), "setETag()"),
+ API286_CACHE_CONTROL_5(new API(CacheControl.class),
"setExpiriationTime()"),
+ API286_CACHE_CONTROL_6(new API(CacheControl.class), "setPublicScope()"),
+ API286_CACHE_CONTROL_7(new API(CacheControl.class),
"setUseCachedContent()"),
+ API286_CACHE_CONTROL_8(new API(CacheControl.class), "useCachedContent()"),
+
+ API286_CLIENT_DATA_REQUEST_1(new API(ClientDataRequest.class),
"getCharacterEncoding()"),
+ API286_CLIENT_DATA_REQUEST_2(new API(ClientDataRequest.class),
"getContentLength()"),
+ API286_CLIENT_DATA_REQUEST_3(new API(ClientDataRequest.class),
"getContentType()"),
+ API286_CLIENT_DATA_REQUEST_4(new API(ClientDataRequest.class),
"getMethod()"),
+ API286_CLIENT_DATA_REQUEST_5(new API(ClientDataRequest.class),
"getPortletInputStream()"),
+ API286_CLIENT_DATA_REQUEST_6(new API(ClientDataRequest.class),
"getReader()"),
+ API286_CLIENT_DATA_REQUEST_7(new API(ClientDataRequest.class),
"setCharacterEncoding()"),
+
+ API286_EVENT_1(new API(Event.class), "getName()"),
+ API286_EVENT_2(new API(Event.class), "getQName()"),
+ API286_EVENT_3(new API(Event.class), "getValue()"),
- API286_CLIENT_DATA_REQUEST(new API(ClientDataRequest.class), ""),
+ API286_EVENT_PORTLET_1(new API(EventPortlet.class), "processEvent()"),
- API286_EVENT(new API(Event.class), ""),
+ API286_EVENT_REQUEST_1(new API(EventRequest.class), "getEvent()"),
+ API286_EVENT_REQUEST_2(new API(EventRequest.class), "getMethod()"),
- API286_EVENT_PORTLET(new API(EventPortlet.class), ""),
+ API286_EVENT_RESPONSE_1(new API(EventResponse.class),
"setRenderParameters()"),
- API286_EVENT_REQUEST(new API(EventRequest.class), ""),
+ API286_GENERIC_PORTLET_1(new API(GenericPortlet.class), "destroy()"),
+ API286_GENERIC_PORTLET_2(new API(GenericPortlet.class), "doDispatch()"),
+ API286_GENERIC_PORTLET_3(new API(GenericPortlet.class), "doEdit()"),
+ API286_GENERIC_PORTLET_4(new API(GenericPortlet.class), "doHeaders()"),
+ API286_GENERIC_PORTLET_5(new API(GenericPortlet.class), "doHelp()"),
+ API286_GENERIC_PORTLET_6(new API(GenericPortlet.class), "doView()"),
+ API286_GENERIC_PORTLET_7(new API(GenericPortlet.class),
"getContainerRuntimeOptions()"),
+ API286_GENERIC_PORTLET_8(new API(GenericPortlet.class),
"getDefaultNamespace()"),
+ API286_GENERIC_PORTLET_9(new API(GenericPortlet.class),
"getInitParameter()"),
+ API286_GENERIC_PORTLET_10(new API(GenericPortlet.class),
"getInitParameterNames()"),
+ API286_GENERIC_PORTLET_11(new API(GenericPortlet.class),
"getNextPossiblePortletModes()"),
+ API286_GENERIC_PORTLET_12(new API(GenericPortlet.class),
"getPortletConfig()"),
+ API286_GENERIC_PORTLET_13(new API(GenericPortlet.class),
"getPortletContext()"),
+ API286_GENERIC_PORTLET_14(new API(GenericPortlet.class),
"getPortletName()"),
+ API286_GENERIC_PORTLET_15(new API(GenericPortlet.class),
"getProcessingEventQNames()"),
+ API286_GENERIC_PORTLET_16(new API(GenericPortlet.class),
"getPublicRenderParameterNames()"),
+ API286_GENERIC_PORTLET_17(new API(GenericPortlet.class),
"getPublishingEventQNames()"),
+ API286_GENERIC_PORTLET_18(new API(GenericPortlet.class),
"getResourceBundle()"),
+ API286_GENERIC_PORTLET_19(new API(GenericPortlet.class),
"getSupportedLocales()"),
+ API286_GENERIC_PORTLET_20(new API(GenericPortlet.class), "getTitle()"),
+ API286_GENERIC_PORTLET_21(new API(GenericPortlet.class), "init()"),
+ API286_GENERIC_PORTLET_22(new API(GenericPortlet.class),
"processAction()"),
+ API286_GENERIC_PORTLET_23(new API(GenericPortlet.class), "processEvent()"),
+ API286_GENERIC_PORTLET_24(new API(GenericPortlet.class), "render()"),
+ API286_GENERIC_PORTLET_25(new API(GenericPortlet.class),
"serveResource()"),
- API286_EVENT_RESPONSE(new API(EventResponse.class), ""),
-
- API286_GENERIC_PORTLET(new API(GenericPortlet.class), ""),
-
API286_MIME_RESPONSE_1(new API(MimeResponse.class), "CACHE_SCOPE"),
API286_MIME_RESPONSE_2(new API(MimeResponse.class), "ETAG"),
API286_MIME_RESPONSE_3(new API(MimeResponse.class), "EXPIRIATION_CACHE"),
@@ -1506,7 +1546,10 @@
API286_PORTLET_CONTEXT_17(new API(PortalContext.class),
"removeAttribute()"),
API286_PORTLET_CONTEXT_18(new API(PortalContext.class), "setAttribute()"),
- API286_PORTLET(new API(Portlet.class), ""),
+ API286_PORTLET_1(new API(Portlet.class), "destroy()"),
+ API286_PORTLET_2(new API(Portlet.class), "init()"),
+ API286_PORTLET_3(new API(Portlet.class), "processAction()"),
+ API286_PORTLET_4(new API(Portlet.class), "render()"),
API286_PORTLET_CONFIG_1(new API(PortletConfig.class),
"getContainerRuntimeOptions()"),
API286_PORTLET_CONFIG_2(new API(PortletConfig.class),
"getDefaultNamespace()"),
@@ -1520,8 +1563,6 @@
API286_PORTLET_CONFIG_10(new API(PortletConfig.class),
"getResourceBundle()"),
API286_PORTLET_CONFIG_11(new API(PortletConfig.class),
"getSupportedLocales()"),
- API286_PORTLET_EXCEPTION(new API(PortletException.class), ""),
-
API286_PORTLET_MODE_1(new API(PortletMode.class), "EDIT"),
API286_PORTLET_MODE_2(new API(PortletMode.class), "HELP"),
API286_PORTLET_MODE_3(new API(PortletMode.class), "VIEW"),
@@ -1530,8 +1571,6 @@
API286_PORTLET_MODE_6(new API(PortletMode.class), "toString()"),
API286_PORTLET_MODE_7(new API(PortletMode.class), "PortletMode()"),
- API286_PORTLET_MODE_EXCEPTION(new API(PortletModeException.class), ""),
-
API286_PORTLET_PREFERENCES_1(new API(PortletPreferences.class),
"getMap()"),
API286_PORTLET_PREFERENCES_2(new API(PortletPreferences.class),
"getNames()"),
API286_PORTLET_PREFERENCES_3(new API(PortletPreferences.class),
"getValue()"),
@@ -1595,16 +1634,15 @@
API286_PORTLET_REQUEST_51(new API(PortletRequest.class),
"removeAttribute()"),
API286_PORTLET_REQUEST_52(new API(PortletRequest.class), "setAttribute"),
- API286_PORTLET_REQUEST_DISPATCHER(new API(PortletRequestDispatcher.class),
""),
-
+ API286_PORTLET_REQUEST_DISPATCHER_1(new API(PortletRequestDispatcher.class),
"forward()"),
+ API286_PORTLET_REQUEST_DISPATCHER_2(new API(PortletRequestDispatcher.class),
"include()"),
+
API286_PORTLET_RESPONSE_1(new API(PortletResponse.class), "addProperty()"),
API286_PORTLET_RESPONSE_2(new API(PortletResponse.class),
"createElement()"),
API286_PORTLET_RESPONSE_3(new API(PortletResponse.class), "encodeURL()"),
API286_PORTLET_RESPONSE_4(new API(PortletResponse.class),
"getNamespace()"),
API286_PORTLET_RESPONSE_5(new API(PortletResponse.class), "setProperty()"),
- API286_PORTLET_SECURITY_EXCEPTION(new API(PortletSecurityException.class),
""),
-
API286_PORTLET_SESSION_1(new API(PortletSession.class),
"APPLICATION_SCOPE"),
API286_PORTLET_SESSION_2(new API(PortletSession.class), "PORTLET_SCOPE"),
API286_PORTLET_SESSION_3(new API(PortletSession.class), "getAttribute()"),
@@ -1624,19 +1662,27 @@
API286_PORTLET_SESSION_UTIL_1(new API(PortletSessionUtil.class),
"decodeAttributeName()"),
API286_PORTLET_SESSION_UTIL_2(new API(PortletSessionUtil.class),
"decodeScope()"),
- API286_PORTLET_URL(new API(PortletURL.class), ""),
+ API286_PORTLET_URL_1(new API(PortletURL.class), "getPortletMode()"),
+ API286_PORTLET_URL_2(new API(PortletURL.class), "getWindowState()"),
+ API286_PORTLET_URL_3(new API(PortletURL.class),
"removePublicRenderParameter()"),
+ API286_PORTLET_URL_4(new API(PortletURL.class), "setPortletMode()"),
+ API286_PORTLET_URL_5(new API(PortletURL.class), "setWindowState()"),
- API286_PORTLET_URL_GENERATION_LISTENER(new API(PortletURLGenerationListener.class),
""),
+ API286_PORTLET_URL_GENERATION_LISTENER_1(new API(PortletURLGenerationListener.class),
"filterActionURL()"),
+ API286_PORTLET_URL_GENERATION_LISTENER_2(new API(PortletURLGenerationListener.class),
"filterRenderURL()"),
+ API286_PORTLET_URL_GENERATION_LISTENER_3(new API(PortletURLGenerationListener.class),
"filterResourceURL()"),
- API286_PREFERENCES_VALIDATOR(new API(PreferencesValidator.class), ""),
+ API286_PREFERENCES_VALIDATOR_1(new API(PreferencesValidator.class),
"validate()"),
- API286_PROCESS_ACTION(new API(ProcessAction.class), ""),
+ API286_PROCESS_ACTION_1(new API(ProcessAction.class), "name"),
- API286_PROCESS_EVENT(new API(ProcessEvent.class), ""),
+ API286_PROCESS_EVENT_1(new API(ProcessEvent.class), "name"),
+ API286_PROCESS_EVENT_2(new API(ProcessEvent.class), "qname"),
- API286_P3P_USER_INFOS(new API(PortletRequest.P3PUserInfos.class), ""),
+ //TODO:
+ //API286_P3P_USER_INFOS(new API(PortletRequest.P3PUserInfos.class), ""),
- API286_RENDER_MODE(new API(RenderMode.class), ""),
+ API286_RENDER_MODE_1(new API(RenderMode.class), "name"),
API286_RENDER_REQUEST_1(new API(RenderRequest.class), "ETAG"),
@@ -1644,13 +1690,26 @@
API286_RENDER_RESPONSE_2(new API(RenderResponse.class),
"setNextPossiblePortletModes()"),
API286_RENDER_RESPONSE_3(new API(RenderResponse.class), "setTitle()"),
- API286_RESOURCE_REQUEST(new API(ResourceRequest.class), ""),
+ API286_RESOURCE_REQUEST_1(new API(ResourceRequest.class),
"getCacheability()"),
+ API286_RESOURCE_REQUEST_2(new API(ResourceRequest.class), "getETag()"),
+ API286_RESOURCE_REQUEST_3(new API(ResourceRequest.class),
"getPrivateRenderParameterMap()"),
+ API286_RESOURCE_REQUEST_4(new API(ResourceRequest.class),
"getResourceID()"),
+ API286_RESOURCE_REQUEST_5(new API(ResourceRequest.class),
"getResponseContentType()"),
+ API286_RESOURCE_REQUEST_6(new API(ResourceRequest.class),
"getResponseContentTypes()"),
- API286_RESOURCE_RESPONSE(new API(ResourceResponse.class), ""),
+ API286_RESOURCE_RESPONSE_1(new API(ResourceResponse.class),
"setContentType()"),
+ API286_RESOURCE_RESPONSE_2(new API(ResourceResponse.class),
"setNExtPossiblePortletModes()"),
+ API286_RESOURCE_RESPONSE_3(new API(ResourceResponse.class), "setTitle()"),
- API286_RESOURCE_SERVING_PORTLET(new API(ResourceServingPortlet.class), ""),
+ API286_RESOURCE_SERVING_PORTLET_1(new API(ResourceServingPortlet.class),
"serveResource()"),
- API286_RESOURCE_URL(new API(ResourceURL.class), ""),
+ API286_RESOURCE_URL_1(new API(ResourceURL.class), "FULL"),
+ API286_RESOURCE_URL_2(new API(ResourceURL.class), "PAGE"),
+ API286_RESOURCE_URL_3(new API(ResourceURL.class), "PORTLET"),
+ API286_RESOURCE_URL_4(new API(ResourceURL.class), "SHARED"),
+ API286_RESOURCE_URL_5(new API(ResourceURL.class), "getCacheability()"),
+ API286_RESOURCE_URL_6(new API(ResourceURL.class), "setCacheability()"),
+ API286_RESOURCE_URL_7(new API(ResourceURL.class), "setResourceID()"),
API286_STATE_AWARE_RESPONSE_1(new API(StateAwareResponse.class),
"getPortletMode()"),
API286_STATE_AWARE_RESPONSE_2(new API(StateAwareResponse.class),
"getRenderParameterMap()"),
@@ -1673,36 +1732,123 @@
// Portlet Filter
- API286_ACTION_FILTER(new API(ActionFilter.class), ""),
+ API286_ACTION_FILTER_1(new API(ActionFilter.class), "doFilter()"),
- API286_ACTION_REQUEST_WRAPPER(new API(ActionRequestWrapper.class), ""),
+ //API286_ACTION_REQUEST_WRAPPER(new API(ActionRequestWrapper.class), ""),
- API286_ACTION_RESPONSE_WRAPPER(new API(ActionResponseWrapper.class), ""),
+ API286_ACTION_RESPONSE_WRAPPER_1(new API(ActionResponseWrapper.class),
"getPortletMode()"),
+ API286_ACTION_RESPONSE_WRAPPER_2(new API(ActionResponseWrapper.class),
"getRenderParameterMap()"),
+ API286_ACTION_RESPONSE_WRAPPER_3(new API(ActionResponseWrapper.class),
"getResponse()"),
+ API286_ACTION_RESPONSE_WRAPPER_4(new API(ActionResponseWrapper.class),
"getWindowState()"),
+ API286_ACTION_RESPONSE_WRAPPER_5(new API(ActionResponseWrapper.class),
"removePublicRenderParameter()"),
+ API286_ACTION_RESPONSE_WRAPPER_6(new API(ActionResponseWrapper.class),
"sendRedirect()"),
+ API286_ACTION_RESPONSE_WRAPPER_7(new API(ActionResponseWrapper.class),
"setEvent()"),
+ API286_ACTION_RESPONSE_WRAPPER_8(new API(ActionResponseWrapper.class),
"setPortletMode()"),
+ API286_ACTION_RESPONSE_WRAPPER_9(new API(ActionResponseWrapper.class),
"setRenderParameter()"),
+ API286_ACTION_RESPONSE_WRAPPER_10(new API(ActionResponseWrapper.class),
"setRenderParameters()"),
+ API286_ACTION_RESPONSE_WRAPPER_11(new API(ActionResponseWrapper.class),
"setResponse()"),
+ API286_ACTION_RESPONSE_WRAPPER_12(new API(ActionResponseWrapper.class),
"setWindowState()"),
- API286_EVENT_FILTER(new API(EventFilter.class), ""),
+ API286_EVENT_FILTER_1(new API(EventFilter.class), "doFilter()"),
- API286_EVENT_REQUEST_WRAPPER(new API(EventRequestWrapper.class), ""),
+ API286_EVENT_REQUEST_WRAPPER_1(new API(EventRequestWrapper.class),
"getEvent()"),
+ API286_EVENT_REQUEST_WRAPPER_2(new API(EventRequestWrapper.class),
"getMethod()"),
+ API286_EVENT_REQUEST_WRAPPER_3(new API(EventRequestWrapper.class),
"getRequest()"),
+ API286_EVENT_REQUEST_WRAPPER_4(new API(EventRequestWrapper.class),
"setRequest()"),
- API286_EVENT_RESPONSE_WRAPPER(new API(EventResponseWrapper.class), ""),
+ API286_EVENT_RESPONSE_WRAPPER_1(new API(EventResponseWrapper.class),
"getPortletMode()"),
+ API286_EVENT_RESPONSE_WRAPPER_2(new API(EventResponseWrapper.class),
"getRenderParameterMap()"),
+ API286_EVENT_RESPONSE_WRAPPER_3(new API(EventResponseWrapper.class),
"getResponse()"),
+ API286_EVENT_RESPONSE_WRAPPER_4(new API(EventResponseWrapper.class),
"getWindowState()"),
+ API286_EVENT_RESPONSE_WRAPPER_5(new API(EventResponseWrapper.class),
"removePublicRenderParameter()"),
+ API286_EVENT_RESPONSE_WRAPPER_6(new API(EventResponseWrapper.class),
"sendRedirect()"),
+ API286_EVENT_RESPONSE_WRAPPER_7(new API(EventResponseWrapper.class),
"setEvent()"),
+ API286_EVENT_RESPONSE_WRAPPER_8(new API(EventResponseWrapper.class),
"setPortletMode()"),
+ API286_EVENT_RESPONSE_WRAPPER_9(new API(EventResponseWrapper.class),
"setRenderParameter()"),
+ API286_EVENT_RESPONSE_WRAPPER_10(new API(EventResponseWrapper.class),
"setRenderParameters()"),
+ API286_EVENT_RESPONSE_WRAPPER_11(new API(EventResponseWrapper.class),
"setResponse()"),
+ API286_EVENT_RESPONSE_WRAPPER_12(new API(EventResponseWrapper.class),
"setWindowState()"),
- API286_FILTER_CHAIN(new API(FilterChain.class), ""),
+ API286_FILTER_CHAIN_1(new API(FilterChain.class), "doFilter()"),
- API286_FILTER_CONFIG(new API(FilterConfig.class), ""),
+ API286_FILTER_CONFIG_1(new API(FilterConfig.class), "getFilterName()"),
+ API286_FILTER_CONFIG_2(new API(FilterConfig.class), "getInitParameter()"),
+ API286_FILTER_CONFIG_3(new API(FilterConfig.class),
"getInitParameterNames()"),
+ API286_FILTER_CONFIG_4(new API(FilterConfig.class), "getPortletContext()"),
- API286_PORTLET_FILTER(new API(PortletFilter.class), ""),
+ API286_PORTLET_FILTER_1(new API(PortletFilter.class), "destroy()"),
+ API286_PORTLET_FILTER_2(new API(PortletFilter.class), "init()"),
- API286_RENDER_REQUEST_WRAPPER(new API(RenderRequestWrapper.class), ""),
+ API286_RENDER_REQUEST_WRAPPER_1(new API(RenderRequestWrapper.class),
"getETag()"),
+ API286_RENDER_REQUEST_WRAPPER_2(new API(RenderRequestWrapper.class),
"getRequest()"),
+ API286_RENDER_REQUEST_WRAPPER_3(new API(RenderRequestWrapper.class),
"setRequest()"),
- API286_RENDER_RESPONSE_WRAPPER(new API(RenderResponseWrapper.class), ""),
+ API286_RENDER_RESPONSE_WRAPPER_1(new API(RenderResponseWrapper.class),
"createActionURL()"),
+ API286_RENDER_RESPONSE_WRAPPER_2(new API(RenderResponseWrapper.class),
"createRenderURL()"),
+ API286_RENDER_RESPONSE_WRAPPER_3(new API(RenderResponseWrapper.class),
"createResourceURL()"),
+ API286_RENDER_RESPONSE_WRAPPER_4(new API(RenderResponseWrapper.class),
"flushBuffer()"),
+ API286_RENDER_RESPONSE_WRAPPER_5(new API(RenderResponseWrapper.class),
"getBufferSize()"),
+ API286_RENDER_RESPONSE_WRAPPER_6(new API(RenderResponseWrapper.class),
"getCacheControl()"),
+ API286_RENDER_RESPONSE_WRAPPER_7(new API(RenderResponseWrapper.class),
"getCharacterEncoding()"),
+ API286_RENDER_RESPONSE_WRAPPER_8(new API(RenderResponseWrapper.class),
"getContentType()"),
+ API286_RENDER_RESPONSE_WRAPPER_9(new API(RenderResponseWrapper.class),
"getLocale()"),
+ API286_RENDER_RESPONSE_WRAPPER_10(new API(RenderResponseWrapper.class),
"getPortletOutputStream()"),
+ API286_RENDER_RESPONSE_WRAPPER_11(new API(RenderResponseWrapper.class),
"getResponse()"),
+ API286_RENDER_RESPONSE_WRAPPER_12(new API(RenderResponseWrapper.class),
"getWriter()"),
+ API286_RENDER_RESPONSE_WRAPPER_13(new API(RenderResponseWrapper.class),
"isCommited()"),
+ API286_RENDER_RESPONSE_WRAPPER_14(new API(RenderResponseWrapper.class),
"reset()"),
+ API286_RENDER_RESPONSE_WRAPPER_15(new API(RenderResponseWrapper.class),
"resetBuffer()"),
+ API286_RENDER_RESPONSE_WRAPPER_16(new API(RenderResponseWrapper.class),
"setBufferSize()"),
+ API286_RENDER_RESPONSE_WRAPPER_17(new API(RenderResponseWrapper.class),
"setContentType()"),
+ API286_RENDER_RESPONSE_WRAPPER_18(new API(RenderResponseWrapper.class),
"setNextPossiblePortletModes()"),
+ API286_RENDER_RESPONSE_WRAPPER_19(new API(RenderResponseWrapper.class),
"setResponse()"),
+ API286_RENDER_RESPONSE_WRAPPER_20(new API(RenderResponseWrapper.class),
"setTitle()"),
- API286_RESOURCE_FILTER(new API(ResourceFilter.class), ""),
+ API286_RESOURCE_FILTER_1(new API(ResourceFilter.class), "doFilter()"),
- API286_RESOURCE_REQUEST_WRAPPER(new API(ResourceRequestWrapper.class), ""),
+ API286_RESOURCE_REQUEST_WRAPPER_1(new API(ResourceRequestWrapper.class),
"getCacheability()"),
+ API286_RESOURCE_REQUEST_WRAPPER_2(new API(ResourceRequestWrapper.class),
"getCharacterEncoding()"),
+ API286_RESOURCE_REQUEST_WRAPPER_3(new API(ResourceRequestWrapper.class),
"getContentLength()"),
+ API286_RESOURCE_REQUEST_WRAPPER_4(new API(ResourceRequestWrapper.class),
"getContentType()"),
+ API286_RESOURCE_REQUEST_WRAPPER_5(new API(ResourceRequestWrapper.class),
"getETag()"),
+ API286_RESOURCE_REQUEST_WRAPPER_6(new API(ResourceRequestWrapper.class),
"getMethod()"),
+ API286_RESOURCE_REQUEST_WRAPPER_7(new API(ResourceRequestWrapper.class),
"getPortletInputStream()"),
+ API286_RESOURCE_REQUEST_WRAPPER_8(new API(ResourceRequestWrapper.class),
"getPrivateRenderParameterMap()"),
+ API286_RESOURCE_REQUEST_WRAPPER_9(new API(ResourceRequestWrapper.class),
"getReader()"),
+ API286_RESOURCE_REQUEST_WRAPPER_10(new API(ResourceRequestWrapper.class),
"getRequest()"),
+ API286_RESOURCE_REQUEST_WRAPPER_11(new API(ResourceRequestWrapper.class),
"getResourceID()"),
+ API286_RESOURCE_REQUEST_WRAPPER_12(new API(ResourceRequestWrapper.class),
"setCharacterEncoding()"),
+ API286_RESOURCE_REQUEST_WRAPPER_13(new API(ResourceRequestWrapper.class),
"setRequest()"),
- API286_RESOURCE_RESPONSE_WRAPPER(new API(ResourceResponseWrapper.class),
""),
+ API286_RESOURCE_RESPONSE_WRAPPER_1(new API(ResourceResponseWrapper.class),
"createActionURL()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_2(new API(ResourceResponseWrapper.class),
"createRenderURL()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_3(new API(ResourceResponseWrapper.class),
"createResourceURL()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_4(new API(ResourceResponseWrapper.class),
"flushBuffer()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_5(new API(ResourceResponseWrapper.class),
"getBufferSize()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_6(new API(ResourceResponseWrapper.class),
"getCacheControl()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_7(new API(ResourceResponseWrapper.class),
"getCharacterEncoding()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_8(new API(ResourceResponseWrapper.class),
"getContentType()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_9(new API(ResourceResponseWrapper.class),
"getLocale()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_10(new API(ResourceResponseWrapper.class),
"getPortletOutputStream()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_11(new API(ResourceResponseWrapper.class),
"getResponse()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_12(new API(ResourceResponseWrapper.class),
"getWriter()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_13(new API(ResourceResponseWrapper.class),
"isCommited()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_14(new API(ResourceResponseWrapper.class),
"reset()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_15(new API(ResourceResponseWrapper.class),
"resetBuffer()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_16(new API(ResourceResponseWrapper.class),
"setBufferSize()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_17(new API(ResourceResponseWrapper.class),
"setCharacterEncoding()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_18(new API(ResourceResponseWrapper.class),
"setContentLength()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_19(new API(ResourceResponseWrapper.class),
"setContentType()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_20(new API(ResourceResponseWrapper.class),
"setLocale()"),
+ API286_RESOURCE_RESPONSE_WRAPPER_21(new API(ResourceResponseWrapper.class),
"setResponse()"),
;
+ public String toString()
+ {
+ return this.name();
+ }
+
/**
* An abstract reference.
*/
@@ -1977,4 +2123,6 @@
{
return assertion;
}
+
+
}
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/ResultProducingListener.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/ResultProducingListener.java 2008-03-22
01:46:36 UTC (rev 10363)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/ResultProducingListener.java 2008-03-22
15:09:03 UTC (rev 10364)
@@ -31,6 +31,9 @@
import java.io.Writer;
import java.util.Map;
import java.util.Set;
+import java.util.List;
+import java.util.Collections;
+import java.util.LinkedList;
/**
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot
com">Boleslaw Dawidowicz</a>
@@ -46,6 +49,8 @@
public static int jsr286Max = 350;
+ public static String api286File = "./target/apt-api286-testcases.csv";
+
public void roundComplete(RoundCompleteEvent event)
{
if (event.getRoundState().finalRound())
@@ -61,13 +66,18 @@
if (!TestCaseAnnotationProcessor.jsr168Assertions.keySet().isEmpty())
{
- print(TestCaseAnnotationProcessor.jsr168Assertions, jsr168File,
"JSR168_", jsr168Max);
+ printTCKReport(TestCaseAnnotationProcessor.jsr168Assertions, jsr168File,
"JSR168_", jsr168Max);
}
if (!TestCaseAnnotationProcessor.jsr286Assertions.keySet().isEmpty())
{
- print(TestCaseAnnotationProcessor.jsr286Assertions, jsr286File,
"JSR286_", jsr286Max);
+ printTCKReport(TestCaseAnnotationProcessor.jsr286Assertions, jsr286File,
"JSR286_", jsr286Max);
}
+
+ if (!TestCaseAnnotationProcessor.api286Assertions.keySet().isEmpty())
+ {
+ printAPIReport(TestCaseAnnotationProcessor.api286Assertions, api286File);
+ }
}
catch (Exception e)
{
@@ -103,7 +113,7 @@
- private void print(Map<String, Set<String>> map, String fileName, String
pre, int max) throws Exception
+ private void printTCKReport(Map<String, Set<String>> map, String fileName,
String pre, int max) throws Exception
{
// Simple stats
@@ -192,7 +202,113 @@
writer.close();
}
+ private void printAPIReport(Map<String, Set<String>> map, String fileName)
throws Exception
+ {
+ // Simple stats
+
+ int total = 0;
+ int tested = 0;
+ int not_tested = 0;
+ int inactive = 0;
+
+ File f = new File(fileName);
+
+ Writer writer = new FileWriter(f, false);
+
+ StringBuilder output = new StringBuilder();
+
+ List<Assertion> apiAssertions = getApiAssertions();
+
+ for (Assertion assertion : apiAssertions)
+ {
+ total++;
+
+ String assertionName = assertion.name();
+
+ Set<String> testCases = map.get(assertionName);
+
+ String description = assertion.getDescription().replaceAll(",", "
").trim();
+
+ if (assertion.getRef() != null)
+ {
+
output.append(assertionName).append(",").append(assertion.getRef().toString()).append('\n');
+ output.append("DESCRIPTION:
,").append(description).append('\n');
+ }
+ else
+ {
+
output.append(assertionName).append(",").append(description).append('\n');
+ }
+
+
+ if (assertion.getStatus() != null)
+ {
+ Assertion.Status status = assertion.getStatus();
+ output.append("STATUS:,").append(status).append("\n");
+
+ if (status instanceof Assertion.Inactive || status instanceof
Assertion.Duplicate)
+ {
+ inactive++;
+ }
+ }
+
+
+ if (testCases != null)
+ {
+ tested++;
+ for (String testCase : testCases)
+ {
+ output.append("TEST_CASE:
,").append(testCase).append("\n");
+ }
+ }
+ else
+ {
+ not_tested++;
+ output.append("TEST_CASE:,NOT_TESTED\n");
+ }
+
+ output.append(" ,\n");
+ }
+
+ output.append("\n\n");
+
+ writer.write("STATISTICS:,**************************\n");
+ writer.write("TOTAL:," + total + "\n");
+ writer.write("TESTED:," + tested + "\n");
+ writer.write("NOT TESTED:," + not_tested + "\n");
+ writer.write("INACTIVE:," + inactive + " (POSTPONED; TODO; DISABLED;
UNTESTABLE or DUPLICATE) \n");
+ float ratio = (float)tested/(float)(total-inactive);
+ writer.write("TESTED RATIO:," + ratio + " ( TESTED/(TOTAL-INACTIVE)
) \n");
+
+ writer.write("\n\n\n\n");
+ writer.write(output.toString());
+ writer.write("\n");
+
+ writer.close();
+ }
+
+ private List<Assertion> getApiAssertions()
+ {
+
+ List<Assertion> result = new LinkedList<Assertion>();
+
+ Assertion[] assertions = Assertion.class.getEnumConstants();
+
+ for (Assertion assertion : assertions)
+ {
+ if
(assertion.name().startsWith(TestCaseAnnotationProcessor.api286AssertionPre))
+ {
+ result.add(assertion);
+ }
+ }
+
+ Collections.sort(result);
+
+ return result;
+
+ }
+
+
private Assertion getAssertion(String name)
{
if (name == null)
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/TestCaseAnnotationProcessor.java
===================================================================
---
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/TestCaseAnnotationProcessor.java 2008-03-22
01:46:36 UTC (rev 10363)
+++
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/unit/reports/TestCaseAnnotationProcessor.java 2008-03-22
15:09:03 UTC (rev 10364)
@@ -67,11 +67,11 @@
public static String jsr286Pre = "org.jboss.portal.test.portlet.jsr286";
- public static String jsr168AssertionPre = "JSR168";
+ public static String jsr168AssertionPre = "JSR168_";
- public static String jsr286AssertionPre = "JSR286";
+ public static String jsr286AssertionPre = "JSR286_";
- public static String api286AssertionPre = "API286";
+ public static String api286AssertionPre = "API286_";
public static Map<String, Set<String>> jsr168Assertions = new
HashMap<String, Set<String>>();