portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msnickl...@apache.org
Subject [22/30] git commit: Fixed implementation of some IllegalArgumentException tests.
Date Wed, 08 Oct 2014 11:02:45 GMT
Fixed implementation of some IllegalArgumentException tests.


Project: http://git-wip-us.apache.org/repos/asf/portals-pluto/repo
Commit: http://git-wip-us.apache.org/repos/asf/portals-pluto/commit/f503f081
Tree: http://git-wip-us.apache.org/repos/asf/portals-pluto/tree/f503f081
Diff: http://git-wip-us.apache.org/repos/asf/portals-pluto/diff/f503f081

Branch: refs/heads/master
Commit: f503f081ca705f25b8fa92df48161aae477f09bf
Parents: 494d11f
Author: Scott Nicklous <msnicklous@apache.org>
Authored: Wed Sep 17 12:50:42 2014 +0200
Committer: Scott Nicklous <msnicklous@apache.org>
Committed: Wed Sep 17 12:50:42 2014 +0200

----------------------------------------------------------------------
 .../portlets/URLTests_BaseURL_ApiRenderActurl.java  | 14 +++++++++++++-
 .../portlets/URLTests_BaseURL_ApiRenderRenurl.java  | 16 ++++++++++++++--
 .../portlets/URLTests_BaseURL_ApiRenderResurl.java  | 14 +++++++++++++-
 3 files changed, 40 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f503f081/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_BaseURL_ApiRenderActurl.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_BaseURL_ApiRenderActurl.java
b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_BaseURL_ApiRenderActurl.java
index 2fdfbac..feea4a1 100644
--- a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_BaseURL_ApiRenderActurl.java
+++ b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_BaseURL_ApiRenderActurl.java
@@ -341,6 +341,10 @@ public class URLTests_BaseURL_ApiRenderActurl implements Portlet, ResourceServin
       try {
          try {
             PortletURL turl = portletResp.createActionURL();
+            Map<String, String[]> parms = new HashMap<String, String[]>();
+            parms.put("parm1", new String[]{"val1-1", "val1-2"});
+            parms.put(null, new String[]{"val2-1", "val2-2"});
+            turl.setParameters(parms);
             tr16.appendTcDetail("Method did not throw an exception.");
          } catch (IllegalArgumentException iae) {
             tr16.setTcSuccess(true);
@@ -357,6 +361,10 @@ public class URLTests_BaseURL_ApiRenderActurl implements Portlet, ResourceServin
       try {
          try {
             PortletURL turl = portletResp.createActionURL();
+            Map<String, String[]> parms = new HashMap<String, String[]>();
+            parms.put("parm1", new String[]{"val1-1", "val1-2"});
+            parms.put("parm2", null);
+            turl.setParameters(parms);
             tr17.appendTcDetail("Method did not throw an exception.");
          } catch (IllegalArgumentException iae) {
             tr17.setTcSuccess(true);
@@ -368,12 +376,16 @@ public class URLTests_BaseURL_ApiRenderActurl implements Portlet, ResourceServin
 
       /* TestCase: V2URLTests_BaseURL_ApiRenderActurl_setParameters13         */
       /* Details: "Method setParameters(java.util.Map): Throws                */
-      /* IllegalArgumentException if any element in any values array is       */
+      /* IllegalArgumentException if any element in the values array is       */
       /* null "                                                               */
       TestResult tr18 = tcd.getTestResultFailed(V2URLTESTS_BASEURL_APIRENDERACTURL_SETPARAMETERS13);
       try {
          try {
             PortletURL turl = portletResp.createActionURL();
+            Map<String, String[]> parms = new HashMap<String, String[]>();
+            parms.put("parm1", new String[]{null, "val1-2"});
+            parms.put("parm2", new String[]{"val2-1", "val2-2"});
+            turl.setParameters(parms);
             tr18.appendTcDetail("Method did not throw an exception.");
          } catch (IllegalArgumentException iae) {
             tr18.setTcSuccess(true);

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f503f081/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_BaseURL_ApiRenderRenurl.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_BaseURL_ApiRenderRenurl.java
b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_BaseURL_ApiRenderRenurl.java
index b2b4125..ce1605f 100644
--- a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_BaseURL_ApiRenderRenurl.java
+++ b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_BaseURL_ApiRenderRenurl.java
@@ -529,7 +529,7 @@ public class URLTests_BaseURL_ApiRenderRenurl implements Portlet, ResourceServin
             Map<String, String[]> eval = new HashMap<String, String[]>();
             eval.put("tc", new String[]{"V2URLTests_BaseURL_ApiRenderRenurl_setParameters7"});
             eval.put("parm1", new String[]{"val1", "val2"});
-            eval.put("tckPRP1", new String[]{"val1", "V2URLTests_BaseURL_ApiRenderRenurl_setParameters7"});
+            eval.put("tckPRP1", new String[]{"V2URLTests_BaseURL_ApiRenderRenurl_setParameters7"});
             CompareUtils.mapsEqual("Request", aval, " expected: ", eval, tr16);
          }
       } catch(Exception e) {tr16.appendTcDetail(e.toString());}
@@ -592,6 +592,10 @@ public class URLTests_BaseURL_ApiRenderRenurl implements Portlet, ResourceServin
       try {
          try {
             PortletURL turl = portletResp.createRenderURL();
+            Map<String, String[]> parms = new HashMap<String, String[]>();
+            parms.put("parm1", new String[]{"val1-1", "val1-2"});
+            parms.put(null, new String[]{"val2-1", "val2-2"});
+            turl.setParameters(parms);
             tr19.appendTcDetail("Method did not throw an exception.");
          } catch (IllegalArgumentException iae) {
             tr19.setTcSuccess(true);
@@ -608,6 +612,10 @@ public class URLTests_BaseURL_ApiRenderRenurl implements Portlet, ResourceServin
       try {
          try {
             PortletURL turl = portletResp.createRenderURL();
+            Map<String, String[]> parms = new HashMap<String, String[]>();
+            parms.put("parm1", new String[]{"val1-1", "val1-2"});
+            parms.put("parm2", null);
+            turl.setParameters(parms);
             tr20.appendTcDetail("Method did not throw an exception.");
          } catch (IllegalArgumentException iae) {
             tr20.setTcSuccess(true);
@@ -619,12 +627,16 @@ public class URLTests_BaseURL_ApiRenderRenurl implements Portlet, ResourceServin
 
       /* TestCase: V2URLTests_BaseURL_ApiRenderRenurl_setParameters13         */
       /* Details: "Method setParameters(java.util.Map): Throws                */
-      /* IllegalArgumentException if any element in any values array is       */
+      /* IllegalArgumentException if any element in the values array is       */
       /* null "                                                               */
       TestResult tr21 = tcd.getTestResultFailed(V2URLTESTS_BASEURL_APIRENDERRENURL_SETPARAMETERS13);
       try {
          try {
             PortletURL turl = portletResp.createRenderURL();
+            Map<String, String[]> parms = new HashMap<String, String[]>();
+            parms.put("parm1", new String[]{null, "val1-2"});
+            parms.put("parm2", new String[]{"val2-1", "val2-2"});
+            turl.setParameters(parms);
             tr21.appendTcDetail("Method did not throw an exception.");
          } catch (IllegalArgumentException iae) {
             tr21.setTcSuccess(true);

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/f503f081/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_BaseURL_ApiRenderResurl.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_BaseURL_ApiRenderResurl.java
b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_BaseURL_ApiRenderResurl.java
index dd37202..aad91a5 100644
--- a/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_BaseURL_ApiRenderResurl.java
+++ b/portlet-tck_3.0/V2URLTests/src/main/java/javax/portlet/tck/portlets/URLTests_BaseURL_ApiRenderResurl.java
@@ -341,6 +341,10 @@ public class URLTests_BaseURL_ApiRenderResurl implements Portlet, ResourceServin
       try {
          try {
             ResourceURL turl = portletResp.createResourceURL();
+            Map<String, String[]> parms = new HashMap<String, String[]>();
+            parms.put("parm1", new String[]{"val1-1", "val1-2"});
+            parms.put(null, new String[]{"val2-1", "val2-2"});
+            turl.setParameters(parms);
             tr16.appendTcDetail("Method did not throw an exception.");
          } catch (IllegalArgumentException iae) {
             tr16.setTcSuccess(true);
@@ -357,6 +361,10 @@ public class URLTests_BaseURL_ApiRenderResurl implements Portlet, ResourceServin
       try {
          try {
             ResourceURL turl = portletResp.createResourceURL();
+            Map<String, String[]> parms = new HashMap<String, String[]>();
+            parms.put("parm1", new String[]{"val1-1", "val1-2"});
+            parms.put("parm2", null);
+            turl.setParameters(parms);
             tr17.appendTcDetail("Method did not throw an exception.");
          } catch (IllegalArgumentException iae) {
             tr17.setTcSuccess(true);
@@ -368,12 +376,16 @@ public class URLTests_BaseURL_ApiRenderResurl implements Portlet, ResourceServin
 
       /* TestCase: V2URLTests_BaseURL_ApiRenderResurl_setParameters13         */
       /* Details: "Method setParameters(java.util.Map): Throws                */
-      /* IllegalArgumentException if any element in any values array is       */
+      /* IllegalArgumentException if any element in the values array is       */
       /* null "                                                               */
       TestResult tr18 = tcd.getTestResultFailed(V2URLTESTS_BASEURL_APIRENDERRESURL_SETPARAMETERS13);
       try {
          try {
             ResourceURL turl = portletResp.createResourceURL();
+            Map<String, String[]> parms = new HashMap<String, String[]>();
+            parms.put("parm1", new String[]{null, "val1-2"});
+            parms.put("parm2", new String[]{"val2-1", "val2-2"});
+            turl.setParameters(parms);
             tr18.appendTcDetail("Method did not throw an exception.");
          } catch (IllegalArgumentException iae) {
             tr18.setTcSuccess(true);


Mime
View raw message