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:45 UTC
[09/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/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2ResponseTests/src/main/webapp/WEB-INF/web.xml b/portlet-tck_3.0/V2ResponseTests/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..bf9855b
--- /dev/null
+++ b/portlet-tck_3.0/V2ResponseTests/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>javax.portlet-tck-ResponseTests</display-name>
+</web-app>
+
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2URLTests/pom.xml
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2URLTests/pom.xml b/portlet-tck_3.0/V2URLTests/pom.xml
new file mode 100644
index 0000000..0192aba
--- /dev/null
+++ b/portlet-tck_3.0/V2URLTests/pom.xml
@@ -0,0 +1,120 @@
+<!--
+ 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>javax.portlet</groupId>
+ <artifactId>tck</artifactId>
+ <version>3.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>tck-V2URLTests</artifactId>
+ <packaging>war</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.portlet</groupId>
+ <artifactId>portlet-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.portlet</groupId>
+ <artifactId>tck-common</artifactId>
+ <version>${project.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+
+ <properties>
+
+ <!-- This project contains additional test cases to run with the portlets -->
+ <additional.testcase.uri>file:///${basedir}/src/main/resources/xml-resources/additionalTCs.xml</additional.testcase.uri>
+
+ <!-- Set to true for modules that define all test cases in a file (TCs are not generated from the portlet.xml) -->
+ <additional.testcases.only>true</additional.testcases.only>
+
+ </properties>
+
+ <build>
+ <finalName>${project.artifactId}</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ </plugin>
+ <!-- Transform the portlet XML into test properties XML file -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>xml-maven-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+
+ <profiles>
+ <profile>
+ <id>pluto</id>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>taglibs</groupId>
+ <artifactId>standard</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
+ </configuration>
+ </plugin>
+ <!-- bind 'pluto:assemble' goal to 'generate-resources' lifecycle -->
+ <plugin>
+ <groupId>org.apache.portals.pluto</groupId>
+ <artifactId>maven-pluto-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>assemble</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_BaseURL.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_BaseURL.java b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_BaseURL.java
new file mode 100644
index 0000000..ea74a40
--- /dev/null
+++ b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_BaseURL.java
@@ -0,0 +1,411 @@
+/* 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.URLTests.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 V2URLTests_BaseURL implements Portlet {
+ private static final String LOG_CLASS =
+ V2URLTests_BaseURL.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.createRenderURL().getClass());
+
+ // Create result objects for the tests
+
+ /* TestCase: BaseURL_setParameterA1 */
+ /* Details: "Sets the parameter value for the specified name" */
+ TestResult tr0 = tcd.getTestResultFailed(BASEURL_SETPARAMETERA1);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameterA2 */
+ /* Details: "For a render URL, a private parameter can be set" */
+ TestResult tr1 = tcd.getTestResultFailed(BASEURL_SETPARAMETERA2);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameterA3 */
+ /* Details: "For a render URL, a public parameter can be set" */
+ TestResult tr2 = tcd.getTestResultFailed(BASEURL_SETPARAMETERA3);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameterA4 */
+ /* Details: "For an action URL, an action parameter can be set" */
+ TestResult tr3 = tcd.getTestResultFailed(BASEURL_SETPARAMETERA4);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameterA5 */
+ /* Details: "For a resource URL, a resource parameter can be set" */
+ TestResult tr4 = tcd.getTestResultFailed(BASEURL_SETPARAMETERA5);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameterA6 */
+ /* Details: "All previously existing values for the specified key are removed" */
+ TestResult tr5 = tcd.getTestResultFailed(BASEURL_SETPARAMETERA6);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameterA7 */
+ /* Details: "If the value is null, all values for the specified key are removed" */
+ TestResult tr6 = tcd.getTestResultFailed(BASEURL_SETPARAMETERA7);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameterA8 */
+ /* Details: "Throws IllegalArgumentException if the name is null" */
+ TestResult tr7 = tcd.getTestResultFailed(BASEURL_SETPARAMETERA8);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameterB1 */
+ /* Details: "Sets the parameter value array for the specified name" */
+ TestResult tr8 = tcd.getTestResultFailed(BASEURL_SETPARAMETERB1);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameterB2 */
+ /* Details: "For a render URL, a private parameter can be set" */
+ TestResult tr9 = tcd.getTestResultFailed(BASEURL_SETPARAMETERB2);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameterB3 */
+ /* Details: "For a render URL, a public parameter can be set" */
+ TestResult tr10 = tcd.getTestResultFailed(BASEURL_SETPARAMETERB3);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameterB4 */
+ /* Details: "For an action URL, an action parameter can be set" */
+ TestResult tr11 = tcd.getTestResultFailed(BASEURL_SETPARAMETERB4);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameterB5 */
+ /* Details: "For a resource URL, a resource parameter can be set" */
+ TestResult tr12 = tcd.getTestResultFailed(BASEURL_SETPARAMETERB5);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameterB6 */
+ /* Details: "All previously existing values for the specified key are removed" */
+ TestResult tr13 = tcd.getTestResultFailed(BASEURL_SETPARAMETERB6);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameterB7 */
+ /* Details: "If the value is null, all values for the specified key are removed" */
+ TestResult tr14 = tcd.getTestResultFailed(BASEURL_SETPARAMETERB7);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameterB8 */
+ /* Details: "Throws IllegalArgumentException if the name is null" */
+ TestResult tr15 = tcd.getTestResultFailed(BASEURL_SETPARAMETERB8);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameters1 */
+ /* Details: "Sets the parameter map to the specified value" */
+ TestResult tr16 = tcd.getTestResultFailed(BASEURL_SETPARAMETERS1);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameters2 */
+ /* Details: "For a render URL, public parameters can be set through the map" */
+ TestResult tr17 = tcd.getTestResultFailed(BASEURL_SETPARAMETERS2);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameters3 */
+ /* Details: "For a render URL, private parameters can be set through the map" */
+ TestResult tr18 = tcd.getTestResultFailed(BASEURL_SETPARAMETERS3);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameters4 */
+ /* Details: "For an action URL, action parameters can be set through the map" */
+ TestResult tr19 = tcd.getTestResultFailed(BASEURL_SETPARAMETERS4);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameters5 */
+ /* Details: "For a resource URL, resource parameters can be set through the map" */
+ TestResult tr20 = tcd.getTestResultFailed(BASEURL_SETPARAMETERS5);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameters6 */
+ /* Details: "Previously existing private, action, or resource parameters not contained in the specified input map are removed" */
+ TestResult tr21 = tcd.getTestResultFailed(BASEURL_SETPARAMETERS6);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameters7 */
+ /* Details: "Previously existing public parameters not contained in the specified input map remain unchanged" */
+ TestResult tr22 = tcd.getTestResultFailed(BASEURL_SETPARAMETERS7);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameters8 */
+ /* Details: "Parameters that are set are available in requests initiated through the URL" */
+ TestResult tr23 = tcd.getTestResultFailed(BASEURL_SETPARAMETERS8);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameters9 */
+ /* Details: "Throws IllegalArgumentException if the input map is null" */
+ TestResult tr24 = tcd.getTestResultFailed(BASEURL_SETPARAMETERS9);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameters10 */
+ /* Details: "Throws IllegalArgumentException if any key in the map is null" */
+ TestResult tr25 = tcd.getTestResultFailed(BASEURL_SETPARAMETERS10);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameters11 */
+ /* Details: "Throws IllegalArgumentException if any key in the map is the empty string (\"\") " */
+ TestResult tr26 = tcd.getTestResultFailed(BASEURL_SETPARAMETERS11);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameters12 */
+ /* Details: "Throws IllegalArgumentException if the values array for any key is null " */
+ TestResult tr27 = tcd.getTestResultFailed(BASEURL_SETPARAMETERS12);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameters13 */
+ /* Details: "Throws IllegalArgumentException if any element in any values array is null " */
+ TestResult tr28 = tcd.getTestResultFailed(BASEURL_SETPARAMETERS13);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setParameters14 */
+ /* Details: "Throws IllegalStateException if the method is invoked after the sendRedirect method has been called" */
+ TestResult tr29 = tcd.getTestResultFailed(BASEURL_SETPARAMETERS14);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setSecure1 */
+ /* Details: "Returns void" */
+ TestResult tr30 = tcd.getTestResultFailed(BASEURL_SETSECURE1);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setSecure2 */
+ /* Details: "If the input parameter is true, the resulting URL uses a secure connection (HTTPS)" */
+ TestResult tr31 = tcd.getTestResultFailed(BASEURL_SETSECURE2);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setSecure3 */
+ /* Details: "If the input parameter is false, the resulting URL can use either a secure or non-secure connection" */
+ TestResult tr32 = tcd.getTestResultFailed(BASEURL_SETSECURE3);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setSecure4 */
+ /* Details: "Throws a PortletSecurityException if the run-time environment does not support the setting" */
+ TestResult tr33 = tcd.getTestResultFailed(BASEURL_SETSECURE4);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_toString */
+ /* Details: "Returns a String containing the portlet URL representation to be included in the markup" */
+ TestResult tr34 = tcd.getTestResultFailed(BASEURL_TOSTRING);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_getParameterMap1 */
+ /* Details: "Returns an java.util.Map<java.lang.String,java.lang.String[]> object for the parameter names and values if parameters are available" */
+ TestResult tr35 = tcd.getTestResultFailed(BASEURL_GETPARAMETERMAP1);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_getParameterMap2 */
+ /* Details: "For a render URL, the returned map contains all public and private parameters for the request" */
+ TestResult tr36 = tcd.getTestResultFailed(BASEURL_GETPARAMETERMAP2);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_getParameterMap3 */
+ /* Details: "For an action URL, the returned map contains all action parameters for the request" */
+ TestResult tr37 = tcd.getTestResultFailed(BASEURL_GETPARAMETERMAP3);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_getParameterMap4 */
+ /* Details: "For a resource URL, the returned map contains all resource parameters for the request" */
+ TestResult tr38 = tcd.getTestResultFailed(BASEURL_GETPARAMETERMAP4);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_getParameterMap5 */
+ /* Details: "For a resource URL, the returned map does not contain any render parameters for the request" */
+ TestResult tr39 = tcd.getTestResultFailed(BASEURL_GETPARAMETERMAP5);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_getParameterMap6 */
+ /* Details: "Returns an empty map if no parameters exist" */
+ TestResult tr40 = tcd.getTestResultFailed(BASEURL_GETPARAMETERMAP6);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_writeA1 */
+ /* Details: "Writes the URL to the output stream through the provided Writer" */
+ TestResult tr41 = tcd.getTestResultFailed(BASEURL_WRITEA1);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_writeA2 */
+ /* Details: "The written URL is XML escaped (although it may be a token rather than a valid URL)" */
+ TestResult tr42 = tcd.getTestResultFailed(BASEURL_WRITEA2);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_writeA3 */
+ /* Details: "Throws IOException if an error occurs during IO " */
+ TestResult tr43 = tcd.getTestResultFailed(BASEURL_WRITEA3);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_writeB1 */
+ /* Details: "Writes the URL to the output stream through the provided Writer" */
+ TestResult tr44 = tcd.getTestResultFailed(BASEURL_WRITEB1);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_writeB2 */
+ /* Details: "If the escapeXML parameter is true, the written URL is XML escaped (although it may be a token rather than a valid URL)" */
+ TestResult tr45 = tcd.getTestResultFailed(BASEURL_WRITEB2);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_writeB3 */
+ /* Details: "If the escapeXML parameter is false, no excaping is performed" */
+ TestResult tr46 = tcd.getTestResultFailed(BASEURL_WRITEB3);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_writeB4 */
+ /* Details: "Throws IOException if an error occurs during IO " */
+ TestResult tr47 = tcd.getTestResultFailed(BASEURL_WRITEB4);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_addProperty1 */
+ /* Details: "Adds a property value to an existing key" */
+ TestResult tr48 = tcd.getTestResultFailed(BASEURL_ADDPROPERTY1);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_addProperty2 */
+ /* Details: "Existing property values for the key are retained" */
+ TestResult tr49 = tcd.getTestResultFailed(BASEURL_ADDPROPERTY2);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_addProperty3 */
+ /* Details: "Throws IllegalArgumentException if the specified key is null" */
+ TestResult tr50 = tcd.getTestResultFailed(BASEURL_ADDPROPERTY3);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setProperty1 */
+ /* Details: "Sets a property value for the specified key" */
+ TestResult tr51 = tcd.getTestResultFailed(BASEURL_SETPROPERTY1);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setProperty2 */
+ /* Details: "Resets any existing property values for the specified key" */
+ TestResult tr52 = tcd.getTestResultFailed(BASEURL_SETPROPERTY2);
+ /* TODO: implement test */
+
+ /* TestCase: BaseURL_setProperty3 */
+ /* Details: "Throws IllegalArgumentException if the specified key is null" */
+ TestResult tr53 = tcd.getTestResultFailed(BASEURL_SETPROPERTY3);
+ /* 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);
+ tr39.writeTo(writer);
+ tr40.writeTo(writer);
+ tr41.writeTo(writer);
+ tr42.writeTo(writer);
+ tr43.writeTo(writer);
+ tr44.writeTo(writer);
+ tr45.writeTo(writer);
+ tr46.writeTo(writer);
+ tr47.writeTo(writer);
+ tr48.writeTo(writer);
+ tr49.writeTo(writer);
+ tr50.writeTo(writer);
+ tr51.writeTo(writer);
+ tr52.writeTo(writer);
+ tr53.writeTo(writer);
+
+
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_PortletURL.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_PortletURL.java b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_PortletURL.java
new file mode 100644
index 0000000..4ad272e
--- /dev/null
+++ b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_PortletURL.java
@@ -0,0 +1,177 @@
+/* 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.URLTests.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 V2URLTests_PortletURL implements Portlet {
+ private static final String LOG_CLASS =
+ V2URLTests_PortletURL.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.createRenderURL().getClass());
+
+ // Create result objects for the tests
+
+ /* TestCase: PortletURL_implementsBaseURL2 */
+ /* Details: "All tests described for the BaseURL execute correctly with the PortletURL" */
+ TestResult tr0 = tcd.getTestResultFailed(PORTLETURL_IMPLEMENTSBASEURL2);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURL_setWindowState1 */
+ /* Details: "Sets the WindowState to be used when the URL is activated" */
+ TestResult tr1 = tcd.getTestResultFailed(PORTLETURL_SETWINDOWSTATE1);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURL_setWindowState2 */
+ /* Details: "Throws WindowStateException if the portal does not support the specified Window State" */
+ TestResult tr2 = tcd.getTestResultFailed(PORTLETURL_SETWINDOWSTATE2);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURL_setWindowState3 */
+ /* Details: "Throws WindowStateException if the specified WindowState is not declared in the deployment descriptor" */
+ TestResult tr3 = tcd.getTestResultFailed(PORTLETURL_SETWINDOWSTATE3);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURL_setWindowState4 */
+ /* Details: "Throws WindowStateException if the user is not allowed to switch to the specified WindowState" */
+ TestResult tr4 = tcd.getTestResultFailed(PORTLETURL_SETWINDOWSTATE4);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURL_setPortletMode1 */
+ /* Details: "Sets the PortletMode to be used when the URL is activated" */
+ TestResult tr5 = tcd.getTestResultFailed(PORTLETURL_SETPORTLETMODE1);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURL_setPortletMode2 */
+ /* Details: "Throws PortletModeException if the portal does not support the specified Window State" */
+ TestResult tr6 = tcd.getTestResultFailed(PORTLETURL_SETPORTLETMODE2);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURL_setPortletMode3 */
+ /* Details: "Throws PortletModeException if the specified PortletMode is not declared in the deployment descriptor" */
+ TestResult tr7 = tcd.getTestResultFailed(PORTLETURL_SETPORTLETMODE3);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURL_setPortletMode4 */
+ /* Details: "Throws PortletModeException if the user is not allowed to switch to the specified PortletMode" */
+ TestResult tr8 = tcd.getTestResultFailed(PORTLETURL_SETPORTLETMODE4);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURL_getPortletMode1 */
+ /* Details: "Returns the PortletMode object set on the URL" */
+ TestResult tr9 = tcd.getTestResultFailed(PORTLETURL_GETPORTLETMODE1);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURL_getPortletMode2 */
+ /* Details: "Returns null if the PortletMode has not been set" */
+ TestResult tr10 = tcd.getTestResultFailed(PORTLETURL_GETPORTLETMODE2);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURL_getWindowState1 */
+ /* Details: "Returns the WindowState object set on the URL" */
+ TestResult tr11 = tcd.getTestResultFailed(PORTLETURL_GETWINDOWSTATE1);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURL_getWindowState2 */
+ /* Details: "Returns null if the Window State has not been set" */
+ TestResult tr12 = tcd.getTestResultFailed(PORTLETURL_GETWINDOWSTATE2);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURL_removePublicRenderParameter1 */
+ /* Details: "Removes the specified public render parameter" */
+ TestResult tr13 = tcd.getTestResultFailed(PORTLETURL_REMOVEPUBLICRENDERPARAMETER1);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURL_removePublicRenderParameter2 */
+ /* Details: "Throws IllegalArgumentException if the name is null" */
+ TestResult tr14 = tcd.getTestResultFailed(PORTLETURL_REMOVEPUBLICRENDERPARAMETER2);
+ /* 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);
+
+
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_PortletURLGenerationListener.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_PortletURLGenerationListener.java b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_PortletURLGenerationListener.java
new file mode 100644
index 0000000..2ff94f2
--- /dev/null
+++ b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_PortletURLGenerationListener.java
@@ -0,0 +1,171 @@
+/* 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.URLTests.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 V2URLTests_PortletURLGenerationListener implements Portlet {
+ private static final String LOG_CLASS =
+ V2URLTests_PortletURLGenerationListener.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(PortletURLGenerationListener.class);
+
+ // Create result objects for the tests
+
+ /* TestCase: PortletURLGenerationListener_configuration */
+ /* Details: "A PortletURLGenerationListener can be configured in the portlet deployment descriptor" */
+ TestResult tr0 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_CONFIGURATION);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURLGenerationListener_filterActionURL1 */
+ /* Details: "The filterActionURL(PortletURL) method is called before the toString or write methods are executed on an action URL" */
+ TestResult tr1 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_FILTERACTIONURL1);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURLGenerationListener_filterActionURL2 */
+ /* Details: "The filterActionURL method is passed the PortletURL object representing the action URL" */
+ TestResult tr2 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_FILTERACTIONURL2);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURLGenerationListener_filterActionURL3 */
+ /* Details: "The input action URL object can be modified by setting a parameter and the modified URL object is processed by the PortletURL toString or write method" */
+ TestResult tr3 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_FILTERACTIONURL3);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURLGenerationListener_filterActionURL4 */
+ /* Details: "The input action URL object can be modified by setting a property and the modified URL object is processed by the PortletURL toString or write method" */
+ TestResult tr4 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_FILTERACTIONURL4);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURLGenerationListener_filterRenderURL5 */
+ /* Details: "The filterRenderURL(PortletURL) method is called before the toString or write methods are executed on an action URL" */
+ TestResult tr5 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_FILTERRENDERURL5);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURLGenerationListener_filterRenderURL6 */
+ /* Details: "The filterRenderURL method is passed the PortletURL object representing the action URL" */
+ TestResult tr6 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_FILTERRENDERURL6);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURLGenerationListener_filterRenderURL7 */
+ /* Details: "The input action URL object can be modified by setting a parameter and the modified URL object is processed by the PortletURL toString or write method" */
+ TestResult tr7 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_FILTERRENDERURL7);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURLGenerationListener_filterRenderURL8 */
+ /* Details: "The input action URL object can be modified by setting a property and the modified URL object is processed by the PortletURL toString or write method" */
+ TestResult tr8 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_FILTERRENDERURL8);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURLGenerationListener_filterResourceURL1 */
+ /* Details: "The filterResourceURL(PortletURL) method is called before the toString or write methods are executed on an action URL" */
+ TestResult tr9 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_FILTERRESOURCEURL1);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURLGenerationListener_filterResourceURL2 */
+ /* Details: "The filterResourceURL method is passed the PortletURL object representing the action URL" */
+ TestResult tr10 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_FILTERRESOURCEURL2);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURLGenerationListener_filterResourceURL3 */
+ /* Details: "The input action URL object can be modified by setting a parameter and the modified URL object is processed by the PortletURL toString or write method" */
+ TestResult tr11 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_FILTERRESOURCEURL3);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURLGenerationListener_filterResourceURL4 */
+ /* Details: "The input action URL object can be modified by setting a property and the modified URL object is processed by the PortletURL toString or write method" */
+ TestResult tr12 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_FILTERRESOURCEURL4);
+ /* TODO: implement test */
+
+ /* TestCase: PortletURLGenerationListener_filterResourceURL5 */
+ /* Details: "The input action URL object can be modified by setting the resource ID and the modified URL object is processed by the PortletURL toString or write method" */
+ TestResult tr13 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_FILTERRESOURCEURL5);
+ /* 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);
+
+
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_ResourceURL.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_ResourceURL.java b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_ResourceURL.java
new file mode 100644
index 0000000..66e486b
--- /dev/null
+++ b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_ResourceURL.java
@@ -0,0 +1,155 @@
+/* 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.URLTests.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 V2URLTests_ResourceURL implements Portlet {
+ private static final String LOG_CLASS =
+ V2URLTests_ResourceURL.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.createResourceURL().getClass());
+
+ // Create result objects for the tests
+
+ /* TestCase: ResourceURL_fieldFULL */
+ /* Details: "Has String field FULL with value of \"cacheLevelFull\" " */
+ TestResult tr0 = tcd.getTestResultFailed(RESOURCEURL_FIELDFULL);
+ {
+ tr0.setTcSuccess(cc.hasField("FULL", "cacheLevelFull"));
+ }
+
+ /* TestCase: ResourceURL_fieldPAGE */
+ /* Details: "Has String field PAGE with value of \"cacheLevelPage\" " */
+ TestResult tr1 = tcd.getTestResultFailed(RESOURCEURL_FIELDPAGE);
+ {
+ tr1.setTcSuccess(cc.hasField("PAGE", "cacheLevelPage"));
+ }
+
+ /* TestCase: ResourceURL_fieldPORTLET */
+ /* Details: "Has String field PORTLET with value of \"cacheLevelPortlet\" " */
+ TestResult tr2 = tcd.getTestResultFailed(RESOURCEURL_FIELDPORTLET);
+ {
+ tr2.setTcSuccess(cc.hasField("PORTLET", "cacheLevelPortlet"));
+ }
+
+ /* TestCase: ResourceURL_fieldSHARED */
+ /* Details: "Has String field SHARED with value of \"javax.portlet.shared\" " */
+ TestResult tr3 = tcd.getTestResultFailed(RESOURCEURL_FIELDSHARED);
+ {
+ tr3.setTcSuccess(cc.hasField("SHARED", "javax.portlet.shared"));
+ }
+
+ /* TestCase: ResourceURL_implementsBaseURL2 */
+ /* Details: "All tests described for the BaseURL execute correctly with the ResourceURL" */
+ TestResult tr4 = tcd.getTestResultFailed(RESOURCEURL_IMPLEMENTSBASEURL2);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceURL_setResourceID */
+ /* Details: "Sets the specified String as the portlet resource ID" */
+ TestResult tr5 = tcd.getTestResultFailed(RESOURCEURL_SETRESOURCEID);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceURL_getCacheability */
+ /* Details: "Returns a String containing the cacheability level set on the resource URL" */
+ TestResult tr6 = tcd.getTestResultFailed(RESOURCEURL_GETCACHEABILITY);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceURL_setCacheability1 */
+ /* Details: "Sets the cacheability level for the resource URL" */
+ TestResult tr7 = tcd.getTestResultFailed(RESOURCEURL_SETCACHEABILITY1);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceURL_setCacheability2 */
+ /* Details: "Throws IllegalArgumentException if the input parameter does not have a value of \"FULL\", \"PAGE\", or \"PORTLET\"" */
+ TestResult tr8 = tcd.getTestResultFailed(RESOURCEURL_SETCACHEABILITY2);
+ /* TODO: implement test */
+
+ /* TestCase: ResourceURL_setCacheability3 */
+ /* Details: "Throws IllegalStateException if the specified cacheability level is weaker than the cacheability level for the parent resource URL" */
+ TestResult tr9 = tcd.getTestResultFailed(RESOURCEURL_SETCACHEABILITY3);
+ /* 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);
+
+
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_SIG_BaseURL.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_SIG_BaseURL.java b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_SIG_BaseURL.java
new file mode 100644
index 0000000..212fca8
--- /dev/null
+++ b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_SIG_BaseURL.java
@@ -0,0 +1,307 @@
+/* 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.URLTests.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 V2URLTests_SIG_BaseURL implements Portlet {
+ private static final String LOG_CLASS =
+ V2URLTests_SIG_BaseURL.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.createRenderURL().getClass());
+
+ // Create result objects for the tests
+
+ /* TestCase: BaseURL_SIG_hasSetParameter */
+ /* Details: "Has a setParameter(String, String) method " */
+ TestResult tr0 = tcd.getTestResultFailed(BASEURL_SIG_HASSETPARAMETER);
+ {
+ String name = "setParameter";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = {String.class, String.class};
+ tr0.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: BaseURL_SIG_hasSetParameterReturns */
+ /* Details: "Method setParameter(String, String) returns void " */
+ TestResult tr1 = tcd.getTestResultFailed(BASEURL_SIG_HASSETPARAMETERRETURNS);
+ {
+ String name = "setParameter";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {String.class, String.class};
+ tr1.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: BaseURL_SIG_hasSetParameterA */
+ /* Details: "Has a setParameter(String, String[]) method " */
+ TestResult tr2 = tcd.getTestResultFailed(BASEURL_SIG_HASSETPARAMETERA);
+ {
+ String name = "setParameter";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = {String.class, String[].class};
+ tr2.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: BaseURL_SIG_hasSetParameterReturnsA */
+ /* Details: "Method setParameter(String, String[]) returns void " */
+ TestResult tr3 = tcd.getTestResultFailed(BASEURL_SIG_HASSETPARAMETERRETURNSA);
+ {
+ String name = "setParameter";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {String.class, String[].class};
+ tr3.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: BaseURL_SIG_hasSetParameters */
+ /* Details: "Has a setParameters(java.util.Map) method " */
+ TestResult tr4 = tcd.getTestResultFailed(BASEURL_SIG_HASSETPARAMETERS);
+ {
+ String name = "setParameters";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = {java.util.Map.class};
+ tr4.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: BaseURL_SIG_hasSetParametersReturns */
+ /* Details: "Method setParameters(java.util.Map) returns void " */
+ TestResult tr5 = tcd.getTestResultFailed(BASEURL_SIG_HASSETPARAMETERSRETURNS);
+ {
+ String name = "setParameters";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {java.util.Map.class};
+ tr5.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: BaseURL_SIG_hasSetSecure */
+ /* Details: "Has a setSecure(boolean) throws PortletSecurityException method " */
+ TestResult tr6 = tcd.getTestResultFailed(BASEURL_SIG_HASSETSECURE);
+ {
+ String name = "setSecure";
+ Class<?>[] exceptions = {PortletSecurityException.class};
+ Class<?>[] parms = {boolean.class};
+ tr6.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: BaseURL_SIG_hasSetSecureReturns */
+ /* Details: "Method setSecure(boolean) returns void " */
+ TestResult tr7 = tcd.getTestResultFailed(BASEURL_SIG_HASSETSECURERETURNS);
+ {
+ String name = "setSecure";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {boolean.class};
+ tr7.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: BaseURL_SIG_hasToString */
+ /* Details: "Has a toString() method " */
+ TestResult tr8 = tcd.getTestResultFailed(BASEURL_SIG_HASTOSTRING);
+ {
+ String name = "toString";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = null;
+ tr8.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: BaseURL_SIG_hasToStringReturns */
+ /* Details: "Method toString() returns String " */
+ TestResult tr9 = tcd.getTestResultFailed(BASEURL_SIG_HASTOSTRINGRETURNS);
+ {
+ String name = "toString";
+ Class<?> retType = String.class;
+ Class<?>[] parms = null;
+ tr9.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: BaseURL_SIG_hasGetParameterMap */
+ /* Details: "Has a getParameterMap() method " */
+ TestResult tr10 = tcd.getTestResultFailed(BASEURL_SIG_HASGETPARAMETERMAP);
+ {
+ String name = "getParameterMap";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = null;
+ tr10.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: BaseURL_SIG_hasGetParameterMapReturns */
+ /* Details: "Method getParameterMap() returns java.util.Map " */
+ TestResult tr11 = tcd.getTestResultFailed(BASEURL_SIG_HASGETPARAMETERMAPRETURNS);
+ {
+ String name = "getParameterMap";
+ Class<?> retType = java.util.Map.class;
+ Class<?>[] parms = null;
+ tr11.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: BaseURL_SIG_hasWrite */
+ /* Details: "Has a write(java.io.Writer) throws java.io.IOException method " */
+ TestResult tr12 = tcd.getTestResultFailed(BASEURL_SIG_HASWRITE);
+ {
+ String name = "write";
+ Class<?>[] exceptions = {java.io.IOException.class};
+ Class<?>[] parms = {java.io.Writer.class};
+ tr12.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: BaseURL_SIG_hasWriteReturns */
+ /* Details: "Method write(java.io.Writer) returns void " */
+ TestResult tr13 = tcd.getTestResultFailed(BASEURL_SIG_HASWRITERETURNS);
+ {
+ String name = "write";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {java.io.Writer.class};
+ tr13.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: BaseURL_SIG_hasWriteA */
+ /* Details: "Has a write(java.io.Writer, boolean) throws java.io.IOException method " */
+ TestResult tr14 = tcd.getTestResultFailed(BASEURL_SIG_HASWRITEA);
+ {
+ String name = "write";
+ Class<?>[] exceptions = {java.io.IOException.class};
+ Class<?>[] parms = {java.io.Writer.class, boolean.class};
+ tr14.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: BaseURL_SIG_hasWriteReturnsA */
+ /* Details: "Method write(java.io.Writer, boolean) returns void " */
+ TestResult tr15 = tcd.getTestResultFailed(BASEURL_SIG_HASWRITERETURNSA);
+ {
+ String name = "write";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {java.io.Writer.class, boolean.class};
+ tr15.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: BaseURL_SIG_hasAddProperty */
+ /* Details: "Has a addProperty(String, String) method " */
+ TestResult tr16 = tcd.getTestResultFailed(BASEURL_SIG_HASADDPROPERTY);
+ {
+ String name = "addProperty";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = {String.class, String.class};
+ tr16.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: BaseURL_SIG_hasAddPropertyReturns */
+ /* Details: "Method addProperty(String, String) returns void " */
+ TestResult tr17 = tcd.getTestResultFailed(BASEURL_SIG_HASADDPROPERTYRETURNS);
+ {
+ String name = "addProperty";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {String.class, String.class};
+ tr17.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: BaseURL_SIG_hasSetProperty */
+ /* Details: "Has a setProperty(String, String) method " */
+ TestResult tr18 = tcd.getTestResultFailed(BASEURL_SIG_HASSETPROPERTY);
+ {
+ String name = "setProperty";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = {String.class, String.class};
+ tr18.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: BaseURL_SIG_hasSetPropertyReturns */
+ /* Details: "Method setProperty(String, String) returns void " */
+ TestResult tr19 = tcd.getTestResultFailed(BASEURL_SIG_HASSETPROPERTYRETURNS);
+ {
+ String name = "setProperty";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {String.class, String.class};
+ tr19.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);
+
+
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_SIG_PortletURL.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_SIG_PortletURL.java b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_SIG_PortletURL.java
new file mode 100644
index 0000000..57e2600
--- /dev/null
+++ b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_SIG_PortletURL.java
@@ -0,0 +1,205 @@
+/* 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.URLTests.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 V2URLTests_SIG_PortletURL implements Portlet {
+ private static final String LOG_CLASS =
+ V2URLTests_SIG_PortletURL.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.createRenderURL().getClass());
+
+ // Create result objects for the tests
+
+ /* TestCase: PortletURL_SIG_implementsBaseURL */
+ /* Details: "Implements BaseURL " */
+ TestResult tr0 = tcd.getTestResultFailed(PORTLETURL_SIG_IMPLEMENTSBASEURL);
+ {
+ tr0.setTcSuccess(cc.implementsInterface(BaseURL.class));
+ }
+
+ /* TestCase: PortletURL_SIG_hasSetWindowState */
+ /* Details: "Has a setWindowState(WindowState) throws WindowStateException method " */
+ TestResult tr1 = tcd.getTestResultFailed(PORTLETURL_SIG_HASSETWINDOWSTATE);
+ {
+ String name = "setWindowState";
+ Class<?>[] exceptions = {WindowStateException.class};
+ Class<?>[] parms = {WindowState.class};
+ tr1.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: PortletURL_SIG_hasSetWindowStateReturns */
+ /* Details: "Method setWindowState(WindowState) returns void " */
+ TestResult tr2 = tcd.getTestResultFailed(PORTLETURL_SIG_HASSETWINDOWSTATERETURNS);
+ {
+ String name = "setWindowState";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {WindowState.class};
+ tr2.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: PortletURL_SIG_hasSetPortletMode */
+ /* Details: "Has a setPortletMode(PortletMode) throws PortletModeException method " */
+ TestResult tr3 = tcd.getTestResultFailed(PORTLETURL_SIG_HASSETPORTLETMODE);
+ {
+ String name = "setPortletMode";
+ Class<?>[] exceptions = {PortletModeException.class};
+ Class<?>[] parms = {PortletMode.class};
+ tr3.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: PortletURL_SIG_hasSetPortletModeReturns */
+ /* Details: "Method setPortletMode(PortletMode) returns void " */
+ TestResult tr4 = tcd.getTestResultFailed(PORTLETURL_SIG_HASSETPORTLETMODERETURNS);
+ {
+ String name = "setPortletMode";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {PortletMode.class};
+ tr4.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: PortletURL_SIG_hasGetPortletMode */
+ /* Details: "Has a getPortletMode() method " */
+ TestResult tr5 = tcd.getTestResultFailed(PORTLETURL_SIG_HASGETPORTLETMODE);
+ {
+ String name = "getPortletMode";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = null;
+ tr5.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: PortletURL_SIG_hasGetPortletModeReturns */
+ /* Details: "Method getPortletMode() returns PortletMode " */
+ TestResult tr6 = tcd.getTestResultFailed(PORTLETURL_SIG_HASGETPORTLETMODERETURNS);
+ {
+ String name = "getPortletMode";
+ Class<?> retType = PortletMode.class;
+ Class<?>[] parms = null;
+ tr6.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: PortletURL_SIG_hasGetWindowState */
+ /* Details: "Has a getWindowState() method " */
+ TestResult tr7 = tcd.getTestResultFailed(PORTLETURL_SIG_HASGETWINDOWSTATE);
+ {
+ String name = "getWindowState";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = null;
+ tr7.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: PortletURL_SIG_hasGetWindowStateReturns */
+ /* Details: "Method getWindowState() returns WindowState " */
+ TestResult tr8 = tcd.getTestResultFailed(PORTLETURL_SIG_HASGETWINDOWSTATERETURNS);
+ {
+ String name = "getWindowState";
+ Class<?> retType = WindowState.class;
+ Class<?>[] parms = null;
+ tr8.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: PortletURL_SIG_hasRemovePublicRenderParameter */
+ /* Details: "Has a removePublicRenderParameter(String) method " */
+ TestResult tr9 = tcd.getTestResultFailed(PORTLETURL_SIG_HASREMOVEPUBLICRENDERPARAMETER);
+ {
+ String name = "removePublicRenderParameter";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = {String.class};
+ tr9.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: PortletURL_SIG_hasRemovePublicRenderParameterReturns */
+ /* Details: "Method removePublicRenderParameter(String) returns void " */
+ TestResult tr10 = tcd.getTestResultFailed(PORTLETURL_SIG_HASREMOVEPUBLICRENDERPARAMETERRETURNS);
+ {
+ String name = "removePublicRenderParameter";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {String.class};
+ tr10.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);
+
+
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_SIG_PortletURLGenerationListener.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_SIG_PortletURLGenerationListener.java b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_SIG_PortletURLGenerationListener.java
new file mode 100644
index 0000000..b4211d2
--- /dev/null
+++ b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_SIG_PortletURLGenerationListener.java
@@ -0,0 +1,153 @@
+/* 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.URLTests.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 V2URLTests_SIG_PortletURLGenerationListener implements Portlet {
+ private static final String LOG_CLASS =
+ V2URLTests_SIG_PortletURLGenerationListener.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(PortletURLGenerationListener.class);
+
+ // Create result objects for the tests
+
+ /* TestCase: PortletURLGenerationListener_SIG_hasFilterActionURL */
+ /* Details: "Has a filterActionURL(PortletURL) method " */
+ TestResult tr0 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_SIG_HASFILTERACTIONURL);
+ {
+ String name = "filterActionURL";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = {PortletURL.class};
+ tr0.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: PortletURLGenerationListener_SIG_hasFilterActionURLReturns */
+ /* Details: "Method filterActionURL(PortletURL) returns void " */
+ TestResult tr1 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_SIG_HASFILTERACTIONURLRETURNS);
+ {
+ String name = "filterActionURL";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {PortletURL.class};
+ tr1.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: PortletURLGenerationListener_SIG_hasFilterRenderURL */
+ /* Details: "Has a filterRenderURL(PortletURL) method " */
+ TestResult tr2 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_SIG_HASFILTERRENDERURL);
+ {
+ String name = "filterRenderURL";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = {PortletURL.class};
+ tr2.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: PortletURLGenerationListener_SIG_hasFilterRenderURLReturns */
+ /* Details: "Method filterRenderURL(PortletURL) returns void " */
+ TestResult tr3 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_SIG_HASFILTERRENDERURLRETURNS);
+ {
+ String name = "filterRenderURL";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {PortletURL.class};
+ tr3.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: PortletURLGenerationListener_SIG_hasFilterResourceURL */
+ /* Details: "Has a filterResourceURL(ResourceURL) method " */
+ TestResult tr4 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_SIG_HASFILTERRESOURCEURL);
+ {
+ String name = "filterResourceURL";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = {ResourceURL.class};
+ tr4.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: PortletURLGenerationListener_SIG_hasFilterResourceURLReturns */
+ /* Details: "Method filterResourceURL(ResourceURL) returns void " */
+ TestResult tr5 = tcd.getTestResultFailed(PORTLETURLGENERATIONLISTENER_SIG_HASFILTERRESOURCEURLRETURNS);
+ {
+ String name = "filterResourceURL";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {ResourceURL.class};
+ tr5.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);
+
+
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_SIG_ResourceURL.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_SIG_ResourceURL.java b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_SIG_ResourceURL.java
new file mode 100644
index 0000000..bf5157f
--- /dev/null
+++ b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/URLTests/portlets/V2URLTests_SIG_ResourceURL.java
@@ -0,0 +1,193 @@
+/* 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.URLTests.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 V2URLTests_SIG_ResourceURL implements Portlet {
+ private static final String LOG_CLASS =
+ V2URLTests_SIG_ResourceURL.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.createResourceURL().getClass());
+
+ // Create result objects for the tests
+
+ /* TestCase: ResourceURL_SIG_implementsBaseURL */
+ /* Details: "Implements BaseURL " */
+ TestResult tr0 = tcd.getTestResultFailed(RESOURCEURL_SIG_IMPLEMENTSBASEURL);
+ {
+ tr0.setTcSuccess(cc.implementsInterface(BaseURL.class));
+ }
+
+ /* TestCase: ResourceURL_SIG_fieldFULL */
+ /* Details: "Has String field FULL " */
+ TestResult tr1 = tcd.getTestResultFailed(RESOURCEURL_SIG_FIELDFULL);
+ {
+ tr1.setTcSuccess(cc.hasField("FULL"));
+ }
+
+ /* TestCase: ResourceURL_SIG_fieldPORTLET */
+ /* Details: "Has String field PORTLET " */
+ TestResult tr2 = tcd.getTestResultFailed(RESOURCEURL_SIG_FIELDPORTLET);
+ {
+ tr2.setTcSuccess(cc.hasField("PORTLET"));
+ }
+
+ /* TestCase: ResourceURL_SIG_fieldPAGE */
+ /* Details: "Has String field PAGE " */
+ TestResult tr3 = tcd.getTestResultFailed(RESOURCEURL_SIG_FIELDPAGE);
+ {
+ tr3.setTcSuccess(cc.hasField("PAGE"));
+ }
+
+ /* TestCase: ResourceURL_SIG_fieldSHARED */
+ /* Details: "Has String field SHARED " */
+ TestResult tr4 = tcd.getTestResultFailed(RESOURCEURL_SIG_FIELDSHARED);
+ {
+ tr4.setTcSuccess(cc.hasField("SHARED"));
+ }
+
+ /* TestCase: ResourceURL_SIG_hasSetResourceID */
+ /* Details: "Has a setResourceID(String) method " */
+ TestResult tr5 = tcd.getTestResultFailed(RESOURCEURL_SIG_HASSETRESOURCEID);
+ {
+ String name = "setResourceID";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = {String.class};
+ tr5.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: ResourceURL_SIG_hasSetResourceIDReturns */
+ /* Details: "Method setResourceID(String) returns void " */
+ TestResult tr6 = tcd.getTestResultFailed(RESOURCEURL_SIG_HASSETRESOURCEIDRETURNS);
+ {
+ String name = "setResourceID";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {String.class};
+ tr6.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: ResourceURL_SIG_hasGetCacheability */
+ /* Details: "Has a getCacheability() method " */
+ TestResult tr7 = tcd.getTestResultFailed(RESOURCEURL_SIG_HASGETCACHEABILITY);
+ {
+ String name = "getCacheability";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = null;
+ tr7.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: ResourceURL_SIG_hasGetCacheabilityReturns */
+ /* Details: "Method getCacheability() returns String " */
+ TestResult tr8 = tcd.getTestResultFailed(RESOURCEURL_SIG_HASGETCACHEABILITYRETURNS);
+ {
+ String name = "getCacheability";
+ Class<?> retType = String.class;
+ Class<?>[] parms = null;
+ tr8.setTcSuccess(cc.methodHasReturnType(name, retType, parms));
+ }
+
+ /* TestCase: ResourceURL_SIG_hasSetCacheability */
+ /* Details: "Has a setCacheability(String) method " */
+ TestResult tr9 = tcd.getTestResultFailed(RESOURCEURL_SIG_HASSETCACHEABILITY);
+ {
+ String name = "setCacheability";
+ Class<?>[] exceptions = null;
+ Class<?>[] parms = {String.class};
+ tr9.setTcSuccess(cc.hasMethod(name, parms, exceptions));
+ }
+
+ /* TestCase: ResourceURL_SIG_hasSetCacheabilityReturns */
+ /* Details: "Method setCacheability(String) returns void " */
+ TestResult tr10 = tcd.getTestResultFailed(RESOURCEURL_SIG_HASSETCACHEABILITYRETURNS);
+ {
+ String name = "setCacheability";
+ Class<?> retType = void.class;
+ Class<?>[] parms = {String.class};
+ tr10.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);
+
+
+ }
+
+}
+