mirror of
https://github.com/apache/struts.git
synced 2026-08-07 07:37:20 +00:00
WW-3315:
Align all easymock dependencies to version 2.4 git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@833169 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -166,14 +166,14 @@
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.9</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jetty</artifactId>
|
||||
<version>6.1.4rc0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.jwebunit</groupId>
|
||||
<artifactId>jwebunit-htmlunit-plugin</artifactId>
|
||||
@@ -186,14 +186,14 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.bekk.boss</groupId>
|
||||
<artifactId>maven-jetty-pluto-embedded</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>jsp-2.1</artifactId>
|
||||
|
||||
+1
-2
@@ -43,7 +43,6 @@
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.0-alpha-4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack-xwork</id>
|
||||
@@ -326,7 +325,7 @@
|
||||
<dependency>
|
||||
<groupId>org.easymock</groupId>
|
||||
<artifactId>easymock</artifactId>
|
||||
<version>2.0</version>
|
||||
<version>2.4</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!--dependency>
|
||||
|
||||
+22
-32
@@ -21,17 +21,6 @@
|
||||
|
||||
package org.apache.struts2.dispatcher;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.struts2.ServletActionContext;
|
||||
import org.apache.struts2.StrutsTestCase;
|
||||
import org.apache.struts2.dispatcher.mapper.ActionMapper;
|
||||
import org.easymock.EasyMock;
|
||||
import org.easymock.IMocksControl;
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
|
||||
import com.opensymphony.xwork2.ActionContext;
|
||||
import com.opensymphony.xwork2.ActionInvocation;
|
||||
import com.opensymphony.xwork2.ActionProxy;
|
||||
@@ -39,6 +28,17 @@ import com.opensymphony.xwork2.ObjectFactory;
|
||||
import com.opensymphony.xwork2.config.entities.ActionConfig;
|
||||
import com.opensymphony.xwork2.config.entities.ResultConfig;
|
||||
import com.opensymphony.xwork2.util.ValueStack;
|
||||
import org.apache.struts2.ServletActionContext;
|
||||
import org.apache.struts2.StrutsTestCase;
|
||||
import org.apache.struts2.dispatcher.mapper.ActionMapper;
|
||||
import static org.easymock.EasyMock.createControl;
|
||||
import static org.easymock.EasyMock.expect;
|
||||
import org.easymock.IMocksControl;
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
@@ -87,20 +87,14 @@ public class ServletActionRedirectResultTest extends StrutsTestCase {
|
||||
result.setEncode(false);
|
||||
result.setPrependServletContext(false);
|
||||
|
||||
IMocksControl control = EasyMock.createControl();
|
||||
IMocksControl control = createControl();
|
||||
ActionProxy mockActionProxy = control.createMock(ActionProxy.class);
|
||||
ActionInvocation mockInvocation = control.createMock(ActionInvocation.class);
|
||||
mockInvocation.getProxy();
|
||||
control.andReturn(mockActionProxy);
|
||||
mockInvocation.getResultCode();
|
||||
control.andReturn("myResult");
|
||||
mockActionProxy.getConfig();
|
||||
control.andReturn(actionConfig);
|
||||
mockInvocation.getInvocationContext();
|
||||
control.andReturn(context);
|
||||
mockInvocation.getStack();
|
||||
control.andReturn(stack);
|
||||
control.anyTimes();
|
||||
expect(mockInvocation.getProxy()).andReturn(mockActionProxy);
|
||||
expect(mockInvocation.getResultCode()).andReturn("myResult");
|
||||
expect(mockActionProxy.getConfig()).andReturn(actionConfig);
|
||||
expect(mockInvocation.getInvocationContext()).andReturn(context);
|
||||
expect(mockInvocation.getStack()).andReturn(stack).anyTimes();
|
||||
|
||||
control.replay();
|
||||
result.setActionMapper(container.getInstance(ActionMapper.class));
|
||||
@@ -145,17 +139,13 @@ public class ServletActionRedirectResultTest extends StrutsTestCase {
|
||||
result.setEncode(false);
|
||||
result.setPrependServletContext(false);
|
||||
|
||||
IMocksControl control = EasyMock.createControl();
|
||||
IMocksControl control = createControl();
|
||||
ActionProxy mockActionProxy = control.createMock(ActionProxy.class);
|
||||
ActionInvocation mockInvocation = control.createMock(ActionInvocation.class);
|
||||
mockInvocation.getProxy();
|
||||
control.andReturn(mockActionProxy);
|
||||
mockInvocation.getResultCode();
|
||||
control.andReturn("myResult");
|
||||
mockActionProxy.getConfig();
|
||||
control.andReturn(actionConfig);
|
||||
mockInvocation.getInvocationContext();
|
||||
control.andReturn(context);
|
||||
expect(mockInvocation.getProxy()).andReturn(mockActionProxy);
|
||||
expect(mockInvocation.getResultCode()).andReturn("myResult");
|
||||
expect(mockActionProxy.getConfig()).andReturn(actionConfig);
|
||||
expect(mockInvocation.getInvocationContext()).andReturn(context);
|
||||
|
||||
control.replay();
|
||||
result.setActionMapper(container.getInstance(ActionMapper.class));
|
||||
|
||||
@@ -21,39 +21,32 @@
|
||||
|
||||
package org.apache.struts2.dispatcher;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.io.StringWriter;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import static javax.servlet.http.HttpServletResponse.*;
|
||||
|
||||
import ognl.Ognl;
|
||||
|
||||
import org.apache.struts2.ServletActionContext;
|
||||
import org.apache.struts2.StrutsStatics;
|
||||
import org.apache.struts2.StrutsTestCase;
|
||||
import org.apache.struts2.dispatcher.mapper.ActionMapper;
|
||||
import org.apache.struts2.config.StrutsXmlConfigurationProvider;
|
||||
import org.springframework.mock.web.MockServletContext;
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
import org.easymock.EasyMock;
|
||||
import org.easymock.IMocksControl;
|
||||
|
||||
import com.mockobjects.dynamic.C;
|
||||
import com.mockobjects.dynamic.Mock;
|
||||
import com.opensymphony.xwork2.ActionContext;
|
||||
import com.opensymphony.xwork2.ActionInvocation;
|
||||
import com.opensymphony.xwork2.ActionProxy;
|
||||
import com.opensymphony.xwork2.config.ConfigurationManager;
|
||||
import com.opensymphony.xwork2.config.entities.ActionConfig;
|
||||
import com.opensymphony.xwork2.config.entities.PackageConfig;
|
||||
import com.opensymphony.xwork2.config.entities.ResultConfig;
|
||||
import com.opensymphony.xwork2.config.entities.ActionConfig;
|
||||
import com.opensymphony.xwork2.mock.MockActionInvocation;
|
||||
import com.opensymphony.xwork2.util.ValueStackFactory;
|
||||
import ognl.Ognl;
|
||||
import org.apache.struts2.ServletActionContext;
|
||||
import org.apache.struts2.StrutsStatics;
|
||||
import org.apache.struts2.StrutsTestCase;
|
||||
import org.apache.struts2.dispatcher.mapper.ActionMapper;
|
||||
import static org.easymock.EasyMock.*;
|
||||
import org.easymock.IMocksControl;
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import static javax.servlet.http.HttpServletResponse.SC_SEE_OTHER;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
@@ -180,17 +173,13 @@ public class ServletRedirectResultTest extends StrutsTestCase implements StrutsS
|
||||
result.setEncode(false);
|
||||
result.setPrependServletContext(false);
|
||||
|
||||
IMocksControl control = EasyMock.createControl();
|
||||
IMocksControl control = createControl();
|
||||
ActionProxy mockActionProxy = control.createMock(ActionProxy.class);
|
||||
ActionInvocation mockInvocation = control.createMock(ActionInvocation.class);
|
||||
mockInvocation.getProxy();
|
||||
control.andReturn(mockActionProxy);
|
||||
mockInvocation.getResultCode();
|
||||
control.andReturn("myResult");
|
||||
mockActionProxy.getConfig();
|
||||
control.andReturn(actionConfig);
|
||||
mockInvocation.getInvocationContext();
|
||||
control.andReturn(context);
|
||||
expect(mockInvocation.getProxy()).andReturn(mockActionProxy);
|
||||
expect(mockInvocation.getResultCode()).andReturn("myResult");
|
||||
expect(mockActionProxy.getConfig()).andReturn(actionConfig);
|
||||
expect(mockInvocation.getInvocationContext()).andReturn(context);
|
||||
|
||||
control.replay();
|
||||
result.setActionMapper(container.getInstance(ActionMapper.class));
|
||||
@@ -227,10 +216,10 @@ public class ServletRedirectResultTest extends StrutsTestCase implements StrutsS
|
||||
MockActionInvocation ai = new MockActionInvocation();
|
||||
ai.setInvocationContext(ac);
|
||||
ai.setResultCode("myResult");
|
||||
ActionProxy mockActionProxy = EasyMock.createNiceMock(ActionProxy.class);
|
||||
ActionProxy mockActionProxy = createNiceMock(ActionProxy.class);
|
||||
ai.setProxy(mockActionProxy);
|
||||
EasyMock.expect(mockActionProxy.getConfig()).andReturn(actionConfig).anyTimes();
|
||||
EasyMock.replay(mockActionProxy);
|
||||
expect(mockActionProxy.getConfig()).andReturn(actionConfig).anyTimes();
|
||||
replay(mockActionProxy);
|
||||
this.ai = ai;
|
||||
ai.setStack(ActionContext.getContext().getValueStack());
|
||||
}
|
||||
|
||||
@@ -22,9 +22,7 @@
|
||||
package org.apache.struts2.views.jsp;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
|
||||
import javax.servlet.jsp.tagext.DynamicAttributes;
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
|
||||
@@ -62,13 +62,13 @@
|
||||
<dependency>
|
||||
<groupId>org.easymock</groupId>
|
||||
<artifactId>easymock</artifactId>
|
||||
<version>2.3</version>
|
||||
<version>2.4</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.easymock</groupId>
|
||||
<artifactId>easymockclassextension</artifactId>
|
||||
<version>2.3</version>
|
||||
<version>2.4</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
<dependency>
|
||||
<groupId>org.easymock</groupId>
|
||||
<artifactId>easymock</artifactId>
|
||||
<version>2.0</version>
|
||||
<version>2.4</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!--dependency>
|
||||
|
||||
@@ -33,13 +33,13 @@
|
||||
<groupId>org.easymock</groupId>
|
||||
<artifactId>easymock</artifactId>
|
||||
<scope>test</scope>
|
||||
<version>2.2</version>
|
||||
<version>2.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.easymock</groupId>
|
||||
<artifactId>easymockclassextension</artifactId>
|
||||
<scope>test</scope>
|
||||
<version>2.2</version>
|
||||
<version>2.4</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
<dependency>
|
||||
<groupId>org.easymock</groupId>
|
||||
<artifactId>easymock</artifactId>
|
||||
<version>2.3</version>
|
||||
<version>2.4</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
<dependency>
|
||||
<groupId>org.easymock</groupId>
|
||||
<artifactId>easymock</artifactId>
|
||||
<version>2.3</version>
|
||||
<version>2.4</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<dependency>
|
||||
<groupId>org.easymock</groupId>
|
||||
<artifactId>easymock</artifactId>
|
||||
<version>2.0</version>
|
||||
<version>2.4</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<dependency>
|
||||
<groupId>org.easymock</groupId>
|
||||
<artifactId>easymock</artifactId>
|
||||
<version>2.0</version>
|
||||
<version>2.4</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<dependency>
|
||||
<groupId>org.easymock</groupId>
|
||||
<artifactId>easymock</artifactId>
|
||||
<version>2.3</version>
|
||||
<version>2.4</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user