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/10/08 13:02:49 UTC
[26/30] worked on URL tests
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/2239b205/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_PortletURL_ApiRenderActurl.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_PortletURL_ApiRenderActurl.java b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_PortletURL_ApiRenderActurl.java
index 21e887f..78ca21b 100644
--- a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_PortletURL_ApiRenderActurl.java
+++ b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_PortletURL_ApiRenderActurl.java
@@ -72,6 +72,55 @@ public class URLTests_PortletURL_ApiRenderActurl implements Portlet, ResourceSer
StringWriter writer = new StringWriter();
+ // evaluate results for test case V2URLTests_PortletURL_ApiRenderActurl_setWindowState1
+ {
+ JSR286ApiTestCaseDetails tcd = new JSR286ApiTestCaseDetails();
+ TestResult tr0 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETWINDOWSTATE1);
+ String tcval = portletReq.getParameter("tc");
+ if (tcval.equals("V2URLTests_PortletURL_ApiRenderActurl_setWindowState1")) {
+ WindowState ws = portletReq.getWindowState();
+ boolean ok = (ws.equals(WindowState.NORMAL));
+ if (!ok) {
+ String wstr = (ws==null) ? "null" : ws.toString();
+ tr0.appendTcDetail("WindowState expected: " + WindowState.NORMAL + ", actual: " + wstr);
+ }
+ tr0.setTcSuccess(ok);
+ PortletSession ps = portletReq.getPortletSession();
+ ps.setAttribute(RESULT_ATTR_PREFIX + "V2URLTests_PortletURL_ApiRenderActurl_setWindowState1", tr0);
+ }
+ }
+
+ // evaluate results for test case V2URLTests_PortletURL_ApiRenderActurl_setPortletMode1
+ {
+ JSR286ApiTestCaseDetails tcd = new JSR286ApiTestCaseDetails();
+ TestResult tr2 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETPORTLETMODE1);
+ String tcval = portletReq.getParameter("tc");
+ if (tcval.equals("V2URLTests_PortletURL_ApiRenderActurl_setPortletMode1")) {
+ PortletMode pm = portletReq.getPortletMode();
+ boolean ok = (pm.equals(PortletMode.VIEW));
+ if (!ok) {
+ String pstr = (pm==null) ? "null" : pm.toString();
+ tr2.appendTcDetail("PortletMode expected: " + PortletMode.VIEW + ", actual: " + pstr);
+ }
+ tr2.setTcSuccess(ok);
+ PortletSession ps = portletReq.getPortletSession();
+ ps.setAttribute(RESULT_ATTR_PREFIX + "V2URLTests_PortletURL_ApiRenderActurl_setPortletMode1", tr2);
+ }
+ }
+
+ // evaluate results for test case V2URLTests_PortletURL_ApiRenderActurl_removePublicRenderParameter1
+ {
+ JSR286ApiTestCaseDetails tcd = new JSR286ApiTestCaseDetails();
+ TestResult tr9 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_REMOVEPUBLICRENDERPARAMETER1);
+ String tcval = portletReq.getParameter("tc");
+ if (tcval.equals("V2URLTests_PortletURL_ApiRenderActurl_removePublicRenderParameter1")) {
+ String val = portletReq.getParameter("tckPRP1");
+ CompareUtils.stringsEqual("Request PRP name=tckPRP1 ", val, " expected ", null, tr9);
+ PortletSession ps = portletReq.getPortletSession();
+ ps.setAttribute(RESULT_ATTR_PREFIX + "V2URLTests_PortletURL_ApiRenderActurl_removePublicRenderParameter1", tr9);
+ }
+ }
+
}
@Override
@@ -107,8 +156,34 @@ public class URLTests_PortletURL_ApiRenderActurl implements Portlet, ResourceSer
/* Details: "Method setWindowState(WindowState): Sets the WindowState */
/* to be used when the URL is activated" */
TestResult tr0 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETWINDOWSTATE1);
- /* TODO: implement test */
- tr0.appendTcDetail("Not implemented.");
+ try {
+ PortletURL turl = portletResp.createActionURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderActurl_setWindowState1");
+ turl.setWindowState(WindowState.NORMAL);
+
+ // if possible set the window state to full through the setup link
+ if (portletReq.isWindowStateAllowed(WindowState.MAXIMIZED)) {
+ PortletURL rurl = portletResp.createRenderURL();
+ rurl.setWindowState(WindowState.MAXIMIZED);
+ TestSetupLink tsl = new TestSetupLink("V2URLTests_PortletURL_ApiRenderActurl_setWindowState1", rurl);
+ tsl.writeTo(writer);
+ }
+
+ // add the execution button for an action request
+ TestButton tb = new TestButton("V2URLTests_PortletURL_ApiRenderActurl_setWindowState1", turl);
+ tb.writeTo(writer);
+
+ // display evaluated results
+ String tcval = portletReq.getParameter("tc");
+ if (tcval.equals("V2URLTests_PortletURL_ApiRenderActurl_setWindowState1")) {
+ PortletSession ps = portletReq.getPortletSession();
+ TestResult tmp = (TestResult)ps.getAttribute(RESULT_ATTR_PREFIX + "V2URLTests_PortletURL_ApiRenderActurl_setWindowState1");
+ if (tmp != null) {
+ tr0 = tmp;
+ ps.removeAttribute(RESULT_ATTR_PREFIX + "V2URLTests_PortletURL_ApiRenderActurl_setWindowState1");
+ }
+ }
+ } catch(Exception e) {tr0.appendTcDetail(e.toString());}
tr0.writeTo(writer);
/* TestCase: V2URLTests_PortletURL_ApiRenderActurl_setWindowState2 */
@@ -116,119 +191,199 @@ public class URLTests_PortletURL_ApiRenderActurl implements Portlet, ResourceSer
/* WindowStateException if the portal does not support the specified */
/* Window State" */
TestResult tr1 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETWINDOWSTATE2);
- /* TODO: implement test */
- tr1.appendTcDetail("Not implemented.");
+ try {
+ PortletURL turl = portletResp.createActionURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderActurl_setWindowState2");
+ try {
+ WindowState ws = new WindowState("UnsupportedState");
+ turl.setWindowState(ws);
+ } catch(WindowStateException e) {
+ tr1.setTcSuccess(true);
+ }
+ } catch(Exception e) {tr1.appendTcDetail(e.toString());}
tr1.writeTo(writer);
- /* TestCase: V2URLTests_PortletURL_ApiRenderActurl_setWindowState3 */
- /* Details: "Method setWindowState(WindowState): Throws */
- /* WindowStateException if the specified WindowState is not declared */
- /* in the deployment descriptor" */
- TestResult tr2 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETWINDOWSTATE3);
- /* TODO: implement test */
- tr2.appendTcDetail("Not implemented.");
- tr2.writeTo(writer);
-
- /* TestCase: V2URLTests_PortletURL_ApiRenderActurl_setWindowState4 */
- /* Details: "Method setWindowState(WindowState): Throws */
- /* WindowStateException if the user is not allowed to switch to the */
- /* specified WindowState" */
- TestResult tr3 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETWINDOWSTATE4);
- /* TODO: implement test */
- tr3.appendTcDetail("Not implemented.");
- tr3.writeTo(writer);
-
/* TestCase: V2URLTests_PortletURL_ApiRenderActurl_setPortletMode1 */
/* Details: "Method setPortletMode(PortletMode): Sets the PortletMode */
/* to be used when the URL is activated" */
- TestResult tr4 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETPORTLETMODE1);
- /* TODO: implement test */
- tr4.appendTcDetail("Not implemented.");
- tr4.writeTo(writer);
+ TestResult tr2 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETPORTLETMODE1);
+ try {
+ PortletURL turl = portletResp.createActionURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderActurl_setPortletMode1");
+ turl.setPortletMode(PortletMode.VIEW);
+
+ // if possible set the window state to full through the setup link
+ if (portletReq.isPortletModeAllowed(PortletMode.EDIT)) {
+ PortletURL rurl = portletResp.createRenderURL();
+ rurl.setPortletMode(PortletMode.EDIT);
+ TestSetupLink tsl = new TestSetupLink("V2URLTests_PortletURL_ApiRenderActurl_setPortletMode1", rurl);
+ tsl.writeTo(writer);
+ }
+
+ // add the execution button for an action request
+ TestButton tb = new TestButton("V2URLTests_PortletURL_ApiRenderActurl_setPortletMode1", turl);
+ tb.writeTo(writer);
+
+ // display evaluated results
+ String tcval = portletReq.getParameter("tc");
+ if (tcval.equals("V2URLTests_PortletURL_ApiRenderActurl_setPortletMode1")) {
+ PortletSession ps = portletReq.getPortletSession();
+ TestResult tmp = (TestResult)ps.getAttribute(RESULT_ATTR_PREFIX + "V2URLTests_PortletURL_ApiRenderActurl_setPortletMode1");
+ if (tmp != null) {
+ tr2 = tmp;
+ ps.removeAttribute(RESULT_ATTR_PREFIX + "V2URLTests_PortletURL_ApiRenderActurl_setPortletMode1");
+ }
+ }
+ } catch(Exception e) {tr2.appendTcDetail(e.toString());}
+ tr2.writeTo(writer);
/* TestCase: V2URLTests_PortletURL_ApiRenderActurl_setPortletMode2 */
/* Details: "Method setPortletMode(PortletMode): Throws */
/* PortletModeException if the portal does not support the specified */
- /* Window State" */
- TestResult tr5 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETPORTLETMODE2);
- /* TODO: implement test */
- tr5.appendTcDetail("Not implemented.");
- tr5.writeTo(writer);
+ /* PortletMode" */
+ TestResult tr3 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETPORTLETMODE2);
+ try {
+ PortletURL turl = portletResp.createActionURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderActurl_setPortletMode2");
+ try {
+ PortletMode pm = new PortletMode("UnsupportedMode");
+ turl.setPortletMode(pm);
+ } catch(PortletModeException e) {
+ tr3.setTcSuccess(true);
+ }
+ } catch(Exception e) {tr3.appendTcDetail(e.toString());}
+ tr3.writeTo(writer);
/* TestCase: V2URLTests_PortletURL_ApiRenderActurl_setPortletMode3 */
/* Details: "Method setPortletMode(PortletMode): Throws */
/* PortletModeException if the specified PortletMode is not declared */
/* in the deployment descriptor" */
- TestResult tr6 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETPORTLETMODE3);
- /* TODO: implement test */
- tr6.appendTcDetail("Not implemented.");
- tr6.writeTo(writer);
-
- /* TestCase: V2URLTests_PortletURL_ApiRenderActurl_setPortletMode4 */
- /* Details: "Method setPortletMode(PortletMode): Throws */
- /* PortletModeException if the user is not allowed to switch to the */
- /* specified PortletMode" */
- TestResult tr7 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETPORTLETMODE4);
- /* TODO: implement test */
- tr7.appendTcDetail("Not implemented.");
- tr7.writeTo(writer);
+ TestResult tr4 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETPORTLETMODE3);
+ try {
+ PortletURL turl = portletResp.createActionURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderActurl_setPortletMode3");
+ try {
+ turl.setPortletMode(PortletMode.HELP);
+ } catch(PortletModeException e) {
+ tr4.setTcSuccess(true);
+ }
+ } catch(Exception e) {tr4.appendTcDetail(e.toString());}
+ tr4.writeTo(writer);
/* TestCase: V2URLTests_PortletURL_ApiRenderActurl_getPortletMode1 */
/* Details: "Method getPortletMode(): Returns the PortletMode object */
/* set on the URL" */
- TestResult tr8 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_GETPORTLETMODE1);
- /* TODO: implement test */
- tr8.appendTcDetail("Not implemented.");
- tr8.writeTo(writer);
+ TestResult tr5 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_GETPORTLETMODE1);
+ try {
+ PortletURL turl = portletResp.createActionURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderActurl_getPortletMode1");
+ turl.setPortletMode(PortletMode.VIEW);
+ PortletMode pm = turl.getPortletMode();
+ boolean ok = (pm != null);
+ if (!ok) {
+ tr5.appendTcDetail("PortletMode expected: " + PortletMode.VIEW + ", actual: " + "null");
+ }
+ tr5.setTcSuccess(ok);
+ } catch(Exception e) {tr5.appendTcDetail(e.toString());}
+ tr5.writeTo(writer);
/* TestCase: V2URLTests_PortletURL_ApiRenderActurl_getPortletMode2 */
/* Details: "Method getPortletMode(): Returns null if the PortletMode */
/* has not been set" */
- TestResult tr9 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_GETPORTLETMODE2);
- /* TODO: implement test */
- tr9.appendTcDetail("Not implemented.");
- tr9.writeTo(writer);
+ TestResult tr6 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_GETPORTLETMODE2);
+ try {
+ PortletURL turl = portletResp.createActionURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderActurl_getPortletMode2");
+ PortletMode pm = turl.getPortletMode();
+ boolean ok = (pm == null);
+ if (!ok) {
+ tr6.appendTcDetail("PortletMode expected: null, actual: " + pm.toString());
+ }
+ tr6.setTcSuccess(ok);
+ } catch(Exception e) {tr6.appendTcDetail(e.toString());}
+ tr6.writeTo(writer);
/* TestCase: V2URLTests_PortletURL_ApiRenderActurl_getWindowState1 */
/* Details: "Method getWindowState(): Returns the WindowState object */
/* set on the URL" */
- TestResult tr10 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_GETWINDOWSTATE1);
- /* TODO: implement test */
- tr10.appendTcDetail("Not implemented.");
- tr10.writeTo(writer);
+ TestResult tr7 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_GETWINDOWSTATE1);
+ try {
+ PortletURL turl = portletResp.createActionURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderActurl_getWindowState1");
+ turl.setWindowState(WindowState.NORMAL);
+ WindowState ws = turl.getWindowState();
+ boolean ok = (ws != null);
+ if (!ok) {
+ tr7.appendTcDetail("WindowState expected: " + WindowState.NORMAL + ", actual: " + "null");
+ }
+ tr7.setTcSuccess(ok);
+ } catch(Exception e) {tr7.appendTcDetail(e.toString());}
+ tr7.writeTo(writer);
/* TestCase: V2URLTests_PortletURL_ApiRenderActurl_getWindowState2 */
/* Details: "Method getWindowState(): Returns null if the Window */
/* State has not been set" */
- TestResult tr11 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_GETWINDOWSTATE2);
- /* TODO: implement test */
- tr11.appendTcDetail("Not implemented.");
- tr11.writeTo(writer);
+ TestResult tr8 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_GETWINDOWSTATE2);
+ try {
+ PortletURL turl = portletResp.createActionURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderActurl_getWindowState2");
+ WindowState ws = turl.getWindowState();
+ boolean ok = (ws == null);
+ if (!ok) {
+ tr8.appendTcDetail("WindowState expected: null, actual: " + ws.toString());
+ }
+ tr8.setTcSuccess(ok);
+ } catch(Exception e) {tr8.appendTcDetail(e.toString());}
+ tr8.writeTo(writer);
/* TestCase: V2URLTests_PortletURL_ApiRenderActurl_removePublicRenderParameter1 */
/* Details: "Method removePublicRenderParameter(String): Removes the */
/* specified public render parameter" */
- TestResult tr12 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_REMOVEPUBLICRENDERPARAMETER1);
- /* TODO: implement test */
- tr12.appendTcDetail("Not implemented.");
- tr12.writeTo(writer);
+ TestResult tr9 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_REMOVEPUBLICRENDERPARAMETER1);
+ try {
+ PortletURL turl = portletResp.createActionURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderActurl_removePublicRenderParameter1");
+ turl.removePublicRenderParameter("tckPRP1");
+
+// set the prp through the setup link
+ PortletURL rurl = portletResp.createRenderURL();
+ rurl.setParameter("tckPRP1", "V2URLTests_PortletURL_ApiRenderActurl_removePublicRenderParameter1");
+ TestSetupLink tsl = new TestSetupLink("V2URLTests_PortletURL_ApiRenderActurl_removePublicRenderParameter1", rurl);
+ tsl.writeTo(writer);
+
+ // add the execution button for an action request
+ TestButton tb = new TestButton("V2URLTests_PortletURL_ApiRenderActurl_removePublicRenderParameter1", turl);
+ tb.writeTo(writer);
+
+ // display evaluated results
+ String tcval = portletReq.getParameter("tc");
+ if (tcval.equals("V2URLTests_PortletURL_ApiRenderActurl_removePublicRenderParameter1")) {
+ PortletSession ps = portletReq.getPortletSession();
+ TestResult tmp = (TestResult)ps.getAttribute(RESULT_ATTR_PREFIX + "V2URLTests_PortletURL_ApiRenderActurl_removePublicRenderParameter1");
+ if (tmp != null) {
+ tr9 = tmp;
+ ps.removeAttribute(RESULT_ATTR_PREFIX + "V2URLTests_PortletURL_ApiRenderActurl_removePublicRenderParameter1");
+ }
+ }
+ } catch(Exception e) {tr9.appendTcDetail(e.toString());}
+ tr9.writeTo(writer);
/* TestCase: V2URLTests_PortletURL_ApiRenderActurl_removePublicRenderParameter2 */
/* Details: "Method removePublicRenderParameter(String): Throws */
/* IllegalArgumentException if the name is null" */
- TestResult tr13 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_REMOVEPUBLICRENDERPARAMETER2);
+ TestResult tr10 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERACTURL_REMOVEPUBLICRENDERPARAMETER2);
try {
try {
PortletURL turl = portletResp.createActionURL();
turl.removePublicRenderParameter(null);
- tr13.appendTcDetail("Method did not throw an exception.");
+ tr10.appendTcDetail("Method did not throw an exception.");
} catch (IllegalArgumentException iae) {
- tr13.setTcSuccess(true);
+ tr10.setTcSuccess(true);
} catch (Exception e) {
- tr13.appendTcDetail(e.toString());
+ tr10.appendTcDetail(e.toString());
}
- } catch(Exception e) {tr13.appendTcDetail(e.toString());}
- tr13.writeTo(writer);
+ } catch(Exception e) {tr10.appendTcDetail(e.toString());}
+ tr10.writeTo(writer);
}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/2239b205/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_PortletURL_ApiRenderRenurl.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_PortletURL_ApiRenderRenurl.java b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_PortletURL_ApiRenderRenurl.java
index 2571c74..2fb1778 100644
--- a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_PortletURL_ApiRenderRenurl.java
+++ b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_PortletURL_ApiRenderRenurl.java
@@ -107,8 +107,35 @@ public class URLTests_PortletURL_ApiRenderRenurl implements Portlet, ResourceSer
/* Details: "Method setWindowState(WindowState): Sets the WindowState */
/* to be used when the URL is activated" */
TestResult tr0 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETWINDOWSTATE1);
- /* TODO: implement test */
- tr0.appendTcDetail("Not implemented.");
+ try {
+ PortletURL turl = portletResp.createRenderURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderRenurl_setWindowState1");
+ turl.setWindowState(WindowState.NORMAL);
+
+ // if possible set the window state to full through the setup link
+ if (portletReq.isWindowStateAllowed(WindowState.MAXIMIZED)) {
+ PortletURL rurl = portletResp.createRenderURL();
+ rurl.setWindowState(WindowState.MAXIMIZED);
+ TestSetupLink tsl = new TestSetupLink("V2URLTests_PortletURL_ApiRenderRenurl_setWindowState1", rurl);
+ tsl.writeTo(writer);
+ }
+
+ // add the execution link
+ TestLink tl = new TestLink("V2URLTests_PortletURL_ApiRenderRenurl_setWindowState1", turl);
+ tl.writeTo(writer);
+
+ // evaluate results
+ String tcval = portletReq.getParameter("tc");
+ if (tcval.equals("V2URLTests_PortletURL_ApiRenderRenurl_setWindowState1")) {
+ WindowState ws = portletReq.getWindowState();
+ boolean ok = (ws.equals(WindowState.NORMAL));
+ if (!ok) {
+ String wstr = (ws==null) ? "null" : ws.toString();
+ tr0.appendTcDetail("WindowState expected: " + WindowState.NORMAL + ", actual: " + wstr);
+ }
+ tr0.setTcSuccess(ok);
+ }
+ } catch(Exception e) {tr0.appendTcDetail(e.toString());}
tr0.writeTo(writer);
/* TestCase: V2URLTests_PortletURL_ApiRenderRenurl_setWindowState2 */
@@ -116,119 +143,196 @@ public class URLTests_PortletURL_ApiRenderRenurl implements Portlet, ResourceSer
/* WindowStateException if the portal does not support the specified */
/* Window State" */
TestResult tr1 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETWINDOWSTATE2);
- /* TODO: implement test */
- tr1.appendTcDetail("Not implemented.");
+ try {
+ PortletURL turl = portletResp.createRenderURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderRenurl_setWindowState2");
+ try {
+ WindowState ws = new WindowState("UnsupportedState");
+ turl.setWindowState(ws);
+ } catch(WindowStateException e) {
+ tr1.setTcSuccess(true);
+ }
+ } catch(Exception e) {tr1.appendTcDetail(e.toString());}
tr1.writeTo(writer);
- /* TestCase: V2URLTests_PortletURL_ApiRenderRenurl_setWindowState3 */
- /* Details: "Method setWindowState(WindowState): Throws */
- /* WindowStateException if the specified WindowState is not declared */
- /* in the deployment descriptor" */
- TestResult tr2 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETWINDOWSTATE3);
- /* TODO: implement test */
- tr2.appendTcDetail("Not implemented.");
- tr2.writeTo(writer);
-
- /* TestCase: V2URLTests_PortletURL_ApiRenderRenurl_setWindowState4 */
- /* Details: "Method setWindowState(WindowState): Throws */
- /* WindowStateException if the user is not allowed to switch to the */
- /* specified WindowState" */
- TestResult tr3 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETWINDOWSTATE4);
- /* TODO: implement test */
- tr3.appendTcDetail("Not implemented.");
- tr3.writeTo(writer);
-
/* TestCase: V2URLTests_PortletURL_ApiRenderRenurl_setPortletMode1 */
/* Details: "Method setPortletMode(PortletMode): Sets the PortletMode */
/* to be used when the URL is activated" */
- TestResult tr4 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETPORTLETMODE1);
- /* TODO: implement test */
- tr4.appendTcDetail("Not implemented.");
- tr4.writeTo(writer);
+ TestResult tr2 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETPORTLETMODE1);
+ try {
+ PortletURL turl = portletResp.createRenderURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderRenurl_setPortletMode1");
+ turl.setPortletMode(PortletMode.VIEW);
+
+ // if possible set the window state to full through the setup link
+ if (portletReq.isPortletModeAllowed(PortletMode.EDIT)) {
+ PortletURL rurl = portletResp.createRenderURL();
+ rurl.setPortletMode(PortletMode.EDIT);
+ TestSetupLink tsl = new TestSetupLink("V2URLTests_PortletURL_ApiRenderRenurl_setPortletMode1", rurl);
+ tsl.writeTo(writer);
+ }
+
+ // add the execution link
+ TestLink tl = new TestLink("V2URLTests_PortletURL_ApiRenderRenurl_setPortletMode1", turl);
+ tl.writeTo(writer);
+
+ // evaluate results
+ String tcval = portletReq.getParameter("tc");
+ if (tcval.equals("V2URLTests_PortletURL_ApiRenderRenurl_setPortletMode1")) {
+ PortletMode pm = portletReq.getPortletMode();
+ boolean ok = (pm.equals(PortletMode.VIEW));
+ if (!ok) {
+ String pstr = (pm==null) ? "null" : pm.toString();
+ tr2.appendTcDetail("PortletMode expected: " + PortletMode.VIEW + ", actual: " + pstr);
+ }
+ tr2.setTcSuccess(ok);
+ }
+ } catch(Exception e) {tr2.appendTcDetail(e.toString());}
+ tr2.writeTo(writer);
/* TestCase: V2URLTests_PortletURL_ApiRenderRenurl_setPortletMode2 */
/* Details: "Method setPortletMode(PortletMode): Throws */
/* PortletModeException if the portal does not support the specified */
- /* Window State" */
- TestResult tr5 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETPORTLETMODE2);
- /* TODO: implement test */
- tr5.appendTcDetail("Not implemented.");
- tr5.writeTo(writer);
+ /* PortletMode" */
+ TestResult tr3 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETPORTLETMODE2);
+ try {
+ PortletURL turl = portletResp.createRenderURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderRenurl_setPortletMode2");
+ try {
+ PortletMode pm = new PortletMode("UnsupportedMode");
+ turl.setPortletMode(pm);
+ } catch(PortletModeException e) {
+ tr3.setTcSuccess(true);
+ }
+ } catch(Exception e) {tr3.appendTcDetail(e.toString());}
+ tr3.writeTo(writer);
/* TestCase: V2URLTests_PortletURL_ApiRenderRenurl_setPortletMode3 */
/* Details: "Method setPortletMode(PortletMode): Throws */
/* PortletModeException if the specified PortletMode is not declared */
/* in the deployment descriptor" */
- TestResult tr6 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETPORTLETMODE3);
- /* TODO: implement test */
- tr6.appendTcDetail("Not implemented.");
- tr6.writeTo(writer);
-
- /* TestCase: V2URLTests_PortletURL_ApiRenderRenurl_setPortletMode4 */
- /* Details: "Method setPortletMode(PortletMode): Throws */
- /* PortletModeException if the user is not allowed to switch to the */
- /* specified PortletMode" */
- TestResult tr7 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETPORTLETMODE4);
- /* TODO: implement test */
- tr7.appendTcDetail("Not implemented.");
- tr7.writeTo(writer);
+ TestResult tr4 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETPORTLETMODE3);
+ try {
+ PortletURL turl = portletResp.createRenderURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderRenurl_setPortletMode3");
+ try {
+ turl.setPortletMode(PortletMode.HELP);
+ } catch(PortletModeException e) {
+ tr4.setTcSuccess(true);
+ }
+ } catch(Exception e) {tr4.appendTcDetail(e.toString());}
+ tr4.writeTo(writer);
/* TestCase: V2URLTests_PortletURL_ApiRenderRenurl_getPortletMode1 */
/* Details: "Method getPortletMode(): Returns the PortletMode object */
/* set on the URL" */
- TestResult tr8 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_GETPORTLETMODE1);
- /* TODO: implement test */
- tr8.appendTcDetail("Not implemented.");
- tr8.writeTo(writer);
+ TestResult tr5 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_GETPORTLETMODE1);
+ try {
+ PortletURL turl = portletResp.createRenderURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderRenurl_getPortletMode1");
+ turl.setPortletMode(PortletMode.VIEW);
+ PortletMode pm = turl.getPortletMode();
+ boolean ok = (pm != null);
+ if (!ok) {
+ tr5.appendTcDetail("PortletMode expected: " + PortletMode.VIEW + ", actual: " + "null");
+ }
+ tr5.setTcSuccess(ok);
+ } catch(Exception e) {tr5.appendTcDetail(e.toString());}
+ tr5.writeTo(writer);
/* TestCase: V2URLTests_PortletURL_ApiRenderRenurl_getPortletMode2 */
/* Details: "Method getPortletMode(): Returns null if the PortletMode */
/* has not been set" */
- TestResult tr9 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_GETPORTLETMODE2);
- /* TODO: implement test */
- tr9.appendTcDetail("Not implemented.");
- tr9.writeTo(writer);
+ TestResult tr6 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_GETPORTLETMODE2);
+ try {
+ PortletURL turl = portletResp.createRenderURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderRenurl_getPortletMode2");
+ PortletMode pm = turl.getPortletMode();
+ boolean ok = (pm == null);
+ if (!ok) {
+ tr6.appendTcDetail("PortletMode expected: null, actual: " + pm.toString());
+ }
+ tr6.setTcSuccess(ok);
+ } catch(Exception e) {tr6.appendTcDetail(e.toString());}
+ tr6.writeTo(writer);
/* TestCase: V2URLTests_PortletURL_ApiRenderRenurl_getWindowState1 */
/* Details: "Method getWindowState(): Returns the WindowState object */
/* set on the URL" */
- TestResult tr10 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_GETWINDOWSTATE1);
- /* TODO: implement test */
- tr10.appendTcDetail("Not implemented.");
- tr10.writeTo(writer);
+ TestResult tr7 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_GETWINDOWSTATE1);
+ try {
+ PortletURL turl = portletResp.createRenderURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderRenurl_getWindowState1");
+ turl.setWindowState(WindowState.NORMAL);
+ WindowState ws = turl.getWindowState();
+ boolean ok = (ws != null);
+ if (!ok) {
+ tr7.appendTcDetail("WindowState expected: " + WindowState.NORMAL + ", actual: " + "null");
+ }
+ tr7.setTcSuccess(ok);
+ } catch(Exception e) {tr7.appendTcDetail(e.toString());}
+ tr7.writeTo(writer);
/* TestCase: V2URLTests_PortletURL_ApiRenderRenurl_getWindowState2 */
/* Details: "Method getWindowState(): Returns null if the Window */
/* State has not been set" */
- TestResult tr11 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_GETWINDOWSTATE2);
- /* TODO: implement test */
- tr11.appendTcDetail("Not implemented.");
- tr11.writeTo(writer);
+ TestResult tr8 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_GETWINDOWSTATE2);
+ try {
+ PortletURL turl = portletResp.createRenderURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderRenurl_getWindowState2");
+ WindowState ws = turl.getWindowState();
+ boolean ok = (ws == null);
+ if (!ok) {
+ tr8.appendTcDetail("WindowState expected: null, actual: " + ws.toString());
+ }
+ tr8.setTcSuccess(ok);
+ } catch(Exception e) {tr8.appendTcDetail(e.toString());}
+ tr8.writeTo(writer);
/* TestCase: V2URLTests_PortletURL_ApiRenderRenurl_removePublicRenderParameter1 */
/* Details: "Method removePublicRenderParameter(String): Removes the */
/* specified public render parameter" */
- TestResult tr12 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_REMOVEPUBLICRENDERPARAMETER1);
- /* TODO: implement test */
- tr12.appendTcDetail("Not implemented.");
- tr12.writeTo(writer);
+ TestResult tr9 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_REMOVEPUBLICRENDERPARAMETER1);
+ try {
+ PortletURL turl = portletResp.createRenderURL();
+ turl.setParameter("tc", "V2URLTests_PortletURL_ApiRenderRenurl_removePublicRenderParameter1");
+ turl.removePublicRenderParameter("tckPRP1");
+
+// set the prp through the setup link
+ PortletURL rurl = portletResp.createRenderURL();
+ rurl.setParameter("tckPRP1", "V2URLTests_PortletURL_ApiRenderRenurl_removePublicRenderParameter1");
+ TestSetupLink tsl = new TestSetupLink("V2URLTests_PortletURL_ApiRenderRenurl_removePublicRenderParameter1", rurl);
+ tsl.writeTo(writer);
+
+ // add the execution link
+ TestLink tl = new TestLink("V2URLTests_PortletURL_ApiRenderRenurl_removePublicRenderParameter1", turl);
+ tl.writeTo(writer);
+
+ // evaluate results
+ String tcval = portletReq.getParameter("tc");
+ if (tcval.equals("V2URLTests_PortletURL_ApiRenderRenurl_removePublicRenderParameter1")) {
+ String val = portletReq.getParameter("tckPRP1");
+ CompareUtils.stringsEqual("Request PRP name=tckPRP1 ", val, " expected ", null, tr9);
+ }
+ } catch(Exception e) {tr9.appendTcDetail(e.toString());}
+ tr9.writeTo(writer);
/* TestCase: V2URLTests_PortletURL_ApiRenderRenurl_removePublicRenderParameter2 */
/* Details: "Method removePublicRenderParameter(String): Throws */
/* IllegalArgumentException if the name is null" */
- TestResult tr13 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_REMOVEPUBLICRENDERPARAMETER2);
+ TestResult tr10 = tcd.getTestResultFailed(V2URLTESTS_PORTLETURL_APIRENDERRENURL_REMOVEPUBLICRENDERPARAMETER2);
try {
try {
PortletURL turl = portletResp.createRenderURL();
turl.removePublicRenderParameter(null);
- tr13.appendTcDetail("Method did not throw an exception.");
+ tr10.appendTcDetail("Method did not throw an exception.");
} catch (IllegalArgumentException iae) {
- tr13.setTcSuccess(true);
+ tr10.setTcSuccess(true);
} catch (Exception e) {
- tr13.appendTcDetail(e.toString());
+ tr10.appendTcDetail(e.toString());
}
- } catch(Exception e) {tr13.appendTcDetail(e.toString());}
- tr13.writeTo(writer);
+ } catch(Exception e) {tr10.appendTcDetail(e.toString());}
+ tr10.writeTo(writer);
}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/2239b205/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_ResourceURL_ApiRenderResurl.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_ResourceURL_ApiRenderResurl.java b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_ResourceURL_ApiRenderResurl.java
index 82e8e2b..23c91b0 100644
--- a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_ResourceURL_ApiRenderResurl.java
+++ b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_ResourceURL_ApiRenderResurl.java
@@ -84,6 +84,56 @@ public class URLTests_ResourceURL_ApiRenderResurl implements Portlet, ResourceSe
PrintWriter writer = portletResp.getWriter();
+ // evaluate results for test case V2URLTests_ResourceURL_ApiRenderResurl_setResourceID
+ {
+ JSR286ApiTestCaseDetails tcd = new JSR286ApiTestCaseDetails();
+ TestResult tr4 = tcd.getTestResultFailed(V2URLTESTS_RESOURCEURL_APIRENDERRESURL_SETRESOURCEID);
+ String tcval = portletReq.getParameter("tc");
+ if (tcval.equals("V2URLTests_ResourceURL_ApiRenderResurl_setResourceID")) {
+ String resid = portletReq.getResourceID();
+ boolean ok = (resid.equals("TestResourceID"));
+ if (!ok) {
+ tr4.appendTcDetail("ResourceID expected: \"TestResourceID\", actual: " + resid);
+ }
+ tr4.setTcSuccess(ok);
+ tr4.writeTo(writer);
+ }
+ }
+
+ // evaluate results for test case V2URLTests_ResourceURL_ApiRenderResurl_setCacheability1
+ {
+ JSR286ApiTestCaseDetails tcd = new JSR286ApiTestCaseDetails();
+ TestResult tr6 = tcd.getTestResultFailed(V2URLTESTS_RESOURCEURL_APIRENDERRESURL_SETCACHEABILITY1);
+ String tcval = portletReq.getParameter("tc");
+ if (tcval.equals("V2URLTests_ResourceURL_ApiRenderResurl_setCacheability1")) {
+ String c = portletReq.getCacheability();
+ boolean ok = (c.equals(ResourceURL.PORTLET));
+ if (!ok) {
+ tr6.appendTcDetail("Cacheability expected: " + ResourceURL.PORTLET + ", actual: " + c);
+ }
+ tr6.setTcSuccess(ok);
+ tr6.writeTo(writer);
+ }
+ }
+
+ // evaluate results for test case V2URLTests_ResourceURL_ApiRenderResurl_setCacheability3
+ {
+ JSR286ApiTestCaseDetails tcd = new JSR286ApiTestCaseDetails();
+ TestResult tr8 = tcd.getTestResultFailed(V2URLTESTS_RESOURCEURL_APIRENDERRESURL_SETCACHEABILITY3);
+ String tcval = portletReq.getParameter("tc");
+ if (tcval.equals("V2URLTests_ResourceURL_ApiRenderResurl_setCacheability3")) {
+ try {
+ ResourceURL rurl = portletResp.createResourceURL();
+ rurl.setCacheability(ResourceURL.PAGE);
+ } catch (IllegalStateException ise) {
+ tr8.setTcSuccess(true);
+ } catch (Exception e) {
+ tr8.appendTcDetail(e.toString());
+ }
+ tr8.writeTo(writer);
+ }
+ }
+
}
@Override
@@ -140,33 +190,69 @@ public class URLTests_ResourceURL_ApiRenderResurl implements Portlet, ResourceSe
/* Details: "Method setResourceID(String): Sets the specified String */
/* as the portlet resource ID" */
TestResult tr4 = tcd.getTestResultFailed(V2URLTESTS_RESOURCEURL_APIRENDERRESURL_SETRESOURCEID);
- /* TODO: implement test */
- tr4.appendTcDetail("Not implemented.");
- tr4.writeTo(writer);
+ try {
+ ResourceURL turl = portletResp.createResourceURL();
+ turl.setParameter("tc", "V2URLTests_ResourceURL_ApiRenderResurl_setResourceID");
+ turl.setResourceID("TestResourceID");
+
+ // add the resource results fetcher to the output stream
+ ResourceLink rl = new ResourceLink("V2URLTests_ResourceURL_ApiRenderResurl_setResourceID", turl);
+ rl.writeResourceFetcher(writer);
+ } catch(Exception e) {
+ tr4.appendTcDetail(e.toString());
+ tr4.writeTo(writer);
+ }
/* TestCase: V2URLTests_ResourceURL_ApiRenderResurl_getCacheability */
/* Details: "Method getCacheability(): Returns a String containing */
/* the cacheability level set on the resource URL" */
TestResult tr5 = tcd.getTestResultFailed(V2URLTESTS_RESOURCEURL_APIRENDERRESURL_GETCACHEABILITY);
- /* TODO: implement test */
- tr5.appendTcDetail("Not implemented.");
+ try {
+ ResourceURL turl = portletResp.createResourceURL();
+ turl.setParameter("tc", "V2URLTests_ResourceURL_ApiRenderResurl_getCacheability");
+ String c = turl.getCacheability();
+ boolean ok = false;
+ ok = ok || ((c != null) && ResourceURL.PAGE.equals(c));
+ if (!ok) {
+ tr5.appendTcDetail("Cacheability expected: " + ResourceURL.PAGE + ", actual: " + c);
+ }
+ tr5.setTcSuccess(ok);
+ } catch(Exception e) {tr5.appendTcDetail(e.toString());}
tr5.writeTo(writer);
/* TestCase: V2URLTests_ResourceURL_ApiRenderResurl_setCacheability1 */
/* Details: "Method setCacheability(String): Sets the cacheability */
/* level for the resource URL" */
TestResult tr6 = tcd.getTestResultFailed(V2URLTESTS_RESOURCEURL_APIRENDERRESURL_SETCACHEABILITY1);
- /* TODO: implement test */
- tr6.appendTcDetail("Not implemented.");
- tr6.writeTo(writer);
+ try {
+ ResourceURL turl = portletResp.createResourceURL();
+ turl.setParameter("tc", "V2URLTests_ResourceURL_ApiRenderResurl_setCacheability1");
+ turl.setCacheability(ResourceURL.PORTLET);
+
+ // add the resource results fetcher to the output stream
+ ResourceLink rl = new ResourceLink("V2URLTests_ResourceURL_ApiRenderResurl_setCacheability1", turl);
+ rl.writeResourceFetcher(writer);
+ } catch(Exception e) {
+ tr6.appendTcDetail(e.toString());
+ tr6.writeTo(writer);
+ }
/* TestCase: V2URLTests_ResourceURL_ApiRenderResurl_setCacheability2 */
/* Details: "Method setCacheability(String): Throws */
/* IllegalArgumentException if the input parameter does not have a */
/* value of \"FULL\", \"PAGE\", or \"PORTLET\"" */
TestResult tr7 = tcd.getTestResultFailed(V2URLTESTS_RESOURCEURL_APIRENDERRESURL_SETCACHEABILITY2);
- /* TODO: implement test */
- tr7.appendTcDetail("Not implemented.");
+ try {
+ ResourceURL turl = portletResp.createResourceURL();
+ turl.setParameter("tc", "V2URLTests_ResourceURL_ApiRenderResurl_setCacheability2");
+ try {
+ turl.setCacheability("InvalidCacheability");;
+ } catch (IllegalArgumentException iae) {
+ tr7.setTcSuccess(true);
+ } catch (Exception e) {
+ tr7.appendTcDetail(e.toString());
+ }
+ } catch(Exception e) {tr7.appendTcDetail(e.toString());}
tr7.writeTo(writer);
/* TestCase: V2URLTests_ResourceURL_ApiRenderResurl_setCacheability3 */
@@ -174,9 +260,18 @@ public class URLTests_ResourceURL_ApiRenderResurl implements Portlet, ResourceSe
/* IllegalStateException if the specified cacheability level is */
/* weaker than the cacheability level for the parent resource URL" */
TestResult tr8 = tcd.getTestResultFailed(V2URLTESTS_RESOURCEURL_APIRENDERRESURL_SETCACHEABILITY3);
- /* TODO: implement test */
- tr8.appendTcDetail("Not implemented.");
- tr8.writeTo(writer);
+ try {
+ ResourceURL turl = portletResp.createResourceURL();
+ turl.setParameter("tc", "V2URLTests_ResourceURL_ApiRenderResurl_setCacheability3");
+ turl.setCacheability(ResourceURL.PORTLET);
+
+ // add the resource results fetcher to the output stream
+ ResourceLink rl = new ResourceLink("V2URLTests_ResourceURL_ApiRenderResurl_setCacheability3", turl);
+ rl.writeResourceFetcher(writer);
+ } catch(Exception e) {
+ tr8.appendTcDetail(e.toString());
+ tr8.writeTo(writer);
+ }
}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/2239b205/portlet-tck_3.0/V2URLTests/src/main/resources/xml-resources/additionalTCs.xml
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2URLTests/src/main/resources/xml-resources/additionalTCs.xml b/portlet-tck_3.0/V2URLTests/src/main/resources/xml-resources/additionalTCs.xml
index 6cbe822..09e56e2 100644
--- a/portlet-tck_3.0/V2URLTests/src/main/resources/xml-resources/additionalTCs.xml
+++ b/portlet-tck_3.0/V2URLTests/src/main/resources/xml-resources/additionalTCs.xml
@@ -116,12 +116,9 @@
<entry key="V2URLTests_BaseURL_ApiRenderResurl_setProperty3">V2URLTests</entry>
<entry key="V2URLTests_PortletURL_ApiRenderRenurl_setWindowState1">V2URLTests</entry>
<entry key="V2URLTests_PortletURL_ApiRenderRenurl_setWindowState2">V2URLTests</entry>
-<entry key="V2URLTests_PortletURL_ApiRenderRenurl_setWindowState3">V2URLTests</entry>
-<entry key="V2URLTests_PortletURL_ApiRenderRenurl_setWindowState4">V2URLTests</entry>
<entry key="V2URLTests_PortletURL_ApiRenderRenurl_setPortletMode1">V2URLTests</entry>
<entry key="V2URLTests_PortletURL_ApiRenderRenurl_setPortletMode2">V2URLTests</entry>
<entry key="V2URLTests_PortletURL_ApiRenderRenurl_setPortletMode3">V2URLTests</entry>
-<entry key="V2URLTests_PortletURL_ApiRenderRenurl_setPortletMode4">V2URLTests</entry>
<entry key="V2URLTests_PortletURL_ApiRenderRenurl_getPortletMode1">V2URLTests</entry>
<entry key="V2URLTests_PortletURL_ApiRenderRenurl_getPortletMode2">V2URLTests</entry>
<entry key="V2URLTests_PortletURL_ApiRenderRenurl_getWindowState1">V2URLTests</entry>
@@ -130,12 +127,9 @@
<entry key="V2URLTests_PortletURL_ApiRenderRenurl_removePublicRenderParameter2">V2URLTests</entry>
<entry key="V2URLTests_PortletURL_ApiRenderActurl_setWindowState1">V2URLTests</entry>
<entry key="V2URLTests_PortletURL_ApiRenderActurl_setWindowState2">V2URLTests</entry>
-<entry key="V2URLTests_PortletURL_ApiRenderActurl_setWindowState3">V2URLTests</entry>
-<entry key="V2URLTests_PortletURL_ApiRenderActurl_setWindowState4">V2URLTests</entry>
<entry key="V2URLTests_PortletURL_ApiRenderActurl_setPortletMode1">V2URLTests</entry>
<entry key="V2URLTests_PortletURL_ApiRenderActurl_setPortletMode2">V2URLTests</entry>
<entry key="V2URLTests_PortletURL_ApiRenderActurl_setPortletMode3">V2URLTests</entry>
-<entry key="V2URLTests_PortletURL_ApiRenderActurl_setPortletMode4">V2URLTests</entry>
<entry key="V2URLTests_PortletURL_ApiRenderActurl_getPortletMode1">V2URLTests</entry>
<entry key="V2URLTests_PortletURL_ApiRenderActurl_getPortletMode2">V2URLTests</entry>
<entry key="V2URLTests_PortletURL_ApiRenderActurl_getWindowState1">V2URLTests</entry>
@@ -156,13 +150,16 @@
<entry key="V2URLTests_PortletURLGenerationListener_ApiRender_filterActionURL2">V2URLTests</entry>
<entry key="V2URLTests_PortletURLGenerationListener_ApiRender_filterActionURL3">V2URLTests</entry>
<entry key="V2URLTests_PortletURLGenerationListener_ApiRender_filterActionURL4">V2URLTests</entry>
+<entry key="V2URLTests_PortletURLGenerationListener_ApiRender_filterActionURL5">V2URLTests</entry>
+<entry key="V2URLTests_PortletURLGenerationListener_ApiRender_filterRenderURL1">V2URLTests</entry>
+<entry key="V2URLTests_PortletURLGenerationListener_ApiRender_filterRenderURL2">V2URLTests</entry>
+<entry key="V2URLTests_PortletURLGenerationListener_ApiRender_filterRenderURL3">V2URLTests</entry>
+<entry key="V2URLTests_PortletURLGenerationListener_ApiRender_filterRenderURL4">V2URLTests</entry>
<entry key="V2URLTests_PortletURLGenerationListener_ApiRender_filterRenderURL5">V2URLTests</entry>
-<entry key="V2URLTests_PortletURLGenerationListener_ApiRender_filterRenderURL6">V2URLTests</entry>
-<entry key="V2URLTests_PortletURLGenerationListener_ApiRender_filterRenderURL7">V2URLTests</entry>
-<entry key="V2URLTests_PortletURLGenerationListener_ApiRender_filterRenderURL8">V2URLTests</entry>
<entry key="V2URLTests_PortletURLGenerationListener_ApiRender_filterResourceURL1">V2URLTests</entry>
<entry key="V2URLTests_PortletURLGenerationListener_ApiRender_filterResourceURL2">V2URLTests</entry>
<entry key="V2URLTests_PortletURLGenerationListener_ApiRender_filterResourceURL3">V2URLTests</entry>
<entry key="V2URLTests_PortletURLGenerationListener_ApiRender_filterResourceURL4">V2URLTests</entry>
<entry key="V2URLTests_PortletURLGenerationListener_ApiRender_filterResourceURL5">V2URLTests</entry>
+<entry key="V2URLTests_PortletURLGenerationListener_ApiRender_filterResourceURL7">V2URLTests</entry>
</properties>
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/2239b205/portlet-tck_3.0/V2URLTests/src/main/webapp/WEB-INF/portlet.xml
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2URLTests/src/main/webapp/WEB-INF/portlet.xml b/portlet-tck_3.0/V2URLTests/src/main/webapp/WEB-INF/portlet.xml
index 460e44d..782931a 100644
--- a/portlet-tck_3.0/V2URLTests/src/main/webapp/WEB-INF/portlet.xml
+++ b/portlet-tck_3.0/V2URLTests/src/main/webapp/WEB-INF/portlet.xml
@@ -70,6 +70,8 @@
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
</supports>
<supported-locale>en_US</supported-locale>
<portlet-info>
@@ -84,6 +86,8 @@
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
</supports>
<supported-locale>en_US</supported-locale>
<portlet-info>
@@ -112,6 +116,8 @@
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
</supports>
<supported-locale>en_US</supported-locale>
<portlet-info>
@@ -126,4 +132,7 @@
<identifier>tckPRP1</identifier>
<qname>tck:tckPRP1</qname>
</public-render-parameter>
+ <listener>
+ <listener-class>javax.portlet.tck.listeners.TestPortletURLGenerationListener</listener-class>
+ </listener>
</portlet-app>
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/2239b205/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/JSR286ApiTestCaseDetails.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/JSR286ApiTestCaseDetails.java b/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/JSR286ApiTestCaseDetails.java
index d274624..8395fb3 100644
--- a/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/JSR286ApiTestCaseDetails.java
+++ b/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/JSR286ApiTestCaseDetails.java
@@ -1062,12 +1062,9 @@ public class JSR286ApiTestCaseDetails extends TestCaseDetails {
public final static String V2URLTESTS_BASEURL_APIRENDERRESURL_SETPROPERTY3 = "V2URLTests_BaseURL_ApiRenderResurl_setProperty3";
public final static String V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETWINDOWSTATE1 = "V2URLTests_PortletURL_ApiRenderRenurl_setWindowState1";
public final static String V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETWINDOWSTATE2 = "V2URLTests_PortletURL_ApiRenderRenurl_setWindowState2";
- public final static String V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETWINDOWSTATE3 = "V2URLTests_PortletURL_ApiRenderRenurl_setWindowState3";
- public final static String V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETWINDOWSTATE4 = "V2URLTests_PortletURL_ApiRenderRenurl_setWindowState4";
public final static String V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETPORTLETMODE1 = "V2URLTests_PortletURL_ApiRenderRenurl_setPortletMode1";
public final static String V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETPORTLETMODE2 = "V2URLTests_PortletURL_ApiRenderRenurl_setPortletMode2";
public final static String V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETPORTLETMODE3 = "V2URLTests_PortletURL_ApiRenderRenurl_setPortletMode3";
- public final static String V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETPORTLETMODE4 = "V2URLTests_PortletURL_ApiRenderRenurl_setPortletMode4";
public final static String V2URLTESTS_PORTLETURL_APIRENDERRENURL_GETPORTLETMODE1 = "V2URLTests_PortletURL_ApiRenderRenurl_getPortletMode1";
public final static String V2URLTESTS_PORTLETURL_APIRENDERRENURL_GETPORTLETMODE2 = "V2URLTests_PortletURL_ApiRenderRenurl_getPortletMode2";
public final static String V2URLTESTS_PORTLETURL_APIRENDERRENURL_GETWINDOWSTATE1 = "V2URLTests_PortletURL_ApiRenderRenurl_getWindowState1";
@@ -1076,12 +1073,9 @@ public class JSR286ApiTestCaseDetails extends TestCaseDetails {
public final static String V2URLTESTS_PORTLETURL_APIRENDERRENURL_REMOVEPUBLICRENDERPARAMETER2 = "V2URLTests_PortletURL_ApiRenderRenurl_removePublicRenderParameter2";
public final static String V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETWINDOWSTATE1 = "V2URLTests_PortletURL_ApiRenderActurl_setWindowState1";
public final static String V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETWINDOWSTATE2 = "V2URLTests_PortletURL_ApiRenderActurl_setWindowState2";
- public final static String V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETWINDOWSTATE3 = "V2URLTests_PortletURL_ApiRenderActurl_setWindowState3";
- public final static String V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETWINDOWSTATE4 = "V2URLTests_PortletURL_ApiRenderActurl_setWindowState4";
public final static String V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETPORTLETMODE1 = "V2URLTests_PortletURL_ApiRenderActurl_setPortletMode1";
public final static String V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETPORTLETMODE2 = "V2URLTests_PortletURL_ApiRenderActurl_setPortletMode2";
public final static String V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETPORTLETMODE3 = "V2URLTests_PortletURL_ApiRenderActurl_setPortletMode3";
- public final static String V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETPORTLETMODE4 = "V2URLTests_PortletURL_ApiRenderActurl_setPortletMode4";
public final static String V2URLTESTS_PORTLETURL_APIRENDERACTURL_GETPORTLETMODE1 = "V2URLTests_PortletURL_ApiRenderActurl_getPortletMode1";
public final static String V2URLTESTS_PORTLETURL_APIRENDERACTURL_GETPORTLETMODE2 = "V2URLTests_PortletURL_ApiRenderActurl_getPortletMode2";
public final static String V2URLTESTS_PORTLETURL_APIRENDERACTURL_GETWINDOWSTATE1 = "V2URLTests_PortletURL_ApiRenderActurl_getWindowState1";
@@ -1102,15 +1096,18 @@ public class JSR286ApiTestCaseDetails extends TestCaseDetails {
public final static String V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERACTIONURL2 = "V2URLTests_PortletURLGenerationListener_ApiRender_filterActionURL2";
public final static String V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERACTIONURL3 = "V2URLTests_PortletURLGenerationListener_ApiRender_filterActionURL3";
public final static String V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERACTIONURL4 = "V2URLTests_PortletURLGenerationListener_ApiRender_filterActionURL4";
+ public final static String V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERACTIONURL5 = "V2URLTests_PortletURLGenerationListener_ApiRender_filterActionURL5";
+ public final static String V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRENDERURL1 = "V2URLTests_PortletURLGenerationListener_ApiRender_filterRenderURL1";
+ public final static String V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRENDERURL2 = "V2URLTests_PortletURLGenerationListener_ApiRender_filterRenderURL2";
+ public final static String V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRENDERURL3 = "V2URLTests_PortletURLGenerationListener_ApiRender_filterRenderURL3";
+ public final static String V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRENDERURL4 = "V2URLTests_PortletURLGenerationListener_ApiRender_filterRenderURL4";
public final static String V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRENDERURL5 = "V2URLTests_PortletURLGenerationListener_ApiRender_filterRenderURL5";
- public final static String V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRENDERURL6 = "V2URLTests_PortletURLGenerationListener_ApiRender_filterRenderURL6";
- public final static String V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRENDERURL7 = "V2URLTests_PortletURLGenerationListener_ApiRender_filterRenderURL7";
- public final static String V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRENDERURL8 = "V2URLTests_PortletURLGenerationListener_ApiRender_filterRenderURL8";
public final static String V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRESOURCEURL1 = "V2URLTests_PortletURLGenerationListener_ApiRender_filterResourceURL1";
public final static String V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRESOURCEURL2 = "V2URLTests_PortletURLGenerationListener_ApiRender_filterResourceURL2";
public final static String V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRESOURCEURL3 = "V2URLTests_PortletURLGenerationListener_ApiRender_filterResourceURL3";
public final static String V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRESOURCEURL4 = "V2URLTests_PortletURLGenerationListener_ApiRender_filterResourceURL4";
public final static String V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRESOURCEURL5 = "V2URLTests_PortletURLGenerationListener_ApiRender_filterResourceURL5";
+ public final static String V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRESOURCEURL7 = "V2URLTests_PortletURLGenerationListener_ApiRender_filterResourceURL7";
public final static String V2EXCEPTIONTESTS_PORTLETMODEEXCEPTION_APIRENDER_HASGETMODE2 = "V2ExceptionTests_PortletModeException_ApiRender_hasGetMode2";
public final static String V2EXCEPTIONTESTS_UNAVAILABLEEXCEPTION_APIRENDER_ISPERMANENT1 = "V2ExceptionTests_UnavailableException_ApiRender_isPermanent1";
public final static String V2EXCEPTIONTESTS_UNAVAILABLEEXCEPTION_APIRENDER_ISPERMANENT2 = "V2ExceptionTests_UnavailableException_ApiRender_isPermanent2";
@@ -2510,8 +2507,8 @@ public class JSR286ApiTestCaseDetails extends TestCaseDetails {
tcd.put(V2URLTESTS_BASEURL_APIRENDERRENURL_GETPARAMETERMAP1, "Method getParameterMap(): Returns an java.util.Map<java.lang.String,java.lang.String[]> object for the parameter names and values if parameters are available");
tcd.put(V2URLTESTS_BASEURL_APIRENDERRENURL_GETPARAMETERMAP2, "Method getParameterMap(): The returned map contains all public and private parameters for the request");
tcd.put(V2URLTESTS_BASEURL_APIRENDERRENURL_GETPARAMETERMAP6, "Method getParameterMap(): Returns an empty map if no parameters exist");
- tcd.put(V2URLTESTS_BASEURL_APIRENDERRENURL_WRITEA1, "Method write(): Writes the URL to the output stream through the provided Writer");
- tcd.put(V2URLTESTS_BASEURL_APIRENDERRENURL_WRITEB1, "Method write(): Writes the URL to the output stream through the provided Writer");
+ tcd.put(V2URLTESTS_BASEURL_APIRENDERRENURL_WRITEA1, "Method write(Writer out): Writes the URL to the output stream through the provided Writer");
+ tcd.put(V2URLTESTS_BASEURL_APIRENDERRENURL_WRITEB1, "Method write(Writer out, boolean escapeXML): Writes the URL to the output stream through the provided Writer");
tcd.put(V2URLTESTS_BASEURL_APIRENDERRENURL_ADDPROPERTY1, "Method addProperty(String, String): A property can be added");
tcd.put(V2URLTESTS_BASEURL_APIRENDERRENURL_ADDPROPERTY3, "Method addProperty(String, String): Throws IllegalArgumentException if the specified key is null");
tcd.put(V2URLTESTS_BASEURL_APIRENDERRENURL_SETPROPERTY1, "Method setProperty(String, String): Sets a property value for the specified key");
@@ -2540,8 +2537,8 @@ public class JSR286ApiTestCaseDetails extends TestCaseDetails {
tcd.put(V2URLTESTS_BASEURL_APIRENDERACTURL_GETPARAMETERMAP1, "Method getParameterMap(): Returns an java.util.Map<java.lang.String,java.lang.String[]> object for the parameter names and values if parameters are available");
tcd.put(V2URLTESTS_BASEURL_APIRENDERACTURL_GETPARAMETERMAP3, "Method getParameterMap(): For an action URL, the returned map contains all action parameters for the request");
tcd.put(V2URLTESTS_BASEURL_APIRENDERACTURL_GETPARAMETERMAP6, "Method getParameterMap(): Returns an empty map if no parameters exist");
- tcd.put(V2URLTESTS_BASEURL_APIRENDERACTURL_WRITEA1, "Method write(): Writes the URL to the output stream through the provided Writer");
- tcd.put(V2URLTESTS_BASEURL_APIRENDERACTURL_WRITEB1, "Method write(): Writes the URL to the output stream through the provided Writer");
+ tcd.put(V2URLTESTS_BASEURL_APIRENDERACTURL_WRITEA1, "Method write(Writer out): Writes the URL to the output stream through the provided Writer");
+ tcd.put(V2URLTESTS_BASEURL_APIRENDERACTURL_WRITEB1, "Method write(Writer out, boolean escapeXML): Writes the URL to the output stream through the provided Writer");
tcd.put(V2URLTESTS_BASEURL_APIRENDERACTURL_ADDPROPERTY1, "Method addProperty(String, String): A property can be added");
tcd.put(V2URLTESTS_BASEURL_APIRENDERACTURL_ADDPROPERTY3, "Method addProperty(String, String): Throws IllegalArgumentException if the specified key is null");
tcd.put(V2URLTESTS_BASEURL_APIRENDERACTURL_SETPROPERTY1, "Method setProperty(String, String): Sets a property value for the specified key");
@@ -2571,20 +2568,17 @@ public class JSR286ApiTestCaseDetails extends TestCaseDetails {
tcd.put(V2URLTESTS_BASEURL_APIRENDERRESURL_GETPARAMETERMAP4, "Method getParameterMap(): The returned map contains all resource parameters for the request");
tcd.put(V2URLTESTS_BASEURL_APIRENDERRESURL_GETPARAMETERMAP5, "Method getParameterMap(): The returned map does not contain any render parameters for the request");
tcd.put(V2URLTESTS_BASEURL_APIRENDERRESURL_GETPARAMETERMAP6, "Method getParameterMap(): Returns an empty map if no parameters exist");
- tcd.put(V2URLTESTS_BASEURL_APIRENDERRESURL_WRITEA1, "Method write(): Writes the URL to the output stream through the provided Writer");
- tcd.put(V2URLTESTS_BASEURL_APIRENDERRESURL_WRITEB1, "Method write(): Writes the URL to the output stream through the provided Writer");
+ tcd.put(V2URLTESTS_BASEURL_APIRENDERRESURL_WRITEA1, "Method write(Writer out): Writes the URL to the output stream through the provided Writer");
+ tcd.put(V2URLTESTS_BASEURL_APIRENDERRESURL_WRITEB1, "Method write(Writer out, boolean escapeXML): Writes the URL to the output stream through the provided Writer");
tcd.put(V2URLTESTS_BASEURL_APIRENDERRESURL_ADDPROPERTY1, "Method addProperty(String, String): A property can be added");
tcd.put(V2URLTESTS_BASEURL_APIRENDERRESURL_ADDPROPERTY3, "Method addProperty(String, String): Throws IllegalArgumentException if the specified key is null");
tcd.put(V2URLTESTS_BASEURL_APIRENDERRESURL_SETPROPERTY1, "Method setProperty(String, String): Sets a property value for the specified key");
tcd.put(V2URLTESTS_BASEURL_APIRENDERRESURL_SETPROPERTY3, "Method setProperty(String, String): Throws IllegalArgumentException if the specified key is null");
tcd.put(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETWINDOWSTATE1, "Method setWindowState(WindowState): Sets the WindowState to be used when the URL is activated");
tcd.put(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETWINDOWSTATE2, "Method setWindowState(WindowState): Throws WindowStateException if the portal does not support the specified Window State");
- tcd.put(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETWINDOWSTATE3, "Method setWindowState(WindowState): Throws WindowStateException if the specified WindowState is not declared in the deployment descriptor");
- tcd.put(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETWINDOWSTATE4, "Method setWindowState(WindowState): Throws WindowStateException if the user is not allowed to switch to the specified WindowState");
tcd.put(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETPORTLETMODE1, "Method setPortletMode(PortletMode): Sets the PortletMode to be used when the URL is activated");
- tcd.put(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETPORTLETMODE2, "Method setPortletMode(PortletMode): Throws PortletModeException if the portal does not support the specified Window State");
+ tcd.put(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETPORTLETMODE2, "Method setPortletMode(PortletMode): Throws PortletModeException if the portal does not support the specified PortletMode");
tcd.put(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETPORTLETMODE3, "Method setPortletMode(PortletMode): Throws PortletModeException if the specified PortletMode is not declared in the deployment descriptor");
- tcd.put(V2URLTESTS_PORTLETURL_APIRENDERRENURL_SETPORTLETMODE4, "Method setPortletMode(PortletMode): Throws PortletModeException if the user is not allowed to switch to the specified PortletMode");
tcd.put(V2URLTESTS_PORTLETURL_APIRENDERRENURL_GETPORTLETMODE1, "Method getPortletMode(): Returns the PortletMode object set on the URL");
tcd.put(V2URLTESTS_PORTLETURL_APIRENDERRENURL_GETPORTLETMODE2, "Method getPortletMode(): Returns null if the PortletMode has not been set");
tcd.put(V2URLTESTS_PORTLETURL_APIRENDERRENURL_GETWINDOWSTATE1, "Method getWindowState(): Returns the WindowState object set on the URL");
@@ -2593,12 +2587,9 @@ public class JSR286ApiTestCaseDetails extends TestCaseDetails {
tcd.put(V2URLTESTS_PORTLETURL_APIRENDERRENURL_REMOVEPUBLICRENDERPARAMETER2, "Method removePublicRenderParameter(String): Throws IllegalArgumentException if the name is null");
tcd.put(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETWINDOWSTATE1, "Method setWindowState(WindowState): Sets the WindowState to be used when the URL is activated");
tcd.put(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETWINDOWSTATE2, "Method setWindowState(WindowState): Throws WindowStateException if the portal does not support the specified Window State");
- tcd.put(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETWINDOWSTATE3, "Method setWindowState(WindowState): Throws WindowStateException if the specified WindowState is not declared in the deployment descriptor");
- tcd.put(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETWINDOWSTATE4, "Method setWindowState(WindowState): Throws WindowStateException if the user is not allowed to switch to the specified WindowState");
tcd.put(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETPORTLETMODE1, "Method setPortletMode(PortletMode): Sets the PortletMode to be used when the URL is activated");
- tcd.put(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETPORTLETMODE2, "Method setPortletMode(PortletMode): Throws PortletModeException if the portal does not support the specified Window State");
+ tcd.put(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETPORTLETMODE2, "Method setPortletMode(PortletMode): Throws PortletModeException if the portal does not support the specified PortletMode");
tcd.put(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETPORTLETMODE3, "Method setPortletMode(PortletMode): Throws PortletModeException if the specified PortletMode is not declared in the deployment descriptor");
- tcd.put(V2URLTESTS_PORTLETURL_APIRENDERACTURL_SETPORTLETMODE4, "Method setPortletMode(PortletMode): Throws PortletModeException if the user is not allowed to switch to the specified PortletMode");
tcd.put(V2URLTESTS_PORTLETURL_APIRENDERACTURL_GETPORTLETMODE1, "Method getPortletMode(): Returns the PortletMode object set on the URL");
tcd.put(V2URLTESTS_PORTLETURL_APIRENDERACTURL_GETPORTLETMODE2, "Method getPortletMode(): Returns null if the PortletMode has not been set");
tcd.put(V2URLTESTS_PORTLETURL_APIRENDERACTURL_GETWINDOWSTATE1, "Method getWindowState(): Returns the WindowState object set on the URL");
@@ -2615,19 +2606,22 @@ public class JSR286ApiTestCaseDetails extends TestCaseDetails {
tcd.put(V2URLTESTS_RESOURCEURL_APIRENDERRESURL_SETCACHEABILITY2, "Method setCacheability(String): Throws IllegalArgumentException if the input parameter does not have a value of \"FULL\", \"PAGE\", or \"PORTLET\"");
tcd.put(V2URLTESTS_RESOURCEURL_APIRENDERRESURL_SETCACHEABILITY3, "Method setCacheability(String): Throws IllegalStateException if the specified cacheability level is weaker than the cacheability level for the parent resource URL");
tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_CONFIGURATION, "A PortletURLGenerationListener can be configured in the portlet deployment descriptor");
- tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERACTIONURL1, "Method filterActionURL(PortletURL): The filterActionURL(PortletURL): method is called before the toString or write methods are executed on an action URL");
- tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERACTIONURL2, "Method filterActionURL(PortletURL): The filterActionURL method is passed the PortletURL object representing the action URL");
- tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERACTIONURL3, "Method filterActionURL(PortletURL): 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");
- tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERACTIONURL4, "Method filterActionURL(PortletURL): 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");
- tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRENDERURL5, "Method filterRenderURL(PortletURL): The filterRenderURL(PortletURL): method is called before the toString or write methods are executed on an action URL");
- tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRENDERURL6, "Method filterRenderURL(PortletURL): The filterRenderURL method is passed the PortletURL object representing the action URL");
- tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRENDERURL7, "Method filterRenderURL(PortletURL): 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");
- tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRENDERURL8, "Method filterRenderURL(PortletURL): 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");
- tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRESOURCEURL1, "Method filterResourceURL(ResourceURL): The filterResourceURL(PortletURL): method is called before the toString or write methods are executed on an action URL");
- tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRESOURCEURL2, "Method filterResourceURL(ResourceURL): The filterResourceURL method is passed the PortletURL object representing the action URL");
- tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRESOURCEURL3, "Method filterResourceURL(ResourceURL): 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");
- tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRESOURCEURL4, "Method filterResourceURL(ResourceURL): 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");
- tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRESOURCEURL5, "Method filterResourceURL(ResourceURL): 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");
+ tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERACTIONURL1, "Method filterActionURL(PortletURL): The filterActionURL(PortletURL): method is called before the toString() method is executed");
+ tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERACTIONURL2, "Method filterActionURL(PortletURL): The filterActionURL(PortletURL): method is called before the write(Writer out) method is executed");
+ tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERACTIONURL3, "Method filterActionURL(PortletURL): The filterActionURL(PortletURL): method is called before the write(Writer out, boolean escapeXML) method is executed");
+ tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERACTIONURL4, "Method filterActionURL(PortletURL): The filterActionURL method is passed the PortletURL object representing the action URL");
+ tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERACTIONURL5, "Method filterActionURL(PortletURL): The input URL object can be modified by setting a parameter and the modified URL object is processed by the PortletURL toString or write method");
+ tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRENDERURL1, "Method filterRenderURL(PortletURL): The filterRenderURL(PortletURL): method is called before the toString() method is executed");
+ tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRENDERURL2, "Method filterRenderURL(PortletURL): The filterRenderURL(PortletURL): method is called before the write(Writer out) method is executed");
+ tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRENDERURL3, "Method filterRenderURL(PortletURL): The filterRenderURL(PortletURL): method is called before the write(Writer out, boolean escapeXML) method is executed");
+ tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRENDERURL4, "Method filterRenderURL(PortletURL): The filterRenderURL method is passed the PortletURL object representing the action URL");
+ tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRENDERURL5, "Method filterRenderURL(PortletURL): The input URL object can be modified by setting a parameter and the modified URL object is processed by the PortletURL toString or write method");
+ tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRESOURCEURL1, "Method filterResourceURL(ResourceURL): The filterResourceURL(PortletURL): method is called before the toString() method is executed");
+ tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRESOURCEURL2, "Method filterResourceURL(ResourceURL): The filterResourceURL(PortletURL): method is called before the write(Writer out) method is executed");
+ tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRESOURCEURL3, "Method filterResourceURL(ResourceURL): The filterResourceURL(PortletURL): method is called before the write(Writer out, boolean escapeXML) method is executed");
+ tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRESOURCEURL4, "Method filterResourceURL(ResourceURL): The filterResourceURL method is passed the PortletURL object representing the action URL");
+ tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRESOURCEURL5, "Method filterResourceURL(ResourceURL): The input URL object can be modified by setting a parameter and the modified URL object is processed by the PortletURL toString or write method");
+ tcd.put(V2URLTESTS_PORTLETURLGENERATIONLISTENER_APIRENDER_FILTERRESOURCEURL7, "Method filterResourceURL(ResourceURL): The input URL object can be modified by setting the resource ID and the modified URL object is processed by the PortletURL toString or write method");
tcd.put(V2EXCEPTIONTESTS_PORTLETMODEEXCEPTION_APIRENDER_HASGETMODE2, "Returns the PortletMode object causing this exception");
tcd.put(V2EXCEPTIONTESTS_UNAVAILABLEEXCEPTION_APIRENDER_ISPERMANENT1, "Method isPermanent(): Returns a boolean");
tcd.put(V2EXCEPTIONTESTS_UNAVAILABLEEXCEPTION_APIRENDER_ISPERMANENT2, "Method isPermanent(): Returns true if the portlet is permanently unavailable ");
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/2239b205/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/ResourceLink.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/ResourceLink.java b/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/ResourceLink.java
index 54dc50a..0ee747e 100644
--- a/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/ResourceLink.java
+++ b/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/ResourceLink.java
@@ -48,6 +48,7 @@ import javax.portlet.tck.constants.Constants;
public class ResourceLink {
String tcName;
+ String urlstr;
ResourceURL rurl;
String actId;
String resId;
@@ -64,6 +65,7 @@ public class ResourceLink {
divId = "";
title = "";
rurl = null;
+ urlstr = null;
}
/**
@@ -79,6 +81,24 @@ public class ResourceLink {
this.divId = tcName + Constants.RESOURCE_DIV_ID;
this.title = " Resource Link";
this.rurl = rurl;
+ this.urlstr = null;
+ }
+
+ /**
+ * Creates a resource link initialized with a URL in string form.
+ * This enables certain URL test cases such as "*URL.toString()"
+ *
+ * @param tcName test case name
+ * @param urlstr url for the test case in string form
+ */
+ public ResourceLink(String tcName, String urlstr) {
+ this.tcName = tcName;
+ this.actId = tcName + Constants.CLICK_ID;
+ this.resId = tcName + Constants.RESOURCE_LINK_ID;
+ this.divId = tcName + Constants.RESOURCE_DIV_ID;
+ this.title = " Resource Link";
+ this.urlstr = urlstr;
+ this.rurl = null;
}
/**
@@ -92,6 +112,7 @@ public class ResourceLink {
@Override
public String toString() {
+ if (urlstr == null) urlstr = rurl.toString();
StringBuilder sb = new StringBuilder();
sb.append("<div class='portletTCKTestcase' name='");
sb.append(tcName);
@@ -103,7 +124,7 @@ public class ResourceLink {
sb.append("<a class='portletTCKLink' id='");
sb.append(resId);
sb.append("' href='");
- sb.append(rurl.toString());
+ sb.append(urlstr);
sb.append("'>");
sb.append(tcName);
sb.append("</a>");
@@ -137,6 +158,7 @@ public class ResourceLink {
*/
public void writeResourceFetcher(Writer writer) throws IOException {
+ if (urlstr == null) urlstr = rurl.toString();
StringBuilder sb = new StringBuilder();
sb.append("<div class='portletTCKTestcase' name='").append(tcName);
sb.append("' id='").append(divId).append("'>\n");
@@ -157,7 +179,7 @@ public class ResourceLink {
sb.append(" document.getElementById('" + divId + "').innerHTML=xhr.responseText;\n");
sb.append(" }\n");
sb.append(" };\n");
- sb.append(" xhr.open('GET', '" + rurl.toString() + "',true);\n");
+ sb.append(" xhr.open('GET', '" + urlstr + "',true);\n");
sb.append(" xhr.send();\n");
sb.append(" };\n");
sb.append(" document.getElementById('" + actId + "').onclick = getRes;\n");
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/2239b205/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestButton.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestButton.java b/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestButton.java
index 8c474ca..54b8fb7 100644
--- a/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestButton.java
+++ b/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestButton.java
@@ -49,6 +49,7 @@ import javax.portlet.tck.constants.Constants;
public class TestButton {
private String tcName;
+ private String urlstr;
private PortletURL purl;
/**
@@ -57,6 +58,7 @@ public class TestButton {
public TestButton() {
tcName = "";
purl = null;
+ urlstr = null;
}
/**
@@ -68,6 +70,20 @@ public class TestButton {
public TestButton(String tcName, PortletURL purl) {
this.tcName = tcName;
this.purl = purl;
+ this.urlstr = null;
+ }
+
+ /**
+ * Creates a test link initialized with a URL in string form.
+ * This enables certain URL test cases such as "*URL.toString()"
+ *
+ * @param tcName test case name
+ * @param urlstr url for the test case in string form
+ */
+ public TestButton(String tcName, String urlstr) {
+ this.tcName = tcName;
+ this.urlstr = urlstr;
+ this.purl = null;
}
/**
@@ -82,6 +98,7 @@ public class TestButton {
public String toString() {
final String actId = tcName + Constants.CLICK_ID;
+ if (urlstr == null) urlstr = purl.toString();
StringBuilder sb = new StringBuilder();
sb.append("<div class='portletTCKTestcase' name='");
sb.append(tcName);
@@ -91,7 +108,7 @@ public class TestButton {
sb.append(" button (POST):");
sb.append("</h4>");
sb.append("<form class='portletTCKButton'" +
- " action='" + purl.toString() + "' method='post'>");
+ " action='" + urlstr + "' method='post'>");
sb.append("<input type='submit' value='" + tcName + "' id='" + actId + "'/>");
sb.append("</form>");
sb.append("</div>");
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/2239b205/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestLink.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestLink.java b/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestLink.java
index dcf0c7d..063e283 100644
--- a/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestLink.java
+++ b/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestLink.java
@@ -48,6 +48,7 @@ import javax.portlet.tck.constants.Constants;
public class TestLink {
String tcName;
+ String urlstr;
PortletURL purl;
String actId;
String title;
@@ -59,6 +60,7 @@ public class TestLink {
tcName = "";
actId = "";
title = "";
+ urlstr = null;
purl = null;
}
@@ -73,6 +75,22 @@ public class TestLink {
this.actId = tcName + Constants.CLICK_ID;
this.title = " Action Link";
this.purl = purl;
+ this.urlstr = null;
+ }
+
+ /**
+ * Creates a test link initialized with a URL in string form.
+ * This enables certain URL test cases such as "*URL.toString()"
+ *
+ * @param tcName test case name
+ * @param urlstr url for the test case in string form
+ */
+ public TestLink(String tcName, String urlstr) {
+ this.tcName = tcName;
+ this.actId = tcName + Constants.CLICK_ID;
+ this.title = " Action Link";
+ this.urlstr = urlstr;
+ this.purl = null;
}
/**
@@ -86,6 +104,7 @@ public class TestLink {
@Override
public String toString() {
+ if (urlstr == null) urlstr = purl.toString();
StringBuilder sb = new StringBuilder();
sb.append("<div class='portletTCKTestcase' name='");
sb.append(tcName);
@@ -97,7 +116,7 @@ public class TestLink {
sb.append("<a class='portletTCKLink' id='");
sb.append(actId);
sb.append("' href='");
- sb.append(purl.toString());
+ sb.append(urlstr);
sb.append("'>");
sb.append(tcName);
sb.append("</a>");