Updates tests to reflect invocation change logic

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

Branch: refs/heads/master
Commit: 41cf08c772d36fabecb9517cad614d525bb8f01e
Parents: f755e01
Author: Lukasz Lenart <lukaszlen...@apache.org>
Authored: Thu Feb 4 08:06:08 2016 +0100
Committer: Lukasz Lenart <lukaszlen...@apache.org>
Committed: Thu Feb 4 08:06:08 2016 +0100

----------------------------------------------------------------------
 .../java/com/opensymphony/xwork2/DefaultActionInvocationTest.java | 3 +++
 .../src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/41cf08c7/core/src/test/java/com/opensymphony/xwork2/DefaultActionInvocationTest.java
----------------------------------------------------------------------
diff --git 
a/core/src/test/java/com/opensymphony/xwork2/DefaultActionInvocationTest.java 
b/core/src/test/java/com/opensymphony/xwork2/DefaultActionInvocationTest.java
index 042c1dc..7b7b3fe 100644
--- 
a/core/src/test/java/com/opensymphony/xwork2/DefaultActionInvocationTest.java
+++ 
b/core/src/test/java/com/opensymphony/xwork2/DefaultActionInvocationTest.java
@@ -1,6 +1,8 @@
 package com.opensymphony.xwork2;
 
+import com.opensymphony.xwork2.config.entities.ActionConfig;
 import com.opensymphony.xwork2.config.entities.InterceptorMapping;
+import com.opensymphony.xwork2.config.entities.ResultConfig;
 import com.opensymphony.xwork2.mock.MockActionProxy;
 import com.opensymphony.xwork2.mock.MockContainer;
 import com.opensymphony.xwork2.mock.MockInterceptor;
@@ -304,6 +306,7 @@ class DefaultActionInvocationTester extends 
DefaultActionInvocation {
         interceptors = interceptorMappings.iterator();
         MockActionProxy actionProxy = new MockActionProxy();
         actionProxy.setMethod("execute");
+        actionProxy.setConfig(new ActionConfig.Builder("foo", "bar", 
"clazz").addResultConfig(new ResultConfig.Builder("buzz", 
"fizz").build()).build());
         proxy = actionProxy;
         action = new ActionSupport();
     }

http://git-wip-us.apache.org/repos/asf/struts/blob/41cf08c7/core/src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java 
b/core/src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java
index 42d9a71..2b1cd82 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java
@@ -179,7 +179,8 @@ public class ActionTagTest extends AbstractTagTest {
 
         
assertTrue(stack.getContext().containsKey(ServletActionContext.PAGE_CONTEXT));
         
assertTrue(stack.getContext().get(ServletActionContext.PAGE_CONTEXT)instanceof 
PageContext);
-        assertNull(result); // result is never executed, hence never set into 
invocation
+        assertNotNull(result);
+        assertFalse(result.isExecuted());
     }
 
      public void testExecuteButResetReturnSameInvocation() throws Exception {

Reply via email to