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 2015/01/14 12:05:47 UTC
[1/2] portals-pluto git commit: Added test case for public render
parameter aliases
Repository: portals-pluto
Updated Branches:
refs/heads/PortletHub 5a5bdb7f9 -> da05d7bdd
Added test case for public render parameter aliases
Project: http://git-wip-us.apache.org/repos/asf/portals-pluto/repo
Commit: http://git-wip-us.apache.org/repos/asf/portals-pluto/commit/018036b6
Tree: http://git-wip-us.apache.org/repos/asf/portals-pluto/tree/018036b6
Diff: http://git-wip-us.apache.org/repos/asf/portals-pluto/diff/018036b6
Branch: refs/heads/PortletHub
Commit: 018036b607db58098d6727d5527d5673cc463f5a
Parents: 98763f7
Author: Scott Nicklous <ms...@apache.org>
Authored: Wed Jan 14 11:30:14 2015 +0100
Committer: Scott Nicklous <ms...@apache.org>
Committed: Wed Jan 14 11:30:14 2015 +0100
----------------------------------------------------------------------
.../portlets/TestModule3_Portlet1.java | 24 +++--
.../src/main/webapp/WEB-INF/portlet.xml | 7 ++
.../portlets/TestModule3_Portlet2.java | 108 +++++++++++--------
.../src/main/webapp/WEB-INF/portlet.xml | 7 ++
.../tck/beans/TestModule3Definitions.java | 39 ++++---
5 files changed, 118 insertions(+), 67 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/018036b6/portlet-tck_3.0/TestModule3-portlet1/src/main/java/javax/portlet/tck/TestModule3/portlets/TestModule3_Portlet1.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/TestModule3-portlet1/src/main/java/javax/portlet/tck/TestModule3/portlets/TestModule3_Portlet1.java b/portlet-tck_3.0/TestModule3-portlet1/src/main/java/javax/portlet/tck/TestModule3/portlets/TestModule3_Portlet1.java
index 6320f4d..f4f6ef6 100644
--- a/portlet-tck_3.0/TestModule3-portlet1/src/main/java/javax/portlet/tck/TestModule3/portlets/TestModule3_Portlet1.java
+++ b/portlet-tck_3.0/TestModule3-portlet1/src/main/java/javax/portlet/tck/TestModule3/portlets/TestModule3_Portlet1.java
@@ -63,30 +63,40 @@ public class TestModule3_Portlet1 implements Portlet {
PrintWriter writer = response.getWriter();
- // Test: TestModule3_PublicRenderParameterTestDifferentPortletApplications
- // This portlet generates the link. The companion portlet
- // displays the results.
-
PortletURL purl;
TestLink tl;
-
+
+ // Test: TestModule3_PublicRenderParameterTestDifferentPortletApplications
+ // This portlet generates the link. The companion portlet displays the results.
purl = response.createRenderURL();
purl.setParameter(TM3PRP0, TEST0);
tl = new TestLink(TEST0, purl);
tl.writeTo(writer);
-
+
+ // Test: TestModule3_PublicRenderParameterTestDifferentQName
+ // This portlet generates the link. The companion portlet displays the results.
purl = response.createRenderURL();
purl.setParameter(TM3PRP0, TEST1);
purl.setParameter(TM3PRP1, TM3PRP1);
tl = new TestLink(TEST1, purl);
tl.writeTo(writer);
-
+
+ // Test: TestModule3_PublicRenderParameterTestDifferentIdentifier
+ // This portlet generates the link. The companion portlet displays the results.
purl = response.createRenderURL();
purl.setParameter(TM3PRP0, TEST2);
purl.setParameter(TM3PRP2, TM3PRP2);
tl = new TestLink(TEST2, purl);
tl.writeTo(writer);
+ // Test: TestModule3_PublicRenderParameterTestAlias
+ // This portlet generates the link. The companion portlet displays the results.
+ purl = response.createRenderURL();
+ purl.setParameter(TM3PRP0, TEST3);
+ purl.setParameter(TM3PRP3, TM3PRP3);
+ tl = new TestLink(TEST3, purl);
+ tl.writeTo(writer);
+
}
@Override
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/018036b6/portlet-tck_3.0/TestModule3-portlet1/src/main/webapp/WEB-INF/portlet.xml
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/TestModule3-portlet1/src/main/webapp/WEB-INF/portlet.xml b/portlet-tck_3.0/TestModule3-portlet1/src/main/webapp/WEB-INF/portlet.xml
index 4370912..674d4f2 100644
--- a/portlet-tck_3.0/TestModule3-portlet1/src/main/webapp/WEB-INF/portlet.xml
+++ b/portlet-tck_3.0/TestModule3-portlet1/src/main/webapp/WEB-INF/portlet.xml
@@ -37,6 +37,7 @@
<supported-public-render-parameter>TM3PRP</supported-public-render-parameter>
<supported-public-render-parameter>TM3DifferentQName</supported-public-render-parameter>
<supported-public-render-parameter>TM3DifferentIdentifier</supported-public-render-parameter>
+ <supported-public-render-parameter>TM3Alias.1</supported-public-render-parameter>
</portlet>
<public-render-parameter>
@@ -54,4 +55,10 @@
<qname xmlns:x="http://www.apache.org/portals/pluto/pub-render-params">x:TM3DifferentIdentifier</qname>
</public-render-parameter>
+ <public-render-parameter>
+ <identifier>TM3Alias.1</identifier>
+ <qname xmlns:x="http://www.apache.org/portals/pluto/pub-render-params">x:TM3Alias.1</qname>
+ <alias xmlns:x="http://www.apache.org/portals/pluto/pub-render-params">x:myAlias</alias>
+ </public-render-parameter>
+
</portlet-app>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/018036b6/portlet-tck_3.0/TestModule3-portlet2/src/main/java/javax/portlet/tck/TestModule3/portlets/TestModule3_Portlet2.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/TestModule3-portlet2/src/main/java/javax/portlet/tck/TestModule3/portlets/TestModule3_Portlet2.java b/portlet-tck_3.0/TestModule3-portlet2/src/main/java/javax/portlet/tck/TestModule3/portlets/TestModule3_Portlet2.java
index 40310a0..c38446c 100644
--- a/portlet-tck_3.0/TestModule3-portlet2/src/main/java/javax/portlet/tck/TestModule3/portlets/TestModule3_Portlet2.java
+++ b/portlet-tck_3.0/TestModule3-portlet2/src/main/java/javax/portlet/tck/TestModule3/portlets/TestModule3_Portlet2.java
@@ -64,52 +64,70 @@ public class TestModule3_Portlet2 implements Portlet {
PrintWriter writer = response.getWriter();
TestResult tr = null;
-
+
String test = request.getParameter(TM3PRP0);
if (test != null) {
-
- // Test: TestModule3_PublicRenderParameterTestDifferentPortletApplications
- // Details: A PRP set on the render URL is visible in companion portlet of
- // a different portlet application. Same QName & same identifier
-
- tr = tcd.getTestResultSucceeded(TEST0);
- tr.writeTo(writer);
-
- // Test: TestModule3_PublicRenderParameterTestDifferentQName
- // Details: A PRP matching identifier but differing QNames is not visible
- // in companion portlet of different portlet application
- // (expected to fail)
- if (test.equals(TEST1)) {
- String val = request.getParameter(TM3PRP1);
- if (val == null) {
- tr = tcd.getTestResultSucceeded(TEST1);
- } else {
- tr = tcd.getTestResultFailed(TEST1);
- tr.appendTcDetail("Expected value of parameter " + TM3PRP1 + ": null, Actual value: " + val);
- }
- tr.writeTo(writer);
- } else {
- TestMessage tm = new TestMessage(TEST1, "Waiting for test to be executed.");
- tm.writeTo(writer);
- }
-
- // Test: TestModule3_PublicRenderParameterTestDifferentIdentifier
- // Details: A PRP with matching QName but differing identifier is visible in
- // a companion portlet of different portlet application
- // (expected to succeed)
- if (test.equals(TEST2)) {
- String val = request.getParameter(TM3PRP2a);
- if (val != null) {
- tr = tcd.getTestResultSucceeded(TEST2);
- } else {
- tr = tcd.getTestResultFailed(TEST2);
- tr.appendTcDetail("Expected value of parameter " + TM3PRP2a + ": not null, Actual value: " + val);
- }
- tr.writeTo(writer);
- } else {
- TestMessage tm = new TestMessage(TEST2, "Waiting for test to be executed.");
- tm.writeTo(writer);
- }
+
+ // Test: TestModule3_PublicRenderParameterTestDifferentPortletApplications
+ // Details: A PRP set on the render URL is visible in companion portlet of
+ // a different portlet application. Same QName & same identifier
+
+ tr = tcd.getTestResultSucceeded(TEST0);
+ tr.writeTo(writer);
+
+ // Test: TestModule3_PublicRenderParameterTestDifferentQName
+ // Details: A PRP matching identifier but differing QNames is not visible
+ // in companion portlet of different portlet application
+ // (expected to fail)
+ if (test.equals(TEST1)) {
+ String val = request.getParameter(TM3PRP1);
+ if (val == null) {
+ tr = tcd.getTestResultSucceeded(TEST1);
+ } else {
+ tr = tcd.getTestResultFailed(TEST1);
+ tr.appendTcDetail("Expected value of parameter " + TM3PRP1 + ": null, Actual value: " + val);
+ }
+ tr.writeTo(writer);
+ } else {
+ TestMessage tm = new TestMessage(TEST1, "Waiting for test to be executed.");
+ tm.writeTo(writer);
+ }
+
+ // Test: TestModule3_PublicRenderParameterTestDifferentIdentifier
+ // Details: A PRP with matching QName but differing identifier is visible in
+ // a companion portlet of different portlet application
+ // (expected to succeed)
+ if (test.equals(TEST2)) {
+ String val = request.getParameter(TM3PRP2a);
+ if (val != null) {
+ tr = tcd.getTestResultSucceeded(TEST2);
+ } else {
+ tr = tcd.getTestResultFailed(TEST2);
+ tr.appendTcDetail("Expected value of parameter " + TM3PRP2a + ": " + TM3PRP2 + ", Actual value: " + val);
+ }
+ tr.writeTo(writer);
+ } else {
+ TestMessage tm = new TestMessage(TEST2, "Waiting for test to be executed.");
+ tm.writeTo(writer);
+ }
+
+ // Test: TestModule3_PublicRenderParameterTestAlias
+ // Details: A PRP with differing QNames & identifier, but with matching alias,
+ // is visible in companion portlet of different portlet application.
+ // (expected to succeed)
+ if (test.equals(TEST3)) {
+ String val = request.getParameter(TM3PRP3a);
+ if (val != null) {
+ tr = tcd.getTestResultSucceeded(TEST3);
+ } else {
+ tr = tcd.getTestResultFailed(TEST3);
+ tr.appendTcDetail("Expected value of parameter " + TM3PRP3a + ": " + TM3PRP3 + ", Actual value: " + val);
+ }
+ tr.writeTo(writer);
+ } else {
+ TestMessage tm = new TestMessage(TEST3, "Waiting for test to be executed.");
+ tm.writeTo(writer);
+ }
} else {
// test not executed yet, or was not correctly executed
@@ -119,6 +137,8 @@ public class TestModule3_Portlet2 implements Portlet {
tm.writeTo(writer);
tm = new TestMessage(TEST2, "Waiting for " + TM3PRP0 + " to be set.");
tm.writeTo(writer);
+ tm = new TestMessage(TEST3, "Waiting for " + TM3PRP0 + " to be set.");
+ tm.writeTo(writer);
}
}
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/018036b6/portlet-tck_3.0/TestModule3-portlet2/src/main/webapp/WEB-INF/portlet.xml
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/TestModule3-portlet2/src/main/webapp/WEB-INF/portlet.xml b/portlet-tck_3.0/TestModule3-portlet2/src/main/webapp/WEB-INF/portlet.xml
index 8cad439..59bf2ab 100644
--- a/portlet-tck_3.0/TestModule3-portlet2/src/main/webapp/WEB-INF/portlet.xml
+++ b/portlet-tck_3.0/TestModule3-portlet2/src/main/webapp/WEB-INF/portlet.xml
@@ -37,6 +37,7 @@
<supported-public-render-parameter>TM3PRP</supported-public-render-parameter>
<supported-public-render-parameter>TM3DifferentQName</supported-public-render-parameter>
<supported-public-render-parameter>TM3DifferentIdentifier-a</supported-public-render-parameter>
+ <supported-public-render-parameter>TM3Alias.2</supported-public-render-parameter>
</portlet>
<public-render-parameter>
@@ -54,4 +55,10 @@
<qname xmlns:x="http://www.apache.org/portals/pluto/pub-render-params">x:TM3DifferentIdentifier</qname>
</public-render-parameter>
+ <public-render-parameter>
+ <identifier>TM3Alias.2</identifier>
+ <qname xmlns:x="http://www.apache.org/portals/pluto/pub-render-params">x:TM3Alias.2</qname>
+ <alias xmlns:x="http://www.apache.org/portals/pluto/pub-render-params">x:myAlias</alias>
+ </public-render-parameter>
+
</portlet-app>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/018036b6/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestModule3Definitions.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestModule3Definitions.java b/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestModule3Definitions.java
index c063a16..9156e9a 100644
--- a/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestModule3Definitions.java
+++ b/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestModule3Definitions.java
@@ -25,22 +25,29 @@ package javax.portlet.tck.beans;
*/
public class TestModule3Definitions {
- public final static String TEST0 = "TestModule3_PublicRenderParameterTestDifferentPortletApplications";
- public final static String TEST1 = "TestModule3_PublicRenderParameterTestDifferentQName";
- public final static String TEST2 = "TestModule3_PublicRenderParameterTestDifferentIdentifier";
-
- public final static String TM3PRP0 = "TM3PRP";
- public final static String TM3PRP1 = "TM3DifferentQName";
- public final static String TM3PRP2 = "TM3DifferentIdentifier";
- public final static String TM3PRP2a = "TM3DifferentIdentifier-a";
+ // Test case names
+ public final static String TEST0 = "TestModule3_PublicRenderParameterTestDifferentPortletApplications";
+ public final static String TEST1 = "TestModule3_PublicRenderParameterTestDifferentQName";
+ public final static String TEST2 = "TestModule3_PublicRenderParameterTestDifferentIdentifier";
+ public final static String TEST3 = "TestModule3_PublicRenderParameterTestAlias";
- public final static TestCaseDetails tcd = initTests();
- private static TestCaseDetails initTests() {
- TestCaseDetails t = new TestCaseDetails();
- t.put(TEST0, "A PRP set on the render URL is visible in companion portlet of different portlet application. Same QName & Same identifier.");
- t.put(TEST1, "A PRP matching identifier but differing QNames is not visible in companion portlet of different portlet application.");
- t.put(TEST2, "A PRP with matching QName but differing identifier is visible in companion portlet of different portlet application.");
- return t;
- }
+ // PRP identifiers
+ public final static String TM3PRP0 = "TM3PRP";
+ public final static String TM3PRP1 = "TM3DifferentQName";
+ public final static String TM3PRP2 = "TM3DifferentIdentifier";
+ public final static String TM3PRP2a = "TM3DifferentIdentifier-a";
+ public final static String TM3PRP3 = "TM3Alias.1";
+ public final static String TM3PRP3a = "TM3Alias.2";
+
+ // Test case details
+ public final static TestCaseDetails tcd = initTests();
+ private static TestCaseDetails initTests() {
+ TestCaseDetails t = new TestCaseDetails();
+ t.put(TEST0, "A PRP set on the render URL is visible in companion portlet of different portlet application. Same QName & Same identifier.");
+ t.put(TEST1, "A PRP matching identifier but differing QNames is not visible in companion portlet of different portlet application.");
+ t.put(TEST2, "A PRP with matching QName but differing identifier is visible in companion portlet of different portlet application.");
+ t.put(TEST3, "A PRP with differing QNames & identifier, but with matching alias, is visible in companion portlet of different portlet application.");
+ return t;
+ }
}
[2/2] portals-pluto git commit: Merge branch 'master' into PortletHub
Posted by ms...@apache.org.
Merge branch 'master' into PortletHub
Project: http://git-wip-us.apache.org/repos/asf/portals-pluto/repo
Commit: http://git-wip-us.apache.org/repos/asf/portals-pluto/commit/da05d7bd
Tree: http://git-wip-us.apache.org/repos/asf/portals-pluto/tree/da05d7bd
Diff: http://git-wip-us.apache.org/repos/asf/portals-pluto/diff/da05d7bd
Branch: refs/heads/PortletHub
Commit: da05d7bddd2cbc14c050d8398d10821e840d560c
Parents: 5a5bdb7 018036b
Author: Scott Nicklous <ms...@apache.org>
Authored: Wed Jan 14 12:04:57 2015 +0100
Committer: Scott Nicklous <ms...@apache.org>
Committed: Wed Jan 14 12:04:57 2015 +0100
----------------------------------------------------------------------
.../portlets/TestModule3_Portlet1.java | 24 +++--
.../src/main/webapp/WEB-INF/portlet.xml | 7 ++
.../portlets/TestModule3_Portlet2.java | 108 +++++++++++--------
.../src/main/webapp/WEB-INF/portlet.xml | 7 ++
.../tck/beans/TestModule3Definitions.java | 39 ++++---
5 files changed, 118 insertions(+), 67 deletions(-)
----------------------------------------------------------------------