Return-Path: X-Original-To: apmail-portals-pluto-scm-archive@www.apache.org Delivered-To: apmail-portals-pluto-scm-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E63F411501 for ; Sun, 27 Jul 2014 07:05:38 +0000 (UTC) Received: (qmail 96930 invoked by uid 500); 27 Jul 2014 07:05:38 -0000 Delivered-To: apmail-portals-pluto-scm-archive@portals.apache.org Received: (qmail 96850 invoked by uid 500); 27 Jul 2014 07:05:38 -0000 Mailing-List: contact pluto-scm-help@portals.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list pluto-scm@portals.apache.org Received: (qmail 96198 invoked by uid 99); 27 Jul 2014 07:05:38 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Jul 2014 07:05:38 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 3ACA79B6D3F; Sun, 27 Jul 2014 07:05:38 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: msnicklous@apache.org To: pluto-scm@portals.apache.org Date: Sun, 27 Jul 2014 07:05:57 -0000 Message-Id: <36d1d4a127054830b8e28b3a7168df9c@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [21/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/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_PreferencesValidator.java ---------------------------------------------------------------------- diff --git a/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_PreferencesValidator.java b/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_PreferencesValidator.java new file mode 100644 index 0000000..50d0cb5 --- /dev/null +++ b/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_PreferencesValidator.java @@ -0,0 +1,105 @@ +/* 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.EnvironmentTests.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 V2EnvironmentTests_PreferencesValidator implements Portlet { + private static final String LOG_CLASS = + V2EnvironmentTests_PreferencesValidator.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(PreferencesValidator.class); + + // Create result objects for the tests + + /* TestCase: PreferencesValidator_canBeConfigured */ + /* Details: "A PreferencesValidator can be configured in the deployment descriptor" */ + TestResult tr0 = tcd.getTestResultFailed(PREFERENCESVALIDATOR_CANBECONFIGURED); + /* TODO: implement test */ + + /* TestCase: PreferencesValidator_validate1 */ + /* Details: "The validate(PortletPreferences) method is called when the preferences are stored " */ + TestResult tr1 = tcd.getTestResultFailed(PREFERENCESVALIDATOR_VALIDATE1); + /* TODO: implement test */ + + /* TestCase: PreferencesValidator_validate2 */ + /* Details: "If a ValidatorException is thrown, the preferences are not stored" */ + TestResult tr2 = tcd.getTestResultFailed(PREFERENCESVALIDATOR_VALIDATE2); + /* TODO: implement test */ + + + + // 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/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_CacheControl.java ---------------------------------------------------------------------- diff --git a/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_CacheControl.java b/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_CacheControl.java new file mode 100644 index 0000000..9ac1df2 --- /dev/null +++ b/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_CacheControl.java @@ -0,0 +1,263 @@ +/* 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.EnvironmentTests.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 V2EnvironmentTests_SIG_CacheControl implements Portlet { + private static final String LOG_CLASS = + V2EnvironmentTests_SIG_CacheControl.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.getCacheControl().getClass()); + + // Create result objects for the tests + + /* TestCase: CacheControl_SIG_hasGetExpirationTime */ + /* Details: "Has a getExpirationTime() method " */ + TestResult tr0 = tcd.getTestResultFailed(CACHECONTROL_SIG_HASGETEXPIRATIONTIME); + { + String name = "getExpirationTime"; + Class[] exceptions = null; + Class[] parms = null; + tr0.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: CacheControl_SIG_hasGetExpirationTimeReturns */ + /* Details: "Method getExpirationTime() returns int " */ + TestResult tr1 = tcd.getTestResultFailed(CACHECONTROL_SIG_HASGETEXPIRATIONTIMERETURNS); + { + String name = "getExpirationTime"; + Class retType = int.class; + Class[] parms = null; + tr1.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: CacheControl_SIG_hasSetExpirationTime */ + /* Details: "Has a setExpirationTime(int) method " */ + TestResult tr2 = tcd.getTestResultFailed(CACHECONTROL_SIG_HASSETEXPIRATIONTIME); + { + String name = "setExpirationTime"; + Class[] exceptions = null; + Class[] parms = {int.class}; + tr2.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: CacheControl_SIG_hasSetExpirationTimeReturns */ + /* Details: "Method setExpirationTime(int) returns void " */ + TestResult tr3 = tcd.getTestResultFailed(CACHECONTROL_SIG_HASSETEXPIRATIONTIMERETURNS); + { + String name = "setExpirationTime"; + Class retType = void.class; + Class[] parms = {int.class}; + tr3.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: CacheControl_SIG_hasIsPublicScope */ + /* Details: "Has a isPublicScope() method " */ + TestResult tr4 = tcd.getTestResultFailed(CACHECONTROL_SIG_HASISPUBLICSCOPE); + { + String name = "isPublicScope"; + Class[] exceptions = null; + Class[] parms = null; + tr4.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: CacheControl_SIG_hasIsPublicScopeReturns */ + /* Details: "Method isPublicScope() returns boolean " */ + TestResult tr5 = tcd.getTestResultFailed(CACHECONTROL_SIG_HASISPUBLICSCOPERETURNS); + { + String name = "isPublicScope"; + Class retType = boolean.class; + Class[] parms = null; + tr5.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: CacheControl_SIG_hasSetPublicScope */ + /* Details: "Has a setPublicScope(boolean) method " */ + TestResult tr6 = tcd.getTestResultFailed(CACHECONTROL_SIG_HASSETPUBLICSCOPE); + { + String name = "setPublicScope"; + Class[] exceptions = null; + Class[] parms = {boolean.class}; + tr6.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: CacheControl_SIG_hasSetPublicScopeReturns */ + /* Details: "Method setPublicScope(boolean) returns void " */ + TestResult tr7 = tcd.getTestResultFailed(CACHECONTROL_SIG_HASSETPUBLICSCOPERETURNS); + { + String name = "setPublicScope"; + Class retType = void.class; + Class[] parms = {boolean.class}; + tr7.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: CacheControl_SIG_hasGetETag */ + /* Details: "Has a getETag() method " */ + TestResult tr8 = tcd.getTestResultFailed(CACHECONTROL_SIG_HASGETETAG); + { + String name = "getETag"; + Class[] exceptions = null; + Class[] parms = null; + tr8.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: CacheControl_SIG_hasGetETagReturns */ + /* Details: "Method getETag() returns String " */ + TestResult tr9 = tcd.getTestResultFailed(CACHECONTROL_SIG_HASGETETAGRETURNS); + { + String name = "getETag"; + Class retType = String.class; + Class[] parms = null; + tr9.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: CacheControl_SIG_hasSetETag */ + /* Details: "Has a setETag(String) method " */ + TestResult tr10 = tcd.getTestResultFailed(CACHECONTROL_SIG_HASSETETAG); + { + String name = "setETag"; + Class[] exceptions = null; + Class[] parms = {String.class}; + tr10.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: CacheControl_SIG_hasSetETagReturns */ + /* Details: "Method setETag(String) returns void " */ + TestResult tr11 = tcd.getTestResultFailed(CACHECONTROL_SIG_HASSETETAGRETURNS); + { + String name = "setETag"; + Class retType = void.class; + Class[] parms = {String.class}; + tr11.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: CacheControl_SIG_hasUseCachedContent */ + /* Details: "Has a useCachedContent() method " */ + TestResult tr12 = tcd.getTestResultFailed(CACHECONTROL_SIG_HASUSECACHEDCONTENT); + { + String name = "useCachedContent"; + Class[] exceptions = null; + Class[] parms = null; + tr12.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: CacheControl_SIG_hasUseCachedContentReturns */ + /* Details: "Method useCachedContent() returns boolean " */ + TestResult tr13 = tcd.getTestResultFailed(CACHECONTROL_SIG_HASUSECACHEDCONTENTRETURNS); + { + String name = "useCachedContent"; + Class retType = boolean.class; + Class[] parms = null; + tr13.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: CacheControl_SIG_hasSetUseCachedContent */ + /* Details: "Has a setUseCachedContent(boolean) method " */ + TestResult tr14 = tcd.getTestResultFailed(CACHECONTROL_SIG_HASSETUSECACHEDCONTENT); + { + String name = "setUseCachedContent"; + Class[] exceptions = null; + Class[] parms = {boolean.class}; + tr14.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: CacheControl_SIG_hasSetUseCachedContentReturns */ + /* Details: "Method setUseCachedContent(boolean) returns void " */ + TestResult tr15 = tcd.getTestResultFailed(CACHECONTROL_SIG_HASSETUSECACHEDCONTENTRETURNS); + { + String name = "setUseCachedContent"; + Class retType = void.class; + Class[] parms = {boolean.class}; + tr15.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); + + + } + +} + http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortalContext.java ---------------------------------------------------------------------- diff --git a/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortalContext.java b/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortalContext.java new file mode 100644 index 0000000..6245a37 --- /dev/null +++ b/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortalContext.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.EnvironmentTests.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 V2EnvironmentTests_SIG_PortalContext implements Portlet { + private static final String LOG_CLASS = + V2EnvironmentTests_SIG_PortalContext.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(renderRequest.getPortalContext().getClass()); + + // Create result objects for the tests + + /* TestCase: PortalContext_SIG_fieldMARKUP_HEAD_ELEMENT_SUPPORT */ + /* Details: "Has String field MARKUP_HEAD_ELEMENT_SUPPORT " */ + TestResult tr0 = tcd.getTestResultFailed(PORTALCONTEXT_SIG_FIELDMARKUP_HEAD_ELEMENT_SUPPORT); + { + tr0.setTcSuccess(cc.hasField("MARKUP_HEAD_ELEMENT_SUPPORT")); + } + + /* TestCase: PortalContext_SIG_hasGetProperty */ + /* Details: "Has a getProperty(String) method " */ + TestResult tr1 = tcd.getTestResultFailed(PORTALCONTEXT_SIG_HASGETPROPERTY); + { + String name = "getProperty"; + Class[] exceptions = null; + Class[] parms = {String.class}; + tr1.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortalContext_SIG_hasGetPropertyReturns */ + /* Details: "Method getProperty(String) returns String " */ + TestResult tr2 = tcd.getTestResultFailed(PORTALCONTEXT_SIG_HASGETPROPERTYRETURNS); + { + String name = "getProperty"; + Class retType = String.class; + Class[] parms = {String.class}; + tr2.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortalContext_SIG_hasGetPropertyNames */ + /* Details: "Has a getPropertyNames() method " */ + TestResult tr3 = tcd.getTestResultFailed(PORTALCONTEXT_SIG_HASGETPROPERTYNAMES); + { + String name = "getPropertyNames"; + Class[] exceptions = null; + Class[] parms = null; + tr3.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortalContext_SIG_hasGetPropertyNamesReturns */ + /* Details: "Method getPropertyNames() returns java.util.Enumeration " */ + TestResult tr4 = tcd.getTestResultFailed(PORTALCONTEXT_SIG_HASGETPROPERTYNAMESRETURNS); + { + String name = "getPropertyNames"; + Class retType = java.util.Enumeration.class; + Class[] parms = null; + tr4.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortalContext_SIG_hasGetSupportedPortletModes */ + /* Details: "Has a getSupportedPortletModes() method " */ + TestResult tr5 = tcd.getTestResultFailed(PORTALCONTEXT_SIG_HASGETSUPPORTEDPORTLETMODES); + { + String name = "getSupportedPortletModes"; + Class[] exceptions = null; + Class[] parms = null; + tr5.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortalContext_SIG_hasGetSupportedPortletModesReturns */ + /* Details: "Method getSupportedPortletModes() returns java.util.Enumeration " */ + TestResult tr6 = tcd.getTestResultFailed(PORTALCONTEXT_SIG_HASGETSUPPORTEDPORTLETMODESRETURNS); + { + String name = "getSupportedPortletModes"; + Class retType = java.util.Enumeration.class; + Class[] parms = null; + tr6.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortalContext_SIG_hasGetSupportedWindowStates */ + /* Details: "Has a getSupportedWindowStates() method " */ + TestResult tr7 = tcd.getTestResultFailed(PORTALCONTEXT_SIG_HASGETSUPPORTEDWINDOWSTATES); + { + String name = "getSupportedWindowStates"; + Class[] exceptions = null; + Class[] parms = null; + tr7.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortalContext_SIG_hasGetSupportedWindowStatesReturns */ + /* Details: "Method getSupportedWindowStates() returns java.util.Enumeration " */ + TestResult tr8 = tcd.getTestResultFailed(PORTALCONTEXT_SIG_HASGETSUPPORTEDWINDOWSTATESRETURNS); + { + String name = "getSupportedWindowStates"; + Class retType = java.util.Enumeration.class; + Class[] parms = null; + tr8.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortalContext_SIG_hasGetPortalInfo */ + /* Details: "Has a getPortalInfo() method " */ + TestResult tr9 = tcd.getTestResultFailed(PORTALCONTEXT_SIG_HASGETPORTALINFO); + { + String name = "getPortalInfo"; + Class[] exceptions = null; + Class[] parms = null; + tr9.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortalContext_SIG_hasGetPortalInfoReturns */ + /* Details: "Method getPortalInfo() returns String " */ + TestResult tr10 = tcd.getTestResultFailed(PORTALCONTEXT_SIG_HASGETPORTALINFORETURNS); + { + String name = "getPortalInfo"; + Class retType = String.class; + Class[] parms = null; + 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/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortletContext.java ---------------------------------------------------------------------- diff --git a/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortletContext.java b/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortletContext.java new file mode 100644 index 0000000..14d90dd --- /dev/null +++ b/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortletContext.java @@ -0,0 +1,527 @@ +/* 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.EnvironmentTests.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 V2EnvironmentTests_SIG_PortletContext implements Portlet { + private static final String LOG_CLASS = + V2EnvironmentTests_SIG_PortletContext.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(portletConfig.getPortletContext().getClass()); + + // Create result objects for the tests + + /* TestCase: PortletContext_SIG_hasGetServerInfo */ + /* Details: "Has a getServerInfo() method " */ + TestResult tr0 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETSERVERINFO); + { + String name = "getServerInfo"; + Class[] exceptions = null; + Class[] parms = null; + tr0.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasGetServerInfoReturns */ + /* Details: "Method getServerInfo() returns String " */ + TestResult tr1 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETSERVERINFORETURNS); + { + String name = "getServerInfo"; + Class retType = String.class; + Class[] parms = null; + tr1.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletContext_SIG_hasGetRequestDispatcher */ + /* Details: "Has a getRequestDispatcher(String) method " */ + TestResult tr2 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETREQUESTDISPATCHER); + { + String name = "getRequestDispatcher"; + Class[] exceptions = null; + Class[] parms = {String.class}; + tr2.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasGetRequestDispatcherReturns */ + /* Details: "Method getRequestDispatcher(String) returns PortletRequestDispatcher " */ + TestResult tr3 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETREQUESTDISPATCHERRETURNS); + { + String name = "getRequestDispatcher"; + Class retType = PortletRequestDispatcher.class; + Class[] parms = {String.class}; + tr3.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletContext_SIG_hasGetNamedDispatcher */ + /* Details: "Has a getNamedDispatcher(String) method " */ + TestResult tr4 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETNAMEDDISPATCHER); + { + String name = "getNamedDispatcher"; + Class[] exceptions = null; + Class[] parms = {String.class}; + tr4.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasGetNamedDispatcherReturns */ + /* Details: "Method getNamedDispatcher(String) returns PortletRequestDispatcher " */ + TestResult tr5 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETNAMEDDISPATCHERRETURNS); + { + String name = "getNamedDispatcher"; + Class retType = PortletRequestDispatcher.class; + Class[] parms = {String.class}; + tr5.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletContext_SIG_hasGetResourceAsStream */ + /* Details: "Has a getResourceAsStream(String) method " */ + TestResult tr6 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETRESOURCEASSTREAM); + { + String name = "getResourceAsStream"; + Class[] exceptions = null; + Class[] parms = {String.class}; + tr6.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasGetResourceAsStreamReturns */ + /* Details: "Method getResourceAsStream(String) returns java.io.InputStream " */ + TestResult tr7 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETRESOURCEASSTREAMRETURNS); + { + String name = "getResourceAsStream"; + Class retType = java.io.InputStream.class; + Class[] parms = {String.class}; + tr7.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletContext_SIG_hasGetMajorVersion */ + /* Details: "Has a getMajorVersion() method " */ + TestResult tr8 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETMAJORVERSION); + { + String name = "getMajorVersion"; + Class[] exceptions = null; + Class[] parms = null; + tr8.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasGetMajorVersionReturns */ + /* Details: "Method getMajorVersion() returns int " */ + TestResult tr9 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETMAJORVERSIONRETURNS); + { + String name = "getMajorVersion"; + Class retType = int.class; + Class[] parms = null; + tr9.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletContext_SIG_hasGetMinorVersion */ + /* Details: "Has a getMinorVersion() method " */ + TestResult tr10 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETMINORVERSION); + { + String name = "getMinorVersion"; + Class[] exceptions = null; + Class[] parms = null; + tr10.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasGetMinorVersionReturns */ + /* Details: "Method getMinorVersion() returns int " */ + TestResult tr11 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETMINORVERSIONRETURNS); + { + String name = "getMinorVersion"; + Class retType = int.class; + Class[] parms = null; + tr11.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletContext_SIG_hasGetMimeType */ + /* Details: "Has a getMimeType(String) method " */ + TestResult tr12 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETMIMETYPE); + { + String name = "getMimeType"; + Class[] exceptions = null; + Class[] parms = {String.class}; + tr12.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasGetMimeTypeReturns */ + /* Details: "Method getMimeType(String) returns String " */ + TestResult tr13 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETMIMETYPERETURNS); + { + String name = "getMimeType"; + Class retType = String.class; + Class[] parms = {String.class}; + tr13.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletContext_SIG_hasGetRealPath */ + /* Details: "Has a getRealPath(String) method " */ + TestResult tr14 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETREALPATH); + { + String name = "getRealPath"; + Class[] exceptions = null; + Class[] parms = {String.class}; + tr14.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasGetRealPathReturns */ + /* Details: "Method getRealPath(String) returns String " */ + TestResult tr15 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETREALPATHRETURNS); + { + String name = "getRealPath"; + Class retType = String.class; + Class[] parms = {String.class}; + tr15.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletContext_SIG_hasGetResourcePaths */ + /* Details: "Has a getResourcePaths(String) method " */ + TestResult tr16 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETRESOURCEPATHS); + { + String name = "getResourcePaths"; + Class[] exceptions = null; + Class[] parms = {String.class}; + tr16.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasGetResourcePathsReturns */ + /* Details: "Method getResourcePaths(String) returns java.util.Set " */ + TestResult tr17 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETRESOURCEPATHSRETURNS); + { + String name = "getResourcePaths"; + Class retType = java.util.Set.class; + Class[] parms = {String.class}; + tr17.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletContext_SIG_hasGetResource */ + /* Details: "Has a getResource(String) throws java.net.MalformedURLException method " */ + TestResult tr18 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETRESOURCE); + { + String name = "getResource"; + Class[] exceptions = {java.net.MalformedURLException.class}; + Class[] parms = {String.class}; + tr18.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasGetResourceReturns */ + /* Details: "Method getResource(String) returns java.net.URL " */ + TestResult tr19 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETRESOURCERETURNS); + { + String name = "getResource"; + Class retType = java.net.URL.class; + Class[] parms = {String.class}; + tr19.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletContext_SIG_hasGetAttribute */ + /* Details: "Has a getAttribute(String) method " */ + TestResult tr20 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETATTRIBUTE); + { + String name = "getAttribute"; + Class[] exceptions = null; + Class[] parms = {String.class}; + tr20.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasGetAttributeReturns */ + /* Details: "Method getAttribute(String) returns Object " */ + TestResult tr21 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETATTRIBUTERETURNS); + { + String name = "getAttribute"; + Class retType = Object.class; + Class[] parms = {String.class}; + tr21.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletContext_SIG_hasGetAttributeNames */ + /* Details: "Has a getAttributeNames() method " */ + TestResult tr22 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETATTRIBUTENAMES); + { + String name = "getAttributeNames"; + Class[] exceptions = null; + Class[] parms = null; + tr22.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasGetAttributeNamesReturns */ + /* Details: "Method getAttributeNames() returns java.util.Enumeration " */ + TestResult tr23 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETATTRIBUTENAMESRETURNS); + { + String name = "getAttributeNames"; + Class retType = java.util.Enumeration.class; + Class[] parms = null; + tr23.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletContext_SIG_hasGetInitParameter */ + /* Details: "Has a getInitParameter(String) method " */ + TestResult tr24 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETINITPARAMETER); + { + String name = "getInitParameter"; + Class[] exceptions = null; + Class[] parms = {String.class}; + tr24.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasGetInitParameterReturns */ + /* Details: "Method getInitParameter(String) returns String " */ + TestResult tr25 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETINITPARAMETERRETURNS); + { + String name = "getInitParameter"; + Class retType = String.class; + Class[] parms = {String.class}; + tr25.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletContext_SIG_hasGetInitParameterNames */ + /* Details: "Has a getInitParameterNames() method " */ + TestResult tr26 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETINITPARAMETERNAMES); + { + String name = "getInitParameterNames"; + Class[] exceptions = null; + Class[] parms = null; + tr26.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasGetInitParameterNamesReturns */ + /* Details: "Method getInitParameterNames() returns java.util.Enumeration " */ + TestResult tr27 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETINITPARAMETERNAMESRETURNS); + { + String name = "getInitParameterNames"; + Class retType = java.util.Enumeration.class; + Class[] parms = null; + tr27.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletContext_SIG_hasLog */ + /* Details: "Has a log(String) method " */ + TestResult tr28 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASLOG); + { + String name = "log"; + Class[] exceptions = null; + Class[] parms = {String.class}; + tr28.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasLogReturns */ + /* Details: "Method log(String) returns void " */ + TestResult tr29 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASLOGRETURNS); + { + String name = "log"; + Class retType = void.class; + Class[] parms = {String.class}; + tr29.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletContext_SIG_hasLogA */ + /* Details: "Has a log(String, Throwable) method " */ + TestResult tr30 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASLOGA); + { + String name = "log"; + Class[] exceptions = null; + Class[] parms = {String.class, Throwable.class}; + tr30.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasLogReturnsA */ + /* Details: "Method log(String, Throwable) returns void " */ + TestResult tr31 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASLOGRETURNSA); + { + String name = "log"; + Class retType = void.class; + Class[] parms = {String.class, Throwable.class}; + tr31.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletContext_SIG_hasRemoveAttribute */ + /* Details: "Has a removeAttribute(String) method " */ + TestResult tr32 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASREMOVEATTRIBUTE); + { + String name = "removeAttribute"; + Class[] exceptions = null; + Class[] parms = {String.class}; + tr32.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasRemoveAttributeReturns */ + /* Details: "Method removeAttribute(String) returns void " */ + TestResult tr33 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASREMOVEATTRIBUTERETURNS); + { + String name = "removeAttribute"; + Class retType = void.class; + Class[] parms = {String.class}; + tr33.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletContext_SIG_hasSetAttribute */ + /* Details: "Has a setAttribute(String, Object) method " */ + TestResult tr34 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASSETATTRIBUTE); + { + String name = "setAttribute"; + Class[] exceptions = null; + Class[] parms = {String.class, Object.class}; + tr34.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasSetAttributeReturns */ + /* Details: "Method setAttribute(String, Object) returns void " */ + TestResult tr35 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASSETATTRIBUTERETURNS); + { + String name = "setAttribute"; + Class retType = void.class; + Class[] parms = {String.class, Object.class}; + tr35.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletContext_SIG_hasGetPortletContextName */ + /* Details: "Has a getPortletContextName() method " */ + TestResult tr36 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETPORTLETCONTEXTNAME); + { + String name = "getPortletContextName"; + Class[] exceptions = null; + Class[] parms = null; + tr36.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasGetPortletContextNameReturns */ + /* Details: "Method getPortletContextName() returns String " */ + TestResult tr37 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETPORTLETCONTEXTNAMERETURNS); + { + String name = "getPortletContextName"; + Class retType = String.class; + Class[] parms = null; + tr37.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletContext_SIG_hasGetContainerRuntimeOptions */ + /* Details: "Has a getContainerRuntimeOptions() method " */ + TestResult tr38 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETCONTAINERRUNTIMEOPTIONS); + { + String name = "getContainerRuntimeOptions"; + Class[] exceptions = null; + Class[] parms = null; + tr38.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletContext_SIG_hasGetContainerRuntimeOptionsReturns */ + /* Details: "Method getContainerRuntimeOptions() returns java.util.Enumeration " */ + TestResult tr39 = tcd.getTestResultFailed(PORTLETCONTEXT_SIG_HASGETCONTAINERRUNTIMEOPTIONSRETURNS); + { + String name = "getContainerRuntimeOptions"; + Class retType = java.util.Enumeration.class; + Class[] parms = null; + tr39.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); + + + } + +} + http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortletPreferences.java ---------------------------------------------------------------------- diff --git a/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortletPreferences.java b/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortletPreferences.java new file mode 100644 index 0000000..910675a --- /dev/null +++ b/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortletPreferences.java @@ -0,0 +1,285 @@ +/* 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.EnvironmentTests.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 V2EnvironmentTests_SIG_PortletPreferences implements Portlet { + private static final String LOG_CLASS = + V2EnvironmentTests_SIG_PortletPreferences.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(renderRequest.getPreferences().getClass()); + + // Create result objects for the tests + + /* TestCase: PortletPreferences_SIG_hasIsReadOnly */ + /* Details: "Has a isReadOnly(String) method " */ + TestResult tr0 = tcd.getTestResultFailed(PORTLETPREFERENCES_SIG_HASISREADONLY); + { + String name = "isReadOnly"; + Class[] exceptions = null; + Class[] parms = {String.class}; + tr0.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletPreferences_SIG_hasIsReadOnlyReturns */ + /* Details: "Method isReadOnly(String) returns boolean " */ + TestResult tr1 = tcd.getTestResultFailed(PORTLETPREFERENCES_SIG_HASISREADONLYRETURNS); + { + String name = "isReadOnly"; + Class retType = boolean.class; + Class[] parms = {String.class}; + tr1.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletPreferences_SIG_hasGetValue */ + /* Details: "Has a getValue(String, String) method " */ + TestResult tr2 = tcd.getTestResultFailed(PORTLETPREFERENCES_SIG_HASGETVALUE); + { + String name = "getValue"; + Class[] exceptions = null; + Class[] parms = {String.class, String.class}; + tr2.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletPreferences_SIG_hasGetValueReturns */ + /* Details: "Method getValue(String, String) returns String " */ + TestResult tr3 = tcd.getTestResultFailed(PORTLETPREFERENCES_SIG_HASGETVALUERETURNS); + { + String name = "getValue"; + Class retType = String.class; + Class[] parms = {String.class, String.class}; + tr3.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletPreferences_SIG_hasGetValues */ + /* Details: "Has a getValues(String, String[]) method " */ + TestResult tr4 = tcd.getTestResultFailed(PORTLETPREFERENCES_SIG_HASGETVALUES); + { + String name = "getValues"; + Class[] exceptions = null; + Class[] parms = {String.class, String[].class}; + tr4.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletPreferences_SIG_hasGetValuesReturns */ + /* Details: "Method getValues(String, String[]) returns String[] " */ + TestResult tr5 = tcd.getTestResultFailed(PORTLETPREFERENCES_SIG_HASGETVALUESRETURNS); + { + String name = "getValues"; + Class retType = String[].class; + Class[] parms = {String.class, String[].class}; + tr5.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletPreferences_SIG_hasSetValue */ + /* Details: "Has a setValue(String, String) throws ReadOnlyException method " */ + TestResult tr6 = tcd.getTestResultFailed(PORTLETPREFERENCES_SIG_HASSETVALUE); + { + String name = "setValue"; + Class[] exceptions = {ReadOnlyException.class}; + Class[] parms = {String.class, String.class}; + tr6.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletPreferences_SIG_hasSetValueReturns */ + /* Details: "Method setValue(String, String) returns void " */ + TestResult tr7 = tcd.getTestResultFailed(PORTLETPREFERENCES_SIG_HASSETVALUERETURNS); + { + String name = "setValue"; + Class retType = void.class; + Class[] parms = {String.class, String.class}; + tr7.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletPreferences_SIG_hasSetValues */ + /* Details: "Has a setValues(String, String[]) throws ReadOnlyException method " */ + TestResult tr8 = tcd.getTestResultFailed(PORTLETPREFERENCES_SIG_HASSETVALUES); + { + String name = "setValues"; + Class[] exceptions = {ReadOnlyException.class}; + Class[] parms = {String.class, String[].class}; + tr8.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletPreferences_SIG_hasSetValuesReturns */ + /* Details: "Method setValues(String, String[]) returns void " */ + TestResult tr9 = tcd.getTestResultFailed(PORTLETPREFERENCES_SIG_HASSETVALUESRETURNS); + { + String name = "setValues"; + Class retType = void.class; + Class[] parms = {String.class, String[].class}; + tr9.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletPreferences_SIG_hasGetNames */ + /* Details: "Has a getNames() method " */ + TestResult tr10 = tcd.getTestResultFailed(PORTLETPREFERENCES_SIG_HASGETNAMES); + { + String name = "getNames"; + Class[] exceptions = null; + Class[] parms = null; + tr10.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletPreferences_SIG_hasGetNamesReturns */ + /* Details: "Method getNames() returns java.util.Enumeration " */ + TestResult tr11 = tcd.getTestResultFailed(PORTLETPREFERENCES_SIG_HASGETNAMESRETURNS); + { + String name = "getNames"; + Class retType = java.util.Enumeration.class; + Class[] parms = null; + tr11.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletPreferences_SIG_hasGetMap */ + /* Details: "Has a getMap() method " */ + TestResult tr12 = tcd.getTestResultFailed(PORTLETPREFERENCES_SIG_HASGETMAP); + { + String name = "getMap"; + Class[] exceptions = null; + Class[] parms = null; + tr12.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletPreferences_SIG_hasGetMapReturns */ + /* Details: "Method getMap() returns java.util.Map " */ + TestResult tr13 = tcd.getTestResultFailed(PORTLETPREFERENCES_SIG_HASGETMAPRETURNS); + { + String name = "getMap"; + Class retType = java.util.Map.class; + Class[] parms = null; + tr13.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletPreferences_SIG_hasReset */ + /* Details: "Has a reset(String) throws ReadOnlyException method " */ + TestResult tr14 = tcd.getTestResultFailed(PORTLETPREFERENCES_SIG_HASRESET); + { + String name = "reset"; + Class[] exceptions = {ReadOnlyException.class}; + Class[] parms = {String.class}; + tr14.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletPreferences_SIG_hasResetReturns */ + /* Details: "Method reset(String) returns void " */ + TestResult tr15 = tcd.getTestResultFailed(PORTLETPREFERENCES_SIG_HASRESETRETURNS); + { + String name = "reset"; + Class retType = void.class; + Class[] parms = {String.class}; + tr15.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletPreferences_SIG_hasStore */ + /* Details: "Has a store() throws java.io.IOException, ValidatorException method " */ + TestResult tr16 = tcd.getTestResultFailed(PORTLETPREFERENCES_SIG_HASSTORE); + { + String name = "store"; + Class[] exceptions = {java.io.IOException.class, ValidatorException.class}; + Class[] parms = null; + tr16.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletPreferences_SIG_hasStoreReturns */ + /* Details: "Method store() returns void " */ + TestResult tr17 = tcd.getTestResultFailed(PORTLETPREFERENCES_SIG_HASSTORERETURNS); + { + String name = "store"; + Class retType = void.class; + Class[] parms = null; + tr17.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); + + + } + +} + http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/bd830576/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortletRequestDispatcher.java ---------------------------------------------------------------------- diff --git a/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortletRequestDispatcher.java b/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortletRequestDispatcher.java new file mode 100644 index 0000000..d1b86e4 --- /dev/null +++ b/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortletRequestDispatcher.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.EnvironmentTests.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 V2EnvironmentTests_SIG_PortletRequestDispatcher implements Portlet { + private static final String LOG_CLASS = + V2EnvironmentTests_SIG_PortletRequestDispatcher.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(portletConfig.getPortletContext().getRequestDispatcher("/generated-resources/xml/module/tck-V2EnvironmentTests-tests.xml").getClass()); + + // Create result objects for the tests + + /* TestCase: PortletRequestDispatcher_SIG_hasInclude */ + /* Details: "Has a include(RenderRequest, RenderResponse) throws PortletException, java.io.IOException method " */ + TestResult tr0 = tcd.getTestResultFailed(PORTLETREQUESTDISPATCHER_SIG_HASINCLUDE); + { + String name = "include"; + Class[] exceptions = {PortletException.class, java.io.IOException.class}; + Class[] parms = {RenderRequest.class, RenderResponse.class}; + tr0.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletRequestDispatcher_SIG_hasIncludeReturns */ + /* Details: "Method include(RenderRequest, RenderResponse) returns void " */ + TestResult tr1 = tcd.getTestResultFailed(PORTLETREQUESTDISPATCHER_SIG_HASINCLUDERETURNS); + { + String name = "include"; + Class retType = void.class; + Class[] parms = {RenderRequest.class, RenderResponse.class}; + tr1.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletRequestDispatcher_SIG_hasIncludeA */ + /* Details: "Has a include(PortletRequest, PortletResponse) throws PortletException, java.io.IOException method " */ + TestResult tr2 = tcd.getTestResultFailed(PORTLETREQUESTDISPATCHER_SIG_HASINCLUDEA); + { + String name = "include"; + Class[] exceptions = {PortletException.class, java.io.IOException.class}; + Class[] parms = {PortletRequest.class, PortletResponse.class}; + tr2.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletRequestDispatcher_SIG_hasIncludeReturnsA */ + /* Details: "Method include(PortletRequest, PortletResponse) returns void " */ + TestResult tr3 = tcd.getTestResultFailed(PORTLETREQUESTDISPATCHER_SIG_HASINCLUDERETURNSA); + { + String name = "include"; + Class retType = void.class; + Class[] parms = {PortletRequest.class, PortletResponse.class}; + tr3.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletRequestDispatcher_SIG_hasForward */ + /* Details: "Has a forward(PortletRequest, PortletResponse) throws PortletException, java.io.IOException method " */ + TestResult tr4 = tcd.getTestResultFailed(PORTLETREQUESTDISPATCHER_SIG_HASFORWARD); + { + String name = "forward"; + Class[] exceptions = {PortletException.class, java.io.IOException.class}; + Class[] parms = {PortletRequest.class, PortletResponse.class}; + tr4.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletRequestDispatcher_SIG_hasForwardReturns */ + /* Details: "Method forward(PortletRequest, PortletResponse) returns void " */ + TestResult tr5 = tcd.getTestResultFailed(PORTLETREQUESTDISPATCHER_SIG_HASFORWARDRETURNS); + { + String name = "forward"; + Class retType = void.class; + Class[] parms = {PortletRequest.class, PortletResponse.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/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortletSession.java ---------------------------------------------------------------------- diff --git a/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortletSession.java b/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortletSession.java new file mode 100644 index 0000000..02b7905 --- /dev/null +++ b/portlet-tck_3.0/V2EnvironmentTests/src/main/java/javax/portlet/tck/EnvironmentTests/portlets/V2EnvironmentTests_SIG_PortletSession.java @@ -0,0 +1,499 @@ +/* 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.EnvironmentTests.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 V2EnvironmentTests_SIG_PortletSession implements Portlet { + private static final String LOG_CLASS = + V2EnvironmentTests_SIG_PortletSession.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(renderRequest.getPortletSession().getClass()); + + // Create result objects for the tests + + /* TestCase: PortletSession_SIG_fieldAPPLICATION_SCOPE */ + /* Details: "Has int field APPLICATION_SCOPE " */ + TestResult tr0 = tcd.getTestResultFailed(PORTLETSESSION_SIG_FIELDAPPLICATION_SCOPE); + { + tr0.setTcSuccess(cc.hasField("APPLICATION_SCOPE")); + } + + /* TestCase: PortletSession_SIG_fieldPORTLET_SCOPE */ + /* Details: "Has int field PORTLET_SCOPE " */ + TestResult tr1 = tcd.getTestResultFailed(PORTLETSESSION_SIG_FIELDPORTLET_SCOPE); + { + tr1.setTcSuccess(cc.hasField("PORTLET_SCOPE")); + } + + /* TestCase: PortletSession_SIG_hasGetAttribute */ + /* Details: "Has a getAttribute(String) method " */ + TestResult tr2 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETATTRIBUTE); + { + String name = "getAttribute"; + Class[] exceptions = null; + Class[] parms = {String.class}; + tr2.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletSession_SIG_hasGetAttributeReturns */ + /* Details: "Method getAttribute(String) returns Object " */ + TestResult tr3 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETATTRIBUTERETURNS); + { + String name = "getAttribute"; + Class retType = Object.class; + Class[] parms = {String.class}; + tr3.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletSession_SIG_hasGetAttributeA */ + /* Details: "Has a getAttribute(String, int) method " */ + TestResult tr4 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETATTRIBUTEA); + { + String name = "getAttribute"; + Class[] exceptions = null; + Class[] parms = {String.class, int.class}; + tr4.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletSession_SIG_hasGetAttributeReturnsA */ + /* Details: "Method getAttribute(String, int) returns Object " */ + TestResult tr5 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETATTRIBUTERETURNSA); + { + String name = "getAttribute"; + Class retType = Object.class; + Class[] parms = {String.class, int.class}; + tr5.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletSession_SIG_hasGetAttributeNames */ + /* Details: "Has a getAttributeNames() method " */ + TestResult tr6 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETATTRIBUTENAMES); + { + String name = "getAttributeNames"; + Class[] exceptions = null; + Class[] parms = null; + tr6.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletSession_SIG_hasGetAttributeNamesReturns */ + /* Details: "Method getAttributeNames() returns java.util.Enumeration " */ + TestResult tr7 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETATTRIBUTENAMESRETURNS); + { + String name = "getAttributeNames"; + Class retType = java.util.Enumeration.class; + Class[] parms = null; + tr7.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletSession_SIG_hasGetAttributeNamesA */ + /* Details: "Has a getAttributeNames(int) method " */ + TestResult tr8 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETATTRIBUTENAMESA); + { + String name = "getAttributeNames"; + Class[] exceptions = null; + Class[] parms = {int.class}; + tr8.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletSession_SIG_hasGetAttributeNamesReturnsA */ + /* Details: "Method getAttributeNames(int) returns java.util.Enumeration " */ + TestResult tr9 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETATTRIBUTENAMESRETURNSA); + { + String name = "getAttributeNames"; + Class retType = java.util.Enumeration.class; + Class[] parms = {int.class}; + tr9.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletSession_SIG_hasGetCreationTime */ + /* Details: "Has a getCreationTime() method " */ + TestResult tr10 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETCREATIONTIME); + { + String name = "getCreationTime"; + Class[] exceptions = null; + Class[] parms = null; + tr10.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletSession_SIG_hasGetCreationTimeReturns */ + /* Details: "Method getCreationTime() returns long " */ + TestResult tr11 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETCREATIONTIMERETURNS); + { + String name = "getCreationTime"; + Class retType = long.class; + Class[] parms = null; + tr11.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletSession_SIG_hasGetId */ + /* Details: "Has a getId() method " */ + TestResult tr12 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETID); + { + String name = "getId"; + Class[] exceptions = null; + Class[] parms = null; + tr12.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletSession_SIG_hasGetIdReturns */ + /* Details: "Method getId() returns String " */ + TestResult tr13 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETIDRETURNS); + { + String name = "getId"; + Class retType = String.class; + Class[] parms = null; + tr13.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletSession_SIG_hasGetLastAccessedTime */ + /* Details: "Has a getLastAccessedTime() method " */ + TestResult tr14 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETLASTACCESSEDTIME); + { + String name = "getLastAccessedTime"; + Class[] exceptions = null; + Class[] parms = null; + tr14.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletSession_SIG_hasGetLastAccessedTimeReturns */ + /* Details: "Method getLastAccessedTime() returns long " */ + TestResult tr15 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETLASTACCESSEDTIMERETURNS); + { + String name = "getLastAccessedTime"; + Class retType = long.class; + Class[] parms = null; + tr15.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletSession_SIG_hasGetMaxInactiveInterval */ + /* Details: "Has a getMaxInactiveInterval() method " */ + TestResult tr16 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETMAXINACTIVEINTERVAL); + { + String name = "getMaxInactiveInterval"; + Class[] exceptions = null; + Class[] parms = null; + tr16.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletSession_SIG_hasGetMaxInactiveIntervalReturns */ + /* Details: "Method getMaxInactiveInterval() returns int " */ + TestResult tr17 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETMAXINACTIVEINTERVALRETURNS); + { + String name = "getMaxInactiveInterval"; + Class retType = int.class; + Class[] parms = null; + tr17.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletSession_SIG_hasInvalidate */ + /* Details: "Has a invalidate() method " */ + TestResult tr18 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASINVALIDATE); + { + String name = "invalidate"; + Class[] exceptions = null; + Class[] parms = null; + tr18.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletSession_SIG_hasInvalidateReturns */ + /* Details: "Method invalidate() returns void " */ + TestResult tr19 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASINVALIDATERETURNS); + { + String name = "invalidate"; + Class retType = void.class; + Class[] parms = null; + tr19.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletSession_SIG_hasIsNew */ + /* Details: "Has a isNew() method " */ + TestResult tr20 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASISNEW); + { + String name = "isNew"; + Class[] exceptions = null; + Class[] parms = null; + tr20.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletSession_SIG_hasIsNewReturns */ + /* Details: "Method isNew() returns boolean " */ + TestResult tr21 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASISNEWRETURNS); + { + String name = "isNew"; + Class retType = boolean.class; + Class[] parms = null; + tr21.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletSession_SIG_hasRemoveAttribute */ + /* Details: "Has a removeAttribute(String) method " */ + TestResult tr22 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASREMOVEATTRIBUTE); + { + String name = "removeAttribute"; + Class[] exceptions = null; + Class[] parms = {String.class}; + tr22.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletSession_SIG_hasRemoveAttributeReturns */ + /* Details: "Method removeAttribute(String) returns void " */ + TestResult tr23 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASREMOVEATTRIBUTERETURNS); + { + String name = "removeAttribute"; + Class retType = void.class; + Class[] parms = {String.class}; + tr23.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletSession_SIG_hasRemoveAttributeA */ + /* Details: "Has a removeAttribute(String, int) method " */ + TestResult tr24 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASREMOVEATTRIBUTEA); + { + String name = "removeAttribute"; + Class[] exceptions = null; + Class[] parms = {String.class, int.class}; + tr24.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletSession_SIG_hasRemoveAttributeReturnsA */ + /* Details: "Method removeAttribute(String, int) returns void " */ + TestResult tr25 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASREMOVEATTRIBUTERETURNSA); + { + String name = "removeAttribute"; + Class retType = void.class; + Class[] parms = {String.class, int.class}; + tr25.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletSession_SIG_hasSetAttribute */ + /* Details: "Has a setAttribute(String, Object) method " */ + TestResult tr26 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASSETATTRIBUTE); + { + String name = "setAttribute"; + Class[] exceptions = null; + Class[] parms = {String.class, Object.class}; + tr26.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletSession_SIG_hasSetAttributeReturns */ + /* Details: "Method setAttribute(String, Object) returns void " */ + TestResult tr27 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASSETATTRIBUTERETURNS); + { + String name = "setAttribute"; + Class retType = void.class; + Class[] parms = {String.class, Object.class}; + tr27.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletSession_SIG_hasSetAttributeA */ + /* Details: "Has a setAttribute(String, Object, int) method " */ + TestResult tr28 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASSETATTRIBUTEA); + { + String name = "setAttribute"; + Class[] exceptions = null; + Class[] parms = {String.class, Object.class, int.class}; + tr28.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletSession_SIG_hasSetAttributeReturnsA */ + /* Details: "Method setAttribute(String, Object, int) returns void " */ + TestResult tr29 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASSETATTRIBUTERETURNSA); + { + String name = "setAttribute"; + Class retType = void.class; + Class[] parms = {String.class, Object.class, int.class}; + tr29.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletSession_SIG_hasSetMaxInactiveInterval */ + /* Details: "Has a setMaxInactiveInterval(int) method " */ + TestResult tr30 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASSETMAXINACTIVEINTERVAL); + { + String name = "setMaxInactiveInterval"; + Class[] exceptions = null; + Class[] parms = {int.class}; + tr30.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletSession_SIG_hasSetMaxInactiveIntervalReturns */ + /* Details: "Method setMaxInactiveInterval(int) returns void " */ + TestResult tr31 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASSETMAXINACTIVEINTERVALRETURNS); + { + String name = "setMaxInactiveInterval"; + Class retType = void.class; + Class[] parms = {int.class}; + tr31.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletSession_SIG_hasGetPortletContext */ + /* Details: "Has a getPortletContext() method " */ + TestResult tr32 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETPORTLETCONTEXT); + { + String name = "getPortletContext"; + Class[] exceptions = null; + Class[] parms = null; + tr32.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletSession_SIG_hasGetPortletContextReturns */ + /* Details: "Method getPortletContext() returns PortletContext " */ + TestResult tr33 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETPORTLETCONTEXTRETURNS); + { + String name = "getPortletContext"; + Class retType = PortletContext.class; + Class[] parms = null; + tr33.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletSession_SIG_hasGetAttributeMap */ + /* Details: "Has a getAttributeMap() method " */ + TestResult tr34 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETATTRIBUTEMAP); + { + String name = "getAttributeMap"; + Class[] exceptions = null; + Class[] parms = null; + tr34.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletSession_SIG_hasGetAttributeMapReturns */ + /* Details: "Method getAttributeMap() returns java.util.Map " */ + TestResult tr35 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETATTRIBUTEMAPRETURNS); + { + String name = "getAttributeMap"; + Class retType = java.util.Map.class; + Class[] parms = null; + tr35.setTcSuccess(cc.methodHasReturnType(name, retType, parms)); + } + + /* TestCase: PortletSession_SIG_hasGetAttributeMapA */ + /* Details: "Has a getAttributeMap(int) method " */ + TestResult tr36 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETATTRIBUTEMAPA); + { + String name = "getAttributeMap"; + Class[] exceptions = null; + Class[] parms = {int.class}; + tr36.setTcSuccess(cc.hasMethod(name, parms, exceptions)); + } + + /* TestCase: PortletSession_SIG_hasGetAttributeMapReturnsA */ + /* Details: "Method getAttributeMap(int) returns java.util.Map " */ + TestResult tr37 = tcd.getTestResultFailed(PORTLETSESSION_SIG_HASGETATTRIBUTEMAPRETURNSA); + { + String name = "getAttributeMap"; + Class retType = java.util.Map.class; + Class[] parms = {int.class}; + tr37.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); + + + } + +} +