struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [02/50] git commit: Extends tests to check if excluded properties works on higher level
Date Wed, 18 Jun 2014 06:49:19 GMT
Extends tests to check if excluded properties works on higher level


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/14ad0ab0
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/14ad0ab0
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/14ad0ab0

Branch: refs/heads/develop
Commit: 14ad0ab00662e847b7959022d0106adfaf3219ea
Parents: bbcee42
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Fri Apr 25 14:58:40 2014 +0200
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Fri Apr 25 14:58:40 2014 +0200

----------------------------------------------------------------------
 .../xwork2/interceptor/ParametersInterceptorTest.java    | 11 ++++++++---
 xwork-core/src/test/resources/xwork-param-test.xml       |  1 +
 2 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/14ad0ab0/xwork-core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java
b/xwork-core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java
index 5a4485d..f0adf02 100644
--- a/xwork-core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java
+++ b/xwork-core/src/test/java/com/opensymphony/xwork2/interceptor/ParametersInterceptorTest.java
@@ -161,12 +161,14 @@ public class ParametersInterceptorTest extends XWorkTestCase {
         // given
         final String pollution1 = "class.classLoader.jarPath";
         final String pollution2 = "model.class.classLoader.jarPath";
+        final String pollution3 = "class.classLoader.defaultAssertionStatus";
 
         loadConfigurationProviders(new XWorkConfigurationProvider(), new XmlConfigurationProvider("xwork-param-test.xml"));
         final Map<String, Object> params = new HashMap<String, Object>() {
             {
                 put(pollution1, "bad");
                 put(pollution2, "very bad");
+                put(pollution3, true);
             }
         };
 
@@ -190,16 +192,19 @@ public class ParametersInterceptorTest extends XWorkTestCase {
         pi.setParameters(action, vs, params);
 
         // then
-        assertEquals(2, action.getActionMessages().size());
+        assertEquals(3, action.getActionMessages().size());
 
         String msg1 = action.getActionMessage(0);
         String msg2 = action.getActionMessage(1);
+        String msg3 = action.getActionMessage(2);
 
-        assertEquals("Error setting expression 'class.classLoader.jarPath' with value 'bad'",
msg1);
-        assertEquals("Error setting expression 'model.class.classLoader.jarPath' with value
'very bad'", msg2);
+        assertEquals("Error setting expression 'class.classLoader.defaultAssertionStatus'
with value 'true'", msg1);
+        assertEquals("Error setting expression 'class.classLoader.jarPath' with value 'bad'",
msg2);
+        assertEquals("Error setting expression 'model.class.classLoader.jarPath' with value
'very bad'", msg3);
 
         assertFalse(excluded.get(pollution1));
         assertFalse(excluded.get(pollution2));
+        assertFalse(excluded.get(pollution3));
     }
 
     public void testDoesNotAllowMethodInvocations() throws Exception {

http://git-wip-us.apache.org/repos/asf/struts/blob/14ad0ab0/xwork-core/src/test/resources/xwork-param-test.xml
----------------------------------------------------------------------
diff --git a/xwork-core/src/test/resources/xwork-param-test.xml b/xwork-core/src/test/resources/xwork-param-test.xml
index fa081c4..3ca616a 100644
--- a/xwork-core/src/test/resources/xwork-param-test.xml
+++ b/xwork-core/src/test/resources/xwork-param-test.xml
@@ -4,4 +4,5 @@
 
 <xwork>
 	<constant name="devMode" value="true" />
+    <constant name="ognlExcludedProperties" value="getClass,class,hashCode,toString,clone,equals,finalize,notify,notifyAll,wait"
/>
 </xwork>
\ No newline at end of file


Mime
View raw message