You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by ms...@apache.org on 2014/07/27 09:05:47 UTC
[11/24] Added the JSR 362 TCK to the Pluto project.
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_MimeResponse.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_MimeResponse.java b/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_MimeResponse.java
new file mode 100644
index 0000000..e4b78b9
--- /dev/null
+++ b/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_MimeResponse.java
@@ -0,0 +1,337 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.portlet.tck.ResponseTests.portlets;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.portlet.*;
+import javax.portlet.filter.*;
+import javax.portlet.tck.beans.ClassChecker;
+import javax.portlet.tck.beans.TestCaseDetails;
+import javax.portlet.tck.beans.JSR286ApiTestCaseDetails;
+import static javax.portlet.tck.beans.JSR286ApiTestCaseDetails.*;
+import javax.portlet.tck.beans.TestResult;
+
+/**
+ * This portlet implements several test cases for the JSR 362 TCK. The test case names
+ * are defined in the /src/main/resources/xml-resources/additionalTCs.xml
+ * file. The build process will integrate the test case names defined in the
+ * additionalTCs.xml file into the complete list of test case names for execution by the driver.
+ */
+public class V2ResponseTests_MimeResponse implements Portlet {
+ private static final String LOG_CLASS =
+ V2ResponseTests_MimeResponse.class.getName();
+ private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
+
+ private PortletConfig portletConfig = null;
+
+ @Override
+ public void init(PortletConfig config) throws PortletException {
+ this.portletConfig = config;
+ }
+
+ @Override
+ public void destroy() {
+ }
+
+ @Override
+ public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
+ throws PortletException, IOException {
+ }
+
+ @Override
+ public void render(RenderRequest renderRequest, RenderResponse renderResponse)
+ throws PortletException, IOException {
+
+ if (LOGGER.isLoggable(Level.FINE)) {
+ LOGGER.logp(Level.FINE, LOG_CLASS, "render", "Entry");
+ }
+
+ PrintWriter writer = renderResponse.getWriter();
+ JSR286ApiTestCaseDetails tcd = new JSR286ApiTestCaseDetails();
+ ClassChecker cc = new ClassChecker(renderResponse.getClass());
+
+ // Create result objects for the tests
+
+ /* TestCase: MimeResponse_implementsPortletResponse2 */
+ /* Details: "All tests described for the PortletResponse execute correctly with the MimeResponse" */
+ TestResult tr0 = tcd.getTestResultFailed(MIMERESPONSE_IMPLEMENTSPORTLETRESPONSE2);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_fieldEXPIRATION_CACHE */
+ /* Details: "Has String field EXPIRATION_CACHE with value of \"portlet.expiration-cache\"" */
+ TestResult tr1 = tcd.getTestResultFailed(MIMERESPONSE_FIELDEXPIRATION_CACHE);
+ {
+ tr1.setTcSuccess(cc.hasField("EXPIRATION_CACHE", "portlet.expiration-cache"));
+ }
+
+ /* TestCase: MimeResponse_fieldCACHE_SCOPE */
+ /* Details: "Has String field CACHE_SCOPE with value of \"portlet.cache-scope\"" */
+ TestResult tr2 = tcd.getTestResultFailed(MIMERESPONSE_FIELDCACHE_SCOPE);
+ {
+ tr2.setTcSuccess(cc.hasField("CACHE_SCOPE", "portlet.cache-scope"));
+ }
+
+ /* TestCase: MimeResponse_fieldPUBLIC_SCOPE */
+ /* Details: "Has String field PUBLIC_SCOPE with value of \"portlet.public-scope\"" */
+ TestResult tr3 = tcd.getTestResultFailed(MIMERESPONSE_FIELDPUBLIC_SCOPE);
+ {
+ tr3.setTcSuccess(cc.hasField("PUBLIC_SCOPE", "portlet.public-scope"));
+ }
+
+ /* TestCase: MimeResponse_fieldPRIVATE_SCOPE */
+ /* Details: "Has String field PRIVATE_SCOPE with value of \"portlet.private-scope\"" */
+ TestResult tr4 = tcd.getTestResultFailed(MIMERESPONSE_FIELDPRIVATE_SCOPE);
+ {
+ tr4.setTcSuccess(cc.hasField("PRIVATE_SCOPE", "portlet.private-scope"));
+ }
+
+ /* TestCase: MimeResponse_fieldETAG */
+ /* Details: "Has String field ETAG with value of \"portlet.ETag\"" */
+ TestResult tr5 = tcd.getTestResultFailed(MIMERESPONSE_FIELDETAG);
+ {
+ tr5.setTcSuccess(cc.hasField("ETAG", "portlet.ETag"));
+ }
+
+ /* TestCase: MimeResponse_fieldUSE_CACHED_CONTENT */
+ /* Details: "Has String field USE_CACHED_CONTENT with value of \"portlet.use-cached-content\"" */
+ TestResult tr6 = tcd.getTestResultFailed(MIMERESPONSE_FIELDUSE_CACHED_CONTENT);
+ {
+ tr6.setTcSuccess(cc.hasField("USE_CACHED_CONTENT", "portlet.use-cached-content"));
+ }
+
+ /* TestCase: MimeResponse_fieldNAMESPACED_RESPONSE */
+ /* Details: "Has String field NAMESPACED_RESPONSE with value of \"X-JAVAX-PORTLET-NAMESPACED-RESPONSE\"" */
+ TestResult tr7 = tcd.getTestResultFailed(MIMERESPONSE_FIELDNAMESPACED_RESPONSE);
+ {
+ tr7.setTcSuccess(cc.hasField("NAMESPACED_RESPONSE", "X-JAVAX-PORTLET-NAMESPACED-RESPONSE"));
+ }
+
+ /* TestCase: MimeResponse_fieldMARKUP_HEAD_ELEMENT */
+ /* Details: "Has String field MARKUP_HEAD_ELEMENT with value of \"javax.portlet.markup.head.element\"" */
+ TestResult tr8 = tcd.getTestResultFailed(MIMERESPONSE_FIELDMARKUP_HEAD_ELEMENT);
+ {
+ tr8.setTcSuccess(cc.hasField("MARKUP_HEAD_ELEMENT", "javax.portlet.markup.head.element"));
+ }
+
+ /* TestCase: MimeResponse_getContentType1 */
+ /* Details: "Returns a String containing the MIME type that can be used with the response" */
+ TestResult tr9 = tcd.getTestResultFailed(MIMERESPONSE_GETCONTENTTYPE1);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_getContentType2 */
+ /* Details: "Returns null if no content type is set" */
+ TestResult tr10 = tcd.getTestResultFailed(MIMERESPONSE_GETCONTENTTYPE2);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_setContentType1 */
+ /* Details: "Sets the MIME type for the response" */
+ TestResult tr11 = tcd.getTestResultFailed(MIMERESPONSE_SETCONTENTTYPE1);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_setContentType2 */
+ /* Details: "Has no effect if called after the getWriter method has been called" */
+ TestResult tr12 = tcd.getTestResultFailed(MIMERESPONSE_SETCONTENTTYPE2);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_setContentType3 */
+ /* Details: "Has no effect if called after the getPortletOutputStream method has been called" */
+ TestResult tr13 = tcd.getTestResultFailed(MIMERESPONSE_SETCONTENTTYPE3);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_setContentType4 */
+ /* Details: "Throws IllegalArgumentException if the specified MIME type is invalid" */
+ TestResult tr14 = tcd.getTestResultFailed(MIMERESPONSE_SETCONTENTTYPE4);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_getCharacterEncoding */
+ /* Details: "Returns a String containing the name of the charset used for the response body" */
+ TestResult tr15 = tcd.getTestResultFailed(MIMERESPONSE_GETCHARACTERENCODING);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_getWriter1 */
+ /* Details: "Returns a PrintWriter object" */
+ TestResult tr16 = tcd.getTestResultFailed(MIMERESPONSE_GETWRITER1);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_getWriter2 */
+ /* Details: "Throws IllegalStateException if called after the getPortletOutputStream method has been called" */
+ TestResult tr17 = tcd.getTestResultFailed(MIMERESPONSE_GETWRITER2);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_getWriter3 */
+ /* Details: "Throws IOException if an IO problem occurs" */
+ TestResult tr18 = tcd.getTestResultFailed(MIMERESPONSE_GETWRITER3);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_getLocale */
+ /* Details: "Returns an java.util.Locale representing the locale assigned to the response" */
+ TestResult tr19 = tcd.getTestResultFailed(MIMERESPONSE_GETLOCALE);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_setBufferSize1 */
+ /* Details: "Sets the preferred buffer size for the response body" */
+ TestResult tr20 = tcd.getTestResultFailed(MIMERESPONSE_SETBUFFERSIZE1);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_setBufferSize2 */
+ /* Details: "Throws IllegalStateException if called after content has been written" */
+ TestResult tr21 = tcd.getTestResultFailed(MIMERESPONSE_SETBUFFERSIZE2);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_getBufferSize1 */
+ /* Details: "Returns an int designating the actual buffer size used for the response" */
+ TestResult tr22 = tcd.getTestResultFailed(MIMERESPONSE_GETBUFFERSIZE1);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_getBufferSize2 */
+ /* Details: "Returns null if buffering is not used" */
+ TestResult tr23 = tcd.getTestResultFailed(MIMERESPONSE_GETBUFFERSIZE2);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_flushBuffer1 */
+ /* Details: "Returns void and flushes buffer to OutputStream" */
+ TestResult tr24 = tcd.getTestResultFailed(MIMERESPONSE_FLUSHBUFFER1);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_flushBuffer2 */
+ /* Details: "Throws IOException if an IO problem occurs" */
+ TestResult tr25 = tcd.getTestResultFailed(MIMERESPONSE_FLUSHBUFFER2);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_resetBuffer1 */
+ /* Details: "Returns void and clears and data and properties from the buffer" */
+ TestResult tr26 = tcd.getTestResultFailed(MIMERESPONSE_RESETBUFFER1);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_resetBuffer2 */
+ /* Details: "Throws IllegalStateException if called after the response has been committed" */
+ TestResult tr27 = tcd.getTestResultFailed(MIMERESPONSE_RESETBUFFER2);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_isCommitted1 */
+ /* Details: "Returns true if the response has been committed" */
+ TestResult tr28 = tcd.getTestResultFailed(MIMERESPONSE_ISCOMMITTED1);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_isCommitted2 */
+ /* Details: "Returns false if the response has not been committed" */
+ TestResult tr29 = tcd.getTestResultFailed(MIMERESPONSE_ISCOMMITTED2);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_reset1 */
+ /* Details: "Returns void and clears and data and properties from the buffer" */
+ TestResult tr30 = tcd.getTestResultFailed(MIMERESPONSE_RESET1);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_reset2 */
+ /* Details: "Throws IllegalStateException if called after the response has been committed" */
+ TestResult tr31 = tcd.getTestResultFailed(MIMERESPONSE_RESET2);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_getPortletOutputStream1 */
+ /* Details: "Returns a PortletOutputStream object" */
+ TestResult tr32 = tcd.getTestResultFailed(MIMERESPONSE_GETPORTLETOUTPUTSTREAM1);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_getPortletOutputStream2 */
+ /* Details: "Throws IllegalStateException if called after the getWriter method has been called" */
+ TestResult tr33 = tcd.getTestResultFailed(MIMERESPONSE_GETPORTLETOUTPUTSTREAM2);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_getPortletOutputStream3 */
+ /* Details: "Throws IOException if an IO problem occurs" */
+ TestResult tr34 = tcd.getTestResultFailed(MIMERESPONSE_GETPORTLETOUTPUTSTREAM3);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_createRenderURL */
+ /* Details: "Returns a PortletURL object representing a render URL targeting the portlet" */
+ TestResult tr35 = tcd.getTestResultFailed(MIMERESPONSE_CREATERENDERURL);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_createActionURL */
+ /* Details: "Returns a PortletURL object representing an action URL targeting the portlet" */
+ TestResult tr36 = tcd.getTestResultFailed(MIMERESPONSE_CREATEACTIONURL);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_createResourceURL */
+ /* Details: "Returns a ResourceURL object targeting the portlet" */
+ TestResult tr37 = tcd.getTestResultFailed(MIMERESPONSE_CREATERESOURCEURL);
+ /* TODO: implement test */
+
+ /* TestCase: MimeResponse_getCacheControl */
+ /* Details: "Returns a CacheControl object" */
+ TestResult tr38 = tcd.getTestResultFailed(MIMERESPONSE_GETCACHECONTROL);
+ /* TODO: implement test */
+
+
+
+ // Write the results to the output stream
+
+ tr0.writeTo(writer);
+ tr1.writeTo(writer);
+ tr2.writeTo(writer);
+ tr3.writeTo(writer);
+ tr4.writeTo(writer);
+ tr5.writeTo(writer);
+ tr6.writeTo(writer);
+ tr7.writeTo(writer);
+ tr8.writeTo(writer);
+ tr9.writeTo(writer);
+ tr10.writeTo(writer);
+ tr11.writeTo(writer);
+ tr12.writeTo(writer);
+ tr13.writeTo(writer);
+ tr14.writeTo(writer);
+ tr15.writeTo(writer);
+ tr16.writeTo(writer);
+ tr17.writeTo(writer);
+ tr18.writeTo(writer);
+ tr19.writeTo(writer);
+ tr20.writeTo(writer);
+ tr21.writeTo(writer);
+ tr22.writeTo(writer);
+ tr23.writeTo(writer);
+ tr24.writeTo(writer);
+ tr25.writeTo(writer);
+ tr26.writeTo(writer);
+ tr27.writeTo(writer);
+ tr28.writeTo(writer);
+ tr29.writeTo(writer);
+ tr30.writeTo(writer);
+ tr31.writeTo(writer);
+ tr32.writeTo(writer);
+ tr33.writeTo(writer);
+ tr34.writeTo(writer);
+ tr35.writeTo(writer);
+ tr36.writeTo(writer);
+ tr37.writeTo(writer);
+ tr38.writeTo(writer);
+
+
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_PortletResponse.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_PortletResponse.java b/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_PortletResponse.java
new file mode 100644
index 0000000..3839d80
--- /dev/null
+++ b/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_PortletResponse.java
@@ -0,0 +1,213 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.portlet.tck.ResponseTests.portlets;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.portlet.*;
+import javax.portlet.filter.*;
+import javax.portlet.tck.beans.ClassChecker;
+import javax.portlet.tck.beans.TestCaseDetails;
+import javax.portlet.tck.beans.JSR286ApiTestCaseDetails;
+import static javax.portlet.tck.beans.JSR286ApiTestCaseDetails.*;
+import javax.portlet.tck.beans.TestResult;
+
+/**
+ * This portlet implements several test cases for the JSR 362 TCK. The test case names
+ * are defined in the /src/main/resources/xml-resources/additionalTCs.xml
+ * file. The build process will integrate the test case names defined in the
+ * additionalTCs.xml file into the complete list of test case names for execution by the driver.
+ */
+public class V2ResponseTests_PortletResponse implements Portlet {
+ private static final String LOG_CLASS =
+ V2ResponseTests_PortletResponse.class.getName();
+ private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
+
+ private PortletConfig portletConfig = null;
+
+ @Override
+ public void init(PortletConfig config) throws PortletException {
+ this.portletConfig = config;
+ }
+
+ @Override
+ public void destroy() {
+ }
+
+ @Override
+ public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
+ throws PortletException, IOException {
+ }
+
+ @Override
+ public void render(RenderRequest renderRequest, RenderResponse renderResponse)
+ throws PortletException, IOException {
+
+ if (LOGGER.isLoggable(Level.FINE)) {
+ LOGGER.logp(Level.FINE, LOG_CLASS, "render", "Entry");
+ }
+
+ PrintWriter writer = renderResponse.getWriter();
+ JSR286ApiTestCaseDetails tcd = new JSR286ApiTestCaseDetails();
+ ClassChecker cc = new ClassChecker(renderResponse.getClass());
+
+ // Create result objects for the tests
+
+ /* TestCase: PortletResponse_addPropertyA1 */
+ /* Details: "Adds the specified cookie property to the response" */
+ TestResult tr0 = tcd.getTestResultFailed(PORTLETRESPONSE_ADDPROPERTYA1);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_addPropertyA2 */
+ /* Details: "Throws IllegalArgumentException if the specified cookie is null" */
+ TestResult tr1 = tcd.getTestResultFailed(PORTLETRESPONSE_ADDPROPERTYA2);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_addPropertyB1 */
+ /* Details: "Adds an XML DOM Element to the response for the specified key" */
+ TestResult tr2 = tcd.getTestResultFailed(PORTLETRESPONSE_ADDPROPERTYB1);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_addPropertyB2 */
+ /* Details: "If a DOM Element for the specified key already exists, the new element is added in addition to the existing element" */
+ TestResult tr3 = tcd.getTestResultFailed(PORTLETRESPONSE_ADDPROPERTYB2);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_addPropertyB3 */
+ /* Details: "If the specified DOM Element value is null, the key is removed from the response" */
+ TestResult tr4 = tcd.getTestResultFailed(PORTLETRESPONSE_ADDPROPERTYB3);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_addPropertyB4 */
+ /* Details: "Throws IllegalArgumentException if the specified key is null" */
+ TestResult tr5 = tcd.getTestResultFailed(PORTLETRESPONSE_ADDPROPERTYB4);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_addPropertyC1 */
+ /* Details: "Adds a property value to an existing key to allow the key to have multiple values" */
+ TestResult tr6 = tcd.getTestResultFailed(PORTLETRESPONSE_ADDPROPERTYC1);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_addPropertyC2 */
+ /* Details: "Throws IllegalArgumentException if the specified key is null" */
+ TestResult tr7 = tcd.getTestResultFailed(PORTLETRESPONSE_ADDPROPERTYC2);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_setProperty1 */
+ /* Details: "Sets a property value for the specified key" */
+ TestResult tr8 = tcd.getTestResultFailed(PORTLETRESPONSE_SETPROPERTY1);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_setProperty2 */
+ /* Details: "Resets any existing property values for the specified key" */
+ TestResult tr9 = tcd.getTestResultFailed(PORTLETRESPONSE_SETPROPERTY2);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_setProperty3 */
+ /* Details: "Throws IllegalArgumentException if the specified key is null" */
+ TestResult tr10 = tcd.getTestResultFailed(PORTLETRESPONSE_SETPROPERTY3);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_encodeURL1 */
+ /* Details: "Returns a String representing the encoded URL" */
+ TestResult tr11 = tcd.getTestResultFailed(PORTLETRESPONSE_ENCODEURL1);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_encodeURL2 */
+ /* Details: "Throws IllegalArgumentException if the input string is not an absolute URL and does not start with at \"/\" character" */
+ TestResult tr12 = tcd.getTestResultFailed(PORTLETRESPONSE_ENCODEURL2);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_getNamespace1 */
+ /* Details: "Returns a String containing the namespace value" */
+ TestResult tr13 = tcd.getTestResultFailed(PORTLETRESPONSE_GETNAMESPACE1);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_getNamespace2 */
+ /* Details: "The returned namespace is constant for the lifetime of the portlet window" */
+ TestResult tr14 = tcd.getTestResultFailed(PORTLETRESPONSE_GETNAMESPACE2);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_createElement1 */
+ /* Details: "Returns an org.w3c.dom.Element object for the specified tag name" */
+ TestResult tr15 = tcd.getTestResultFailed(PORTLETRESPONSE_CREATEELEMENT1);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_createElement2 */
+ /* Details: "The returned Element has nodeName set to the the specified tag name " */
+ TestResult tr16 = tcd.getTestResultFailed(PORTLETRESPONSE_CREATEELEMENT2);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_createElement3 */
+ /* Details: "The returned Element has localName set to null" */
+ TestResult tr17 = tcd.getTestResultFailed(PORTLETRESPONSE_CREATEELEMENT3);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_createElement4 */
+ /* Details: "The returned Element has prefix set to null" */
+ TestResult tr18 = tcd.getTestResultFailed(PORTLETRESPONSE_CREATEELEMENT4);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_createElement5 */
+ /* Details: "The returned Element has namespaceURI set to null" */
+ TestResult tr19 = tcd.getTestResultFailed(PORTLETRESPONSE_CREATEELEMENT5);
+ /* TODO: implement test */
+
+ /* TestCase: PortletResponse_createElement6 */
+ /* Details: "Throws org.w3c.dom.DOMException - INVALID_CHARACTER_ERR if the specified name contains an illegal character. " */
+ TestResult tr20 = tcd.getTestResultFailed(PORTLETRESPONSE_CREATEELEMENT6);
+ /* TODO: implement test */
+
+
+
+ // Write the results to the output stream
+
+ tr0.writeTo(writer);
+ tr1.writeTo(writer);
+ tr2.writeTo(writer);
+ tr3.writeTo(writer);
+ tr4.writeTo(writer);
+ tr5.writeTo(writer);
+ tr6.writeTo(writer);
+ tr7.writeTo(writer);
+ tr8.writeTo(writer);
+ tr9.writeTo(writer);
+ tr10.writeTo(writer);
+ tr11.writeTo(writer);
+ tr12.writeTo(writer);
+ tr13.writeTo(writer);
+ tr14.writeTo(writer);
+ tr15.writeTo(writer);
+ tr16.writeTo(writer);
+ tr17.writeTo(writer);
+ tr18.writeTo(writer);
+ tr19.writeTo(writer);
+ tr20.writeTo(writer);
+
+
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_RenderResponse.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_RenderResponse.java b/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_RenderResponse.java
new file mode 100644
index 0000000..be0997c
--- /dev/null
+++ b/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_RenderResponse.java
@@ -0,0 +1,135 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.portlet.tck.ResponseTests.portlets;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.portlet.*;
+import javax.portlet.filter.*;
+import javax.portlet.tck.beans.ClassChecker;
+import javax.portlet.tck.beans.TestCaseDetails;
+import javax.portlet.tck.beans.JSR286ApiTestCaseDetails;
+import static javax.portlet.tck.beans.JSR286ApiTestCaseDetails.*;
+import javax.portlet.tck.beans.TestResult;
+
+/**
+ * This portlet implements several test cases for the JSR 362 TCK. The test case names
+ * are defined in the /src/main/resources/xml-resources/additionalTCs.xml
+ * file. The build process will integrate the test case names defined in the
+ * additionalTCs.xml file into the complete list of test case names for execution by the driver.
+ */
+public class V2ResponseTests_RenderResponse implements Portlet {
+ private static final String LOG_CLASS =
+ V2ResponseTests_RenderResponse.class.getName();
+ private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
+
+ private PortletConfig portletConfig = null;
+
+ @Override
+ public void init(PortletConfig config) throws PortletException {
+ this.portletConfig = config;
+ }
+
+ @Override
+ public void destroy() {
+ }
+
+ @Override
+ public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
+ throws PortletException, IOException {
+ }
+
+ @Override
+ public void render(RenderRequest renderRequest, RenderResponse renderResponse)
+ throws PortletException, IOException {
+
+ if (LOGGER.isLoggable(Level.FINE)) {
+ LOGGER.logp(Level.FINE, LOG_CLASS, "render", "Entry");
+ }
+
+ PrintWriter writer = renderResponse.getWriter();
+ JSR286ApiTestCaseDetails tcd = new JSR286ApiTestCaseDetails();
+ ClassChecker cc = new ClassChecker(renderResponse.getClass());
+
+ // Create result objects for the tests
+
+ /* TestCase: RenderResponse_implementsMimeResponse3 */
+ /* Details: "All tests described for the PortletResponse execute correctly with the RenderResponse" */
+ TestResult tr0 = tcd.getTestResultFailed(RENDERRESPONSE_IMPLEMENTSMIMERESPONSE3);
+ /* TODO: implement test */
+
+ /* TestCase: RenderResponse_implementsMimeResponse4 */
+ /* Details: "All tests described for the MimeResponse execute correctly with the RenderResponse" */
+ TestResult tr1 = tcd.getTestResultFailed(RENDERRESPONSE_IMPLEMENTSMIMERESPONSE4);
+ /* TODO: implement test */
+
+ /* TestCase: RenderResponse_setTitle1 */
+ /* Details: "Returns void" */
+ TestResult tr2 = tcd.getTestResultFailed(RENDERRESPONSE_SETTITLE1);
+ /* TODO: implement test */
+
+ /* TestCase: RenderResponse_setTitle2 */
+ /* Details: "Sets the portlet title to the specified value" */
+ TestResult tr3 = tcd.getTestResultFailed(RENDERRESPONSE_SETTITLE2);
+ /* TODO: implement test */
+
+ /* TestCase: RenderResponse_setNextPossiblePortletModes1 */
+ /* Details: "Returns void" */
+ TestResult tr4 = tcd.getTestResultFailed(RENDERRESPONSE_SETNEXTPOSSIBLEPORTLETMODES1);
+ /* TODO: implement test */
+
+ /* TestCase: RenderResponse_setNextPossiblePortletModes2 */
+ /* Details: "Sets the next possible portlet modes to the specified value" */
+ TestResult tr5 = tcd.getTestResultFailed(RENDERRESPONSE_SETNEXTPOSSIBLEPORTLETMODES2);
+ /* TODO: implement test */
+
+ /* TestCase: RenderResponse_setContentType1 */
+ /* Details: "The portlet container will ignore any character encoding specified as part of the content type for render calls" */
+ TestResult tr6 = tcd.getTestResultFailed(RENDERRESPONSE_SETCONTENTTYPE1);
+ /* TODO: implement test */
+
+ /* TestCase: RenderResponse_setContentType2 */
+ /* Details: "Throws IllegalArgumentException if the content type is not valid" */
+ TestResult tr7 = tcd.getTestResultFailed(RENDERRESPONSE_SETCONTENTTYPE2);
+ /* TODO: implement test */
+
+
+
+ // Write the results to the output stream
+
+ tr0.writeTo(writer);
+ tr1.writeTo(writer);
+ tr2.writeTo(writer);
+ tr3.writeTo(writer);
+ tr4.writeTo(writer);
+ tr5.writeTo(writer);
+ tr6.writeTo(writer);
+ tr7.writeTo(writer);
+
+
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_ResourceResponse.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_ResourceResponse.java b/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_ResourceResponse.java
new file mode 100644
index 0000000..233d97e
--- /dev/null
+++ b/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_ResourceResponse.java
@@ -0,0 +1,209 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.portlet.tck.ResponseTests.portlets;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.portlet.*;
+import javax.portlet.filter.*;
+import javax.portlet.tck.beans.ClassChecker;
+import javax.portlet.tck.beans.TestCaseDetails;
+import javax.portlet.tck.beans.JSR286ApiTestCaseDetails;
+import static javax.portlet.tck.beans.JSR286ApiTestCaseDetails.*;
+import javax.portlet.tck.beans.TestResult;
+
+/**
+ * This portlet implements several test cases for the JSR 362 TCK. The test case names
+ * are defined in the /src/main/resources/xml-resources/additionalTCs.xml
+ * file. The build process will integrate the test case names defined in the
+ * additionalTCs.xml file into the complete list of test case names for execution by the driver.
+ */
+public class V2ResponseTests_ResourceResponse implements Portlet {
+ private static final String LOG_CLASS =
+ V2ResponseTests_ResourceResponse.class.getName();
+ private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
+
+ private PortletConfig portletConfig = null;
+
+ @Override
+ public void init(PortletConfig config) throws PortletException {
+ this.portletConfig = config;
+ }
+
+ @Override
+ public void destroy() {
+ }
+
+ @Override
+ public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
+ throws PortletException, IOException {
+ }
+
+ @Override
+ public void render(RenderRequest renderRequest, RenderResponse renderResponse)
+ throws PortletException, IOException {
+
+ if (LOGGER.isLoggable(Level.FINE)) {
+ LOGGER.logp(Level.FINE, LOG_CLASS, "render", "Entry");
+ }
+
+ PrintWriter writer = renderResponse.getWriter();
+ JSR286ApiTestCaseDetails tcd = new JSR286ApiTestCaseDetails();
+ ClassChecker cc = new ClassChecker(ResourceResponseWrapper.class);
+
+ // Create result objects for the tests
+
+ /* TestCase: ResourceResponse_implementsMimeResponse3 */
+ /* Details: "All tests described for the PortletResponse execute correctly with the ResourceResponse" */
+ TestResult tr0 = tcd.getTestResultFailed(RESOURCERESPONSE_IMPLEMENTSMIMERESPONSE3);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceResponse_implementsMimeResponse4 */
+ /* Details: "All tests described for the MimeResponse execute correctly with the ResourceResponse" */
+ TestResult tr1 = tcd.getTestResultFailed(RESOURCERESPONSE_IMPLEMENTSMIMERESPONSE4);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceResponse_fieldHTTP_STATUS_CODE */
+ /* Details: "Has String field HTTP_STATUS_CODE with value of \"portlet.http-status-code\"" */
+ TestResult tr2 = tcd.getTestResultFailed(RESOURCERESPONSE_FIELDHTTP_STATUS_CODE);
+ {
+ tr2.setTcSuccess(cc.hasField("HTTP_STATUS_CODE", "portlet.http-status-code"));
+ }
+
+ /* TestCase: ResourceResponse_setLocale1 */
+ /* Details: "Sets the locale of the response" */
+ TestResult tr3 = tcd.getTestResultFailed(RESOURCERESPONSE_SETLOCALE1);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceResponse_setLocale2 */
+ /* Details: "Has no effect if called after the getWriter method has been called" */
+ TestResult tr4 = tcd.getTestResultFailed(RESOURCERESPONSE_SETLOCALE2);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceResponse_setLocale3 */
+ /* Details: "Has no effect if called after the getPortletOutputStream method has been called" */
+ TestResult tr5 = tcd.getTestResultFailed(RESOURCERESPONSE_SETLOCALE3);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceResponse_setLocale4 */
+ /* Details: "Throws IllegalArgumentException if the Locale parameter is null" */
+ TestResult tr6 = tcd.getTestResultFailed(RESOURCERESPONSE_SETLOCALE4);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceResponse_setCharacterEncoding1 */
+ /* Details: "Sets the character encoding of the response" */
+ TestResult tr7 = tcd.getTestResultFailed(RESOURCERESPONSE_SETCHARACTERENCODING1);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceResponse_setCharacterEncoding2 */
+ /* Details: "Has no effect if called after the getWriter method has been called" */
+ TestResult tr8 = tcd.getTestResultFailed(RESOURCERESPONSE_SETCHARACTERENCODING2);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceResponse_setCharacterEncoding3 */
+ /* Details: "Has no effect if called after the getPortletOutputStream method has been called" */
+ TestResult tr9 = tcd.getTestResultFailed(RESOURCERESPONSE_SETCHARACTERENCODING3);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceResponse_setCharacterEncoding4 */
+ /* Details: "Throws IllegalArgumentException if the Locale parameter is null" */
+ TestResult tr10 = tcd.getTestResultFailed(RESOURCERESPONSE_SETCHARACTERENCODING4);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceResponse_setContentLength1 */
+ /* Details: "Sets the length of the content body" */
+ TestResult tr11 = tcd.getTestResultFailed(RESOURCERESPONSE_SETCONTENTLENGTH1);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceResponse_setContentLength2 */
+ /* Details: "Has no effect if called after the getWriter method has been called" */
+ TestResult tr12 = tcd.getTestResultFailed(RESOURCERESPONSE_SETCONTENTLENGTH2);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceResponse_setContentLength3 */
+ /* Details: "Has no effect if called after the getPortletOutputStream method has been called" */
+ TestResult tr13 = tcd.getTestResultFailed(RESOURCERESPONSE_SETCONTENTLENGTH3);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceResponse_createRenderURL1 */
+ /* Details: "Tests described for overridden method in MimeResponse execute correctly" */
+ TestResult tr14 = tcd.getTestResultFailed(RESOURCERESPONSE_CREATERENDERURL1);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceResponse_createRenderURL2 */
+ /* Details: "Throws IllegalStateException if the cacheability level for the resource URL triggering the serveResource call is not PAGE" */
+ TestResult tr15 = tcd.getTestResultFailed(RESOURCERESPONSE_CREATERENDERURL2);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceResponse_createActionURL1 */
+ /* Details: "Tests described for overridden method in MimeResponse execute correctly" */
+ TestResult tr16 = tcd.getTestResultFailed(RESOURCERESPONSE_CREATEACTIONURL1);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceResponse_createActionURL2 */
+ /* Details: "Throws IllegalStateException if the cacheability level for the resource URL triggering the serveResource call is not PAGE" */
+ TestResult tr17 = tcd.getTestResultFailed(RESOURCERESPONSE_CREATEACTIONURL2);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceResponse_createResourceURL1 */
+ /* Details: "Tests described for overridden method in MimeResponse execute correctly" */
+ TestResult tr18 = tcd.getTestResultFailed(RESOURCERESPONSE_CREATERESOURCEURL1);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceResponse_createResourceURL2 */
+ /* Details: "Throws IllegalStateException if the cacheability level for the resource URL triggering the serveResource call is not PAGE" */
+ TestResult tr19 = tcd.getTestResultFailed(RESOURCERESPONSE_CREATERESOURCEURL2);
+ /* TODO: implement test */
+
+
+
+ // Write the results to the output stream
+
+ tr0.writeTo(writer);
+ tr1.writeTo(writer);
+ tr2.writeTo(writer);
+ tr3.writeTo(writer);
+ tr4.writeTo(writer);
+ tr5.writeTo(writer);
+ tr6.writeTo(writer);
+ tr7.writeTo(writer);
+ tr8.writeTo(writer);
+ tr9.writeTo(writer);
+ tr10.writeTo(writer);
+ tr11.writeTo(writer);
+ tr12.writeTo(writer);
+ tr13.writeTo(writer);
+ tr14.writeTo(writer);
+ tr15.writeTo(writer);
+ tr16.writeTo(writer);
+ tr17.writeTo(writer);
+ tr18.writeTo(writer);
+ tr19.writeTo(writer);
+
+
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_SIG_ActionResponse.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_SIG_ActionResponse.java b/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_SIG_ActionResponse.java
new file mode 100644
index 0000000..3072739
--- /dev/null
+++ b/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_SIG_ActionResponse.java
@@ -0,0 +1,139 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.portlet.tck.ResponseTests.portlets;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.portlet.*;
+import javax.portlet.filter.*;
+import javax.portlet.tck.beans.ClassChecker;
+import javax.portlet.tck.beans.TestCaseDetails;
+import javax.portlet.tck.beans.JSR286ApiTestCaseDetails;
+import static javax.portlet.tck.beans.JSR286ApiTestCaseDetails.*;
+import javax.portlet.tck.beans.TestResult;
+
+/**
+ * This portlet implements several test cases for the JSR 362 TCK. The test case names
+ * are defined in the /src/main/resources/xml-resources/additionalTCs.xml
+ * file. The build process will integrate the test case names defined in the
+ * additionalTCs.xml file into the complete list of test case names for execution by the driver.
+ */
+public class V2ResponseTests_SIG_ActionResponse implements Portlet {
+ private static final String LOG_CLASS =
+ V2ResponseTests_SIG_ActionResponse.class.getName();
+ private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
+
+ private PortletConfig portletConfig = null;
+
+ @Override
+ public void init(PortletConfig config) throws PortletException {
+ this.portletConfig = config;
+ }
+
+ @Override
+ public void destroy() {
+ }
+
+ @Override
+ public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
+ throws PortletException, IOException {
+ }
+
+ @Override
+ public void render(RenderRequest renderRequest, RenderResponse renderResponse)
+ throws PortletException, IOException {
+
+ if (LOGGER.isLoggable(Level.FINE)) {
+ LOGGER.logp(Level.FINE, LOG_CLASS, "render", "Entry");
+ }
+
+ PrintWriter writer = renderResponse.getWriter();
+ JSR286ApiTestCaseDetails tcd = new JSR286ApiTestCaseDetails();
+ ClassChecker cc = new ClassChecker(ActionResponseWrapper.class);
+
+ // Create result objects for the tests
+
+ /* TestCase: ActionResponse_SIG_implementsStateAwareResponse */
+ /* Details: "Implements StateAwareResponse " */
+ TestResult tr0 = tcd.getTestResultFailed(ACTIONRESPONSE_SIG_IMPLEMENTSSTATEAWARERESPONSE);
+ {
+ tr0.setTcSuccess(cc.implementsInterface(StateAwareResponse.class));
+ }
+
+ /* TestCase: ActionResponse_SIG_hasSendRedirect */
+ /* Details: "Has a sendRedirect(String) throws java.io.IOException method " */
+ TestResult tr1 = tcd.getTestResultFailed(ACTIONRESPONSE_SIG_HASSENDREDIRECT);
+ {
+ String name = "sendRedirect";
+ Class<?>[] exceptions = {java.io.IOException.class};
+ Class<?>[] parms = {String.class};
+ tr1.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: ActionResponse_SIG_hasSendRedirectReturns */
+ /* Details: "Method sendRedirect(String) returns void " */
+ TestResult tr2 = tcd.getTestResultFailed(ACTIONRESPONSE_SIG_HASSENDREDIRECTRETURNS);
+ {
+ String name = "sendRedirect";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {String.class};
+ tr2.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: ActionResponse_SIG_hasSendRedirectA */
+ /* Details: "Has a sendRedirect(String, String) throws java.io.IOException method " */
+ TestResult tr3 = tcd.getTestResultFailed(ACTIONRESPONSE_SIG_HASSENDREDIRECTA);
+ {
+ String name = "sendRedirect";
+ Class<?>[] exceptions = {java.io.IOException.class};
+ Class<?>[] parms = {String.class, String.class};
+ tr3.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: ActionResponse_SIG_hasSendRedirectReturnsA */
+ /* Details: "Method sendRedirect(String, String) returns void " */
+ TestResult tr4 = tcd.getTestResultFailed(ACTIONRESPONSE_SIG_HASSENDREDIRECTRETURNSA);
+ {
+ String name = "sendRedirect";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {String.class, String.class};
+ tr4.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+
+
+ // Write the results to the output stream
+
+ tr0.writeTo(writer);
+ tr1.writeTo(writer);
+ tr2.writeTo(writer);
+ tr3.writeTo(writer);
+ tr4.writeTo(writer);
+
+
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_SIG_EventResponse.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_SIG_EventResponse.java b/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_SIG_EventResponse.java
new file mode 100644
index 0000000..474a7be
--- /dev/null
+++ b/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_SIG_EventResponse.java
@@ -0,0 +1,117 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.portlet.tck.ResponseTests.portlets;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.portlet.*;
+import javax.portlet.filter.*;
+import javax.portlet.tck.beans.ClassChecker;
+import javax.portlet.tck.beans.TestCaseDetails;
+import javax.portlet.tck.beans.JSR286ApiTestCaseDetails;
+import static javax.portlet.tck.beans.JSR286ApiTestCaseDetails.*;
+import javax.portlet.tck.beans.TestResult;
+
+/**
+ * This portlet implements several test cases for the JSR 362 TCK. The test case names
+ * are defined in the /src/main/resources/xml-resources/additionalTCs.xml
+ * file. The build process will integrate the test case names defined in the
+ * additionalTCs.xml file into the complete list of test case names for execution by the driver.
+ */
+public class V2ResponseTests_SIG_EventResponse implements Portlet {
+ private static final String LOG_CLASS =
+ V2ResponseTests_SIG_EventResponse.class.getName();
+ private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
+
+ private PortletConfig portletConfig = null;
+
+ @Override
+ public void init(PortletConfig config) throws PortletException {
+ this.portletConfig = config;
+ }
+
+ @Override
+ public void destroy() {
+ }
+
+ @Override
+ public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
+ throws PortletException, IOException {
+ }
+
+ @Override
+ public void render(RenderRequest renderRequest, RenderResponse renderResponse)
+ throws PortletException, IOException {
+
+ if (LOGGER.isLoggable(Level.FINE)) {
+ LOGGER.logp(Level.FINE, LOG_CLASS, "render", "Entry");
+ }
+
+ PrintWriter writer = renderResponse.getWriter();
+ JSR286ApiTestCaseDetails tcd = new JSR286ApiTestCaseDetails();
+ ClassChecker cc = new ClassChecker(EventResponseWrapper.class);
+
+ // Create result objects for the tests
+
+ /* TestCase: EventResponse_SIG_implementsStateAwareResponse */
+ /* Details: "Implements StateAwareResponse " */
+ TestResult tr0 = tcd.getTestResultFailed(EVENTRESPONSE_SIG_IMPLEMENTSSTATEAWARERESPONSE);
+ {
+ tr0.setTcSuccess(cc.implementsInterface(StateAwareResponse.class));
+ }
+
+ /* TestCase: EventResponse_SIG_hasSetRenderParameters */
+ /* Details: "Has a setRenderParameters(EventRequest) method " */
+ TestResult tr1 = tcd.getTestResultFailed(EVENTRESPONSE_SIG_HASSETRENDERPARAMETERS);
+ {
+ String name = "setRenderParameters";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = {EventRequest.class};
+ tr1.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: EventResponse_SIG_hasSetRenderParametersReturns */
+ /* Details: "Method setRenderParameters(EventRequest) returns void " */
+ TestResult tr2 = tcd.getTestResultFailed(EVENTRESPONSE_SIG_HASSETRENDERPARAMETERSRETURNS);
+ {
+ String name = "setRenderParameters";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {EventRequest.class};
+ tr2.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+
+
+ // Write the results to the output stream
+
+ tr0.writeTo(writer);
+ tr1.writeTo(writer);
+ tr2.writeTo(writer);
+
+
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_SIG_MimeResponse.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_SIG_MimeResponse.java b/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_SIG_MimeResponse.java
new file mode 100644
index 0000000..dd13e40
--- /dev/null
+++ b/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_SIG_MimeResponse.java
@@ -0,0 +1,511 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.portlet.tck.ResponseTests.portlets;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.portlet.*;
+import javax.portlet.filter.*;
+import javax.portlet.tck.beans.ClassChecker;
+import javax.portlet.tck.beans.TestCaseDetails;
+import javax.portlet.tck.beans.JSR286ApiTestCaseDetails;
+import static javax.portlet.tck.beans.JSR286ApiTestCaseDetails.*;
+import javax.portlet.tck.beans.TestResult;
+
+/**
+ * This portlet implements several test cases for the JSR 362 TCK. The test case names
+ * are defined in the /src/main/resources/xml-resources/additionalTCs.xml
+ * file. The build process will integrate the test case names defined in the
+ * additionalTCs.xml file into the complete list of test case names for execution by the driver.
+ */
+public class V2ResponseTests_SIG_MimeResponse implements Portlet {
+ private static final String LOG_CLASS =
+ V2ResponseTests_SIG_MimeResponse.class.getName();
+ private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
+
+ private PortletConfig portletConfig = null;
+
+ @Override
+ public void init(PortletConfig config) throws PortletException {
+ this.portletConfig = config;
+ }
+
+ @Override
+ public void destroy() {
+ }
+
+ @Override
+ public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
+ throws PortletException, IOException {
+ }
+
+ @Override
+ public void render(RenderRequest renderRequest, RenderResponse renderResponse)
+ throws PortletException, IOException {
+
+ if (LOGGER.isLoggable(Level.FINE)) {
+ LOGGER.logp(Level.FINE, LOG_CLASS, "render", "Entry");
+ }
+
+ PrintWriter writer = renderResponse.getWriter();
+ JSR286ApiTestCaseDetails tcd = new JSR286ApiTestCaseDetails();
+ ClassChecker cc = new ClassChecker(renderResponse.getClass());
+
+ // Create result objects for the tests
+
+ /* TestCase: MimeResponse_SIG_implementsPortletResponse */
+ /* Details: "Implements PortletResponse " */
+ TestResult tr0 = tcd.getTestResultFailed(MIMERESPONSE_SIG_IMPLEMENTSPORTLETRESPONSE);
+ {
+ tr0.setTcSuccess(cc.implementsInterface(PortletResponse.class));
+ }
+
+ /* TestCase: MimeResponse_SIG_fieldEXPIRATION_CACHE */
+ /* Details: "Has String field EXPIRATION_CACHE " */
+ TestResult tr1 = tcd.getTestResultFailed(MIMERESPONSE_SIG_FIELDEXPIRATION_CACHE);
+ {
+ tr1.setTcSuccess(cc.hasField("EXPIRATION_CACHE"));
+ }
+
+ /* TestCase: MimeResponse_SIG_fieldCACHE_SCOPE */
+ /* Details: "Has String field CACHE_SCOPE " */
+ TestResult tr2 = tcd.getTestResultFailed(MIMERESPONSE_SIG_FIELDCACHE_SCOPE);
+ {
+ tr2.setTcSuccess(cc.hasField("CACHE_SCOPE"));
+ }
+
+ /* TestCase: MimeResponse_SIG_fieldPUBLIC_SCOPE */
+ /* Details: "Has String field PUBLIC_SCOPE " */
+ TestResult tr3 = tcd.getTestResultFailed(MIMERESPONSE_SIG_FIELDPUBLIC_SCOPE);
+ {
+ tr3.setTcSuccess(cc.hasField("PUBLIC_SCOPE"));
+ }
+
+ /* TestCase: MimeResponse_SIG_fieldPRIVATE_SCOPE */
+ /* Details: "Has String field PRIVATE_SCOPE " */
+ TestResult tr4 = tcd.getTestResultFailed(MIMERESPONSE_SIG_FIELDPRIVATE_SCOPE);
+ {
+ tr4.setTcSuccess(cc.hasField("PRIVATE_SCOPE"));
+ }
+
+ /* TestCase: MimeResponse_SIG_fieldETAG */
+ /* Details: "Has String field ETAG " */
+ TestResult tr5 = tcd.getTestResultFailed(MIMERESPONSE_SIG_FIELDETAG);
+ {
+ tr5.setTcSuccess(cc.hasField("ETAG"));
+ }
+
+ /* TestCase: MimeResponse_SIG_fieldUSE_CACHED_CONTENT */
+ /* Details: "Has String field USE_CACHED_CONTENT " */
+ TestResult tr6 = tcd.getTestResultFailed(MIMERESPONSE_SIG_FIELDUSE_CACHED_CONTENT);
+ {
+ tr6.setTcSuccess(cc.hasField("USE_CACHED_CONTENT"));
+ }
+
+ /* TestCase: MimeResponse_SIG_fieldNAMESPACED_RESPONSE */
+ /* Details: "Has String field NAMESPACED_RESPONSE " */
+ TestResult tr7 = tcd.getTestResultFailed(MIMERESPONSE_SIG_FIELDNAMESPACED_RESPONSE);
+ {
+ tr7.setTcSuccess(cc.hasField("NAMESPACED_RESPONSE"));
+ }
+
+ /* TestCase: MimeResponse_SIG_fieldMARKUP_HEAD_ELEMENT */
+ /* Details: "Has String field MARKUP_HEAD_ELEMENT " */
+ TestResult tr8 = tcd.getTestResultFailed(MIMERESPONSE_SIG_FIELDMARKUP_HEAD_ELEMENT);
+ {
+ tr8.setTcSuccess(cc.hasField("MARKUP_HEAD_ELEMENT"));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasGetContentType */
+ /* Details: "Has a getContentType() method " */
+ TestResult tr9 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASGETCONTENTTYPE);
+ {
+ String name = "getContentType";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = null;
+ tr9.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasGetContentTypeReturns */
+ /* Details: "Method getContentType() returns String " */
+ TestResult tr10 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASGETCONTENTTYPERETURNS);
+ {
+ String name = "getContentType";
+ Class<?> retType = String.class;
+ Class<?>[] parms = null;
+ tr10.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasSetContentType */
+ /* Details: "Has a setContentType(String) method " */
+ TestResult tr11 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASSETCONTENTTYPE);
+ {
+ String name = "setContentType";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = {String.class};
+ tr11.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasSetContentTypeReturns */
+ /* Details: "Method setContentType(String) returns void " */
+ TestResult tr12 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASSETCONTENTTYPERETURNS);
+ {
+ String name = "setContentType";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {String.class};
+ tr12.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasGetCharacterEncoding */
+ /* Details: "Has a getCharacterEncoding() method " */
+ TestResult tr13 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASGETCHARACTERENCODING);
+ {
+ String name = "getCharacterEncoding";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = null;
+ tr13.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasGetCharacterEncodingReturns */
+ /* Details: "Method getCharacterEncoding() returns String " */
+ TestResult tr14 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASGETCHARACTERENCODINGRETURNS);
+ {
+ String name = "getCharacterEncoding";
+ Class<?> retType = String.class;
+ Class<?>[] parms = null;
+ tr14.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasGetWriter */
+ /* Details: "Has a getWriter() throws java.io.IOException, IllegalStateException method " */
+ TestResult tr15 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASGETWRITER);
+ {
+ String name = "getWriter";
+ Class<?>[] exceptions = {java.io.IOException.class, IllegalStateException.class};
+ Class<?>[] parms = null;
+ tr15.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasGetWriterReturns */
+ /* Details: "Method getWriter() returns java.io.PrintWriter " */
+ TestResult tr16 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASGETWRITERRETURNS);
+ {
+ String name = "getWriter";
+ Class<?> retType = java.io.PrintWriter.class;
+ Class<?>[] parms = null;
+ tr16.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasGetLocale */
+ /* Details: "Has a getLocale() method " */
+ TestResult tr17 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASGETLOCALE);
+ {
+ String name = "getLocale";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = null;
+ tr17.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasGetLocaleReturns */
+ /* Details: "Method getLocale() returns java.util.Locale " */
+ TestResult tr18 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASGETLOCALERETURNS);
+ {
+ String name = "getLocale";
+ Class<?> retType = java.util.Locale.class;
+ Class<?>[] parms = null;
+ tr18.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasSetBufferSize */
+ /* Details: "Has a setBufferSize(int) method " */
+ TestResult tr19 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASSETBUFFERSIZE);
+ {
+ String name = "setBufferSize";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = {int.class};
+ tr19.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasSetBufferSizeReturns */
+ /* Details: "Method setBufferSize(int) returns void " */
+ TestResult tr20 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASSETBUFFERSIZERETURNS);
+ {
+ String name = "setBufferSize";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {int.class};
+ tr20.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasGetBufferSize */
+ /* Details: "Has a getBufferSize() method " */
+ TestResult tr21 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASGETBUFFERSIZE);
+ {
+ String name = "getBufferSize";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = null;
+ tr21.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasGetBufferSizeReturns */
+ /* Details: "Method getBufferSize() returns int " */
+ TestResult tr22 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASGETBUFFERSIZERETURNS);
+ {
+ String name = "getBufferSize";
+ Class<?> retType = int.class;
+ Class<?>[] parms = null;
+ tr22.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasFlushBuffer */
+ /* Details: "Has a flushBuffer() throws java.io.IOException method " */
+ TestResult tr23 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASFLUSHBUFFER);
+ {
+ String name = "flushBuffer";
+ Class<?>[] exceptions = {java.io.IOException.class};
+ Class<?>[] parms = null;
+ tr23.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasFlushBufferReturns */
+ /* Details: "Method flushBuffer() returns void " */
+ TestResult tr24 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASFLUSHBUFFERRETURNS);
+ {
+ String name = "flushBuffer";
+ Class<?> retType = void.class;
+ Class<?>[] parms = null;
+ tr24.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasResetBuffer */
+ /* Details: "Has a resetBuffer() method " */
+ TestResult tr25 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASRESETBUFFER);
+ {
+ String name = "resetBuffer";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = null;
+ tr25.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasResetBufferReturns */
+ /* Details: "Method resetBuffer() returns void " */
+ TestResult tr26 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASRESETBUFFERRETURNS);
+ {
+ String name = "resetBuffer";
+ Class<?> retType = void.class;
+ Class<?>[] parms = null;
+ tr26.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasIsCommitted */
+ /* Details: "Has a isCommitted() method " */
+ TestResult tr27 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASISCOMMITTED);
+ {
+ String name = "isCommitted";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = null;
+ tr27.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasIsCommittedReturns */
+ /* Details: "Method isCommitted() returns boolean " */
+ TestResult tr28 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASISCOMMITTEDRETURNS);
+ {
+ String name = "isCommitted";
+ Class<?> retType = boolean.class;
+ Class<?>[] parms = null;
+ tr28.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasReset */
+ /* Details: "Has a reset() method " */
+ TestResult tr29 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASRESET);
+ {
+ String name = "reset";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = null;
+ tr29.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasResetReturns */
+ /* Details: "Method reset() returns void " */
+ TestResult tr30 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASRESETRETURNS);
+ {
+ String name = "reset";
+ Class<?> retType = void.class;
+ Class<?>[] parms = null;
+ tr30.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasGetPortletOutputStream */
+ /* Details: "Has a getPortletOutputStream() throws java.io.IOException, IllegalStateException method " */
+ TestResult tr31 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASGETPORTLETOUTPUTSTREAM);
+ {
+ String name = "getPortletOutputStream";
+ Class<?>[] exceptions = {java.io.IOException.class, IllegalStateException.class};
+ Class<?>[] parms = null;
+ tr31.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasGetPortletOutputStreamReturns */
+ /* Details: "Method getPortletOutputStream() returns java.io.OutputStream " */
+ TestResult tr32 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASGETPORTLETOUTPUTSTREAMRETURNS);
+ {
+ String name = "getPortletOutputStream";
+ Class<?> retType = java.io.OutputStream.class;
+ Class<?>[] parms = null;
+ tr32.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasCreateRenderURL */
+ /* Details: "Has a createRenderURL() method " */
+ TestResult tr33 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASCREATERENDERURL);
+ {
+ String name = "createRenderURL";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = null;
+ tr33.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasCreateRenderURLReturns */
+ /* Details: "Method createRenderURL() returns PortletURL " */
+ TestResult tr34 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASCREATERENDERURLRETURNS);
+ {
+ String name = "createRenderURL";
+ Class<?> retType = PortletURL.class;
+ Class<?>[] parms = null;
+ tr34.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasCreateActionURL */
+ /* Details: "Has a createActionURL() method " */
+ TestResult tr35 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASCREATEACTIONURL);
+ {
+ String name = "createActionURL";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = null;
+ tr35.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasCreateActionURLReturns */
+ /* Details: "Method createActionURL() returns PortletURL " */
+ TestResult tr36 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASCREATEACTIONURLRETURNS);
+ {
+ String name = "createActionURL";
+ Class<?> retType = PortletURL.class;
+ Class<?>[] parms = null;
+ tr36.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasCreateResourceURL */
+ /* Details: "Has a createResourceURL() method " */
+ TestResult tr37 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASCREATERESOURCEURL);
+ {
+ String name = "createResourceURL";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = null;
+ tr37.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasCreateResourceURLReturns */
+ /* Details: "Method createResourceURL() returns ResourceURL " */
+ TestResult tr38 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASCREATERESOURCEURLRETURNS);
+ {
+ String name = "createResourceURL";
+ Class<?> retType = ResourceURL.class;
+ Class<?>[] parms = null;
+ tr38.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasGetCacheControl */
+ /* Details: "Has a getCacheControl() method " */
+ TestResult tr39 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASGETCACHECONTROL);
+ {
+ String name = "getCacheControl";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = null;
+ tr39.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: MimeResponse_SIG_hasGetCacheControlReturns */
+ /* Details: "Method getCacheControl() returns CacheControl " */
+ TestResult tr40 = tcd.getTestResultFailed(MIMERESPONSE_SIG_HASGETCACHECONTROLRETURNS);
+ {
+ String name = "getCacheControl";
+ Class<?> retType = CacheControl.class;
+ Class<?>[] parms = null;
+ tr40.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+
+
+ // Write the results to the output stream
+
+ tr0.writeTo(writer);
+ tr1.writeTo(writer);
+ tr2.writeTo(writer);
+ tr3.writeTo(writer);
+ tr4.writeTo(writer);
+ tr5.writeTo(writer);
+ tr6.writeTo(writer);
+ tr7.writeTo(writer);
+ tr8.writeTo(writer);
+ tr9.writeTo(writer);
+ tr10.writeTo(writer);
+ tr11.writeTo(writer);
+ tr12.writeTo(writer);
+ tr13.writeTo(writer);
+ tr14.writeTo(writer);
+ tr15.writeTo(writer);
+ tr16.writeTo(writer);
+ tr17.writeTo(writer);
+ tr18.writeTo(writer);
+ tr19.writeTo(writer);
+ tr20.writeTo(writer);
+ tr21.writeTo(writer);
+ tr22.writeTo(writer);
+ tr23.writeTo(writer);
+ tr24.writeTo(writer);
+ tr25.writeTo(writer);
+ tr26.writeTo(writer);
+ tr27.writeTo(writer);
+ tr28.writeTo(writer);
+ tr29.writeTo(writer);
+ tr30.writeTo(writer);
+ tr31.writeTo(writer);
+ tr32.writeTo(writer);
+ tr33.writeTo(writer);
+ tr34.writeTo(writer);
+ tr35.writeTo(writer);
+ tr36.writeTo(writer);
+ tr37.writeTo(writer);
+ tr38.writeTo(writer);
+ tr39.writeTo(writer);
+ tr40.writeTo(writer);
+
+
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_SIG_PortletResponse.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_SIG_PortletResponse.java b/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_SIG_PortletResponse.java
new file mode 100644
index 0000000..c307e4d
--- /dev/null
+++ b/portlet-tck_3.0/V2ResponseTests/src/main/java/javax/portlet/tck/ResponseTests/portlets/V2ResponseTests_SIG_PortletResponse.java
@@ -0,0 +1,241 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package javax.portlet.tck.ResponseTests.portlets;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.portlet.*;
+import javax.portlet.filter.*;
+import javax.portlet.tck.beans.ClassChecker;
+import javax.portlet.tck.beans.TestCaseDetails;
+import javax.portlet.tck.beans.JSR286ApiTestCaseDetails;
+import static javax.portlet.tck.beans.JSR286ApiTestCaseDetails.*;
+import javax.portlet.tck.beans.TestResult;
+
+/**
+ * This portlet implements several test cases for the JSR 362 TCK. The test case names
+ * are defined in the /src/main/resources/xml-resources/additionalTCs.xml
+ * file. The build process will integrate the test case names defined in the
+ * additionalTCs.xml file into the complete list of test case names for execution by the driver.
+ */
+public class V2ResponseTests_SIG_PortletResponse implements Portlet {
+ private static final String LOG_CLASS =
+ V2ResponseTests_SIG_PortletResponse.class.getName();
+ private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
+
+ private PortletConfig portletConfig = null;
+
+ @Override
+ public void init(PortletConfig config) throws PortletException {
+ this.portletConfig = config;
+ }
+
+ @Override
+ public void destroy() {
+ }
+
+ @Override
+ public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
+ throws PortletException, IOException {
+ }
+
+ @Override
+ public void render(RenderRequest renderRequest, RenderResponse renderResponse)
+ throws PortletException, IOException {
+
+ if (LOGGER.isLoggable(Level.FINE)) {
+ LOGGER.logp(Level.FINE, LOG_CLASS, "render", "Entry");
+ }
+
+ PrintWriter writer = renderResponse.getWriter();
+ JSR286ApiTestCaseDetails tcd = new JSR286ApiTestCaseDetails();
+ ClassChecker cc = new ClassChecker(renderResponse.getClass());
+
+ // Create result objects for the tests
+
+ /* TestCase: PortletResponse_SIG_hasAddProperty */
+ /* Details: "Has a addProperty(String, String) method " */
+ TestResult tr0 = tcd.getTestResultFailed(PORTLETRESPONSE_SIG_HASADDPROPERTY);
+ {
+ String name = "addProperty";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = {String.class, String.class};
+ tr0.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: PortletResponse_SIG_hasAddPropertyReturns */
+ /* Details: "Method addProperty(String, String) returns void " */
+ TestResult tr1 = tcd.getTestResultFailed(PORTLETRESPONSE_SIG_HASADDPROPERTYRETURNS);
+ {
+ String name = "addProperty";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {String.class, String.class};
+ tr1.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: PortletResponse_SIG_hasSetProperty */
+ /* Details: "Has a setProperty(String, String) method " */
+ TestResult tr2 = tcd.getTestResultFailed(PORTLETRESPONSE_SIG_HASSETPROPERTY);
+ {
+ String name = "setProperty";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = {String.class, String.class};
+ tr2.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: PortletResponse_SIG_hasSetPropertyReturns */
+ /* Details: "Method setProperty(String, String) returns void " */
+ TestResult tr3 = tcd.getTestResultFailed(PORTLETRESPONSE_SIG_HASSETPROPERTYRETURNS);
+ {
+ String name = "setProperty";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {String.class, String.class};
+ tr3.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: PortletResponse_SIG_hasEncodeURL */
+ /* Details: "Has a encodeURL(String) method " */
+ TestResult tr4 = tcd.getTestResultFailed(PORTLETRESPONSE_SIG_HASENCODEURL);
+ {
+ String name = "encodeURL";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = {String.class};
+ tr4.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: PortletResponse_SIG_hasEncodeURLReturns */
+ /* Details: "Method encodeURL(String) returns String " */
+ TestResult tr5 = tcd.getTestResultFailed(PORTLETRESPONSE_SIG_HASENCODEURLRETURNS);
+ {
+ String name = "encodeURL";
+ Class<?> retType = String.class;
+ Class<?>[] parms = {String.class};
+ tr5.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: PortletResponse_SIG_hasGetNamespace */
+ /* Details: "Has a getNamespace() method " */
+ TestResult tr6 = tcd.getTestResultFailed(PORTLETRESPONSE_SIG_HASGETNAMESPACE);
+ {
+ String name = "getNamespace";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = null;
+ tr6.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: PortletResponse_SIG_hasGetNamespaceReturns */
+ /* Details: "Method getNamespace() returns String " */
+ TestResult tr7 = tcd.getTestResultFailed(PORTLETRESPONSE_SIG_HASGETNAMESPACERETURNS);
+ {
+ String name = "getNamespace";
+ Class<?> retType = String.class;
+ Class<?>[] parms = null;
+ tr7.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: PortletResponse_SIG_hasAddPropertyA */
+ /* Details: "Has a addProperty(javax.servlet.http.Cookie) method " */
+ TestResult tr8 = tcd.getTestResultFailed(PORTLETRESPONSE_SIG_HASADDPROPERTYA);
+ {
+ String name = "addProperty";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = {javax.servlet.http.Cookie.class};
+ tr8.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: PortletResponse_SIG_hasAddPropertyReturnsA */
+ /* Details: "Method addProperty(javax.servlet.http.Cookie) returns void " */
+ TestResult tr9 = tcd.getTestResultFailed(PORTLETRESPONSE_SIG_HASADDPROPERTYRETURNSA);
+ {
+ String name = "addProperty";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {javax.servlet.http.Cookie.class};
+ tr9.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: PortletResponse_SIG_hasAddPropertyB */
+ /* Details: "Has a addProperty(String, org.w3c.dom.Element) method " */
+ TestResult tr10 = tcd.getTestResultFailed(PORTLETRESPONSE_SIG_HASADDPROPERTYB);
+ {
+ String name = "addProperty";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = {String.class, org.w3c.dom.Element.class};
+ tr10.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: PortletResponse_SIG_hasAddPropertyReturnsB */
+ /* Details: "Method addProperty(String, org.w3c.dom.Element) returns void " */
+ TestResult tr11 = tcd.getTestResultFailed(PORTLETRESPONSE_SIG_HASADDPROPERTYRETURNSB);
+ {
+ String name = "addProperty";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {String.class, org.w3c.dom.Element.class};
+ tr11.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: PortletResponse_SIG_hasCreateElement */
+ /* Details: "Has a createElement(String) throws org.w3c.dom.DOMException method " */
+ TestResult tr12 = tcd.getTestResultFailed(PORTLETRESPONSE_SIG_HASCREATEELEMENT);
+ {
+ String name = "createElement";
+ Class<?>[] exceptions = {org.w3c.dom.DOMException.class};
+ Class<?>[] parms = {String.class};
+ tr12.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: PortletResponse_SIG_hasCreateElementReturns */
+ /* Details: "Method createElement(String) returns org.w3c.dom.Element " */
+ TestResult tr13 = tcd.getTestResultFailed(PORTLETRESPONSE_SIG_HASCREATEELEMENTRETURNS);
+ {
+ String name = "createElement";
+ Class<?> retType = org.w3c.dom.Element.class;
+ Class<?>[] parms = {String.class};
+ tr13.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+
+
+ // Write the results to the output stream
+
+ tr0.writeTo(writer);
+ tr1.writeTo(writer);
+ tr2.writeTo(writer);
+ tr3.writeTo(writer);
+ tr4.writeTo(writer);
+ tr5.writeTo(writer);
+ tr6.writeTo(writer);
+ tr7.writeTo(writer);
+ tr8.writeTo(writer);
+ tr9.writeTo(writer);
+ tr10.writeTo(writer);
+ tr11.writeTo(writer);
+ tr12.writeTo(writer);
+ tr13.writeTo(writer);
+
+
+ }
+
+}
+