WW-4243 Renames based test case class to avoid using it outside of core

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1542825 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Lukasz Lenart
2013-11-17 21:21:36 +00:00
parent 0aa0a69068
commit 9f5ba8cc53
57 changed files with 107 additions and 158 deletions
@@ -21,10 +21,8 @@
package example;
import org.apache.struts2.StrutsTestCase;
import com.opensymphony.xwork2.ActionSupport;
import junit.framework.TestCase;
import org.apache.struts2.StrutsTestCase;
public class HelloWorldTest extends StrutsTestCase {
@@ -24,7 +24,6 @@ package example;
import org.apache.struts2.StrutsTestCase;
import com.opensymphony.xwork2.ActionSupport;
import junit.framework.TestCase;
public class HelloWorldTest extends StrutsTestCase {
@@ -9,7 +9,7 @@ import java.util.HashMap;
/**
* Test class instantiation with Container
*/
public class ClassInstantiationTest extends StrutsTestCase {
public class ClassInstantiationTest extends StrutsInternalTestCase {
public void testCompositeActionMapperInstantiationWithList() throws Exception {
// given
@@ -41,7 +41,7 @@ import java.util.logging.Logger;
/**
* Base test case for JUnit testing Struts.
*/
public abstract class StrutsTestCase extends XWorkTestCase {
public abstract class StrutsInternalTestCase extends XWorkTestCase {
static {
ConsoleHandler handler = new ConsoleHandler();
@@ -24,14 +24,14 @@ package org.apache.struts2.components;
import java.util.HashMap;
import java.util.Map;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import com.mockobjects.dynamic.Mock;
import com.opensymphony.xwork2.util.ValueStack;
public class ActionComponentTest extends StrutsTestCase {
public class ActionComponentTest extends StrutsInternalTestCase {
public void testCreateParametersForContext() throws Exception {
MockHttpServletRequest req = new MockHttpServletRequest();
@@ -21,19 +21,18 @@
package org.apache.struts2.components;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
/**
*
* @version $Date$ $Id$
*/
public class FormButtonTest extends StrutsTestCase {
public class FormButtonTest extends StrutsInternalTestCase {
public void testPopulateComponentHtmlId1() throws Exception {
MockHttpServletRequest req = new MockHttpServletRequest();
@@ -2,13 +2,13 @@ package org.apache.struts2.components;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import java.io.StringWriter;
import java.util.Arrays;
import java.util.List;
public class IteratorComponentTest extends StrutsTestCase {
public class IteratorComponentTest extends StrutsInternalTestCase {
public void testIterator() throws Exception {
// given
@@ -24,23 +24,17 @@ package org.apache.struts2.components;
import java.io.StringWriter;
import java.util.Map;
import junit.framework.TestCase;
import ognl.Ognl;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.util.StrutsTypeConverter;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ObjectFactory;
import com.opensymphony.xwork2.conversion.impl.XWorkConverter;
import com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
/**
*
*/
public class PropertyTest extends StrutsTestCase {
public class PropertyTest extends StrutsInternalTestCase {
private XWorkConverter converter;
public void setUp() throws Exception {
@@ -23,7 +23,7 @@ package org.apache.struts2.components;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
@@ -34,7 +34,7 @@ import java.util.Map;
*
* @version $Date$ $Id$
*/
public class UIBeanTest extends StrutsTestCase {
public class UIBeanTest extends StrutsInternalTestCase {
public void testPopulateComponentHtmlId1() throws Exception {
ValueStack stack = ActionContext.getContext().getValueStack();
@@ -1,8 +1,8 @@
package org.apache.struts2.components.template;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
public class JspTemplateEngineTest extends StrutsTestCase {
public class JspTemplateEngineTest extends StrutsInternalTestCase {
public void testEncodingGetsInjected() throws Exception {
JspTemplateEngine jspTemplateEngine = new JspTemplateEngine();
@@ -23,7 +23,7 @@ package org.apache.struts2.config;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import java.util.Iterator;
import java.util.Locale;
@@ -33,7 +33,7 @@ import java.util.Locale;
* Unit test for {@link SettingsTest}.
*
*/
public class SettingsTest extends StrutsTestCase {
public class SettingsTest extends StrutsInternalTestCase {
public void testSettings() {
Settings settings = new DefaultSettings();
@@ -1,10 +1,10 @@
package org.apache.struts2.dispatcher;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import java.util.List;
public class DefaultStaticContentLoaderTest extends StrutsTestCase {
public class DefaultStaticContentLoaderTest extends StrutsInternalTestCase {
public void testParsePackages() throws Exception {
@@ -34,7 +34,7 @@ import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.interceptor.Interceptor;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.dispatcher.FilterDispatcherTest.InnerDestroyableObjectFactory;
import org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper;
import org.springframework.mock.web.MockHttpServletRequest;
@@ -53,7 +53,7 @@ import java.util.Map;
* Test case for Dispatcher.
*
*/
public class DispatcherTest extends StrutsTestCase {
public class DispatcherTest extends StrutsInternalTestCase {
public void testDefaultResurceBundlePropertyLoaded() throws Exception {
Locale.setDefault(Locale.US); // force to US locale as we also have _de and _da properties
@@ -25,7 +25,7 @@ import com.mockobjects.servlet.MockFilterChain;
import com.opensymphony.xwork2.ObjectFactory;
import com.opensymphony.xwork2.config.ConfigurationManager;
import com.opensymphony.xwork2.config.impl.DefaultConfiguration;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.dispatcher.mapper.ActionMapper;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
import org.apache.struts2.util.ObjectFactoryDestroyable;
@@ -48,7 +48,7 @@ import java.util.HashMap;
*
* @version $Date$ $Id$
*/
public class FilterDispatcherTest extends StrutsTestCase {
public class FilterDispatcherTest extends StrutsInternalTestCase {
public void testIfActionMapperIsNullDontServiceAction() throws Exception {
MockServletContext servletContext = new MockServletContext();
@@ -32,9 +32,7 @@ import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import junit.framework.TestCase;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.dispatcher.mapper.ActionMapper;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
import org.springframework.mock.web.MockFilterConfig;
@@ -52,7 +50,7 @@ import com.opensymphony.xwork2.inject.Container;
*
* @version $Date$ $Id$
*/
public class FilterTest extends StrutsTestCase {
public class FilterTest extends StrutsInternalTestCase {
protected MockFilterConfig filterConfig;
protected MockHttpServletRequest request;
@@ -27,7 +27,7 @@ import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
@@ -36,7 +36,7 @@ import java.util.Map;
/**
* HttpHeaderResultTest
*/
public class HttpHeaderResultTest extends StrutsTestCase {
public class HttpHeaderResultTest extends StrutsInternalTestCase {
ActionInvocation invocation;
HttpHeaderResult result;
@@ -26,7 +26,7 @@ import com.opensymphony.xwork2.mock.MockActionInvocation;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.struts2.StrutsStatics;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.views.jsp.AbstractUITagTest;
import org.apache.struts2.views.jsp.StrutsMockHttpServletResponse;
import org.apache.struts2.views.jsp.StrutsMockServletContext;
@@ -39,7 +39,7 @@ import java.io.StringWriter;
* Test case for PlainTextResult.
*
*/
public class PlainTextResultTest extends StrutsTestCase {
public class PlainTextResultTest extends StrutsInternalTestCase {
ValueStack stack;
MockActionInvocation invocation;
@@ -29,7 +29,7 @@ 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.StrutsInternalTestCase;
import org.apache.struts2.dispatcher.mapper.ActionMapper;
import org.apache.struts2.views.util.DefaultUrlHelper;
import org.easymock.IMocksControl;
@@ -46,7 +46,7 @@ import static org.easymock.EasyMock.expect;
/**
* @version $Date$ $Id$
*/
public class ServletActionRedirectResultTest extends StrutsTestCase {
public class ServletActionRedirectResultTest extends StrutsInternalTestCase {
public void testIncludeParameterInResultWithConditionParseOn() throws Exception {
@@ -28,8 +28,8 @@ import javax.servlet.http.HttpServletResponse;
import ognl.Ognl;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.StrutsStatics;
import org.apache.struts2.StrutsTestCase;
import com.mockobjects.dynamic.C;
import com.mockobjects.dynamic.Mock;
@@ -39,7 +39,7 @@ import com.opensymphony.xwork2.ActionContext;
/**
*
*/
public class ServletDispatcherResultTest extends StrutsTestCase implements StrutsStatics {
public class ServletDispatcherResultTest extends StrutsInternalTestCase implements StrutsStatics {
public void testInclude() {
ServletDispatcherResult view = new ServletDispatcherResult();
@@ -32,8 +32,8 @@ import com.opensymphony.xwork2.config.entities.ResultConfig;
import com.opensymphony.xwork2.mock.MockActionInvocation;
import ognl.Ognl;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.StrutsStatics;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.dispatcher.mapper.ActionMapper;
import org.apache.struts2.views.util.DefaultUrlHelper;
import org.easymock.IMocksControl;
@@ -56,7 +56,7 @@ import static org.easymock.EasyMock.replay;
/**
*/
public class ServletRedirectResultTest extends StrutsTestCase implements StrutsStatics {
public class ServletRedirectResultTest extends StrutsInternalTestCase implements StrutsStatics {
protected ServletRedirectResult view;
private Mock requestMock;
@@ -27,14 +27,11 @@ import java.io.InputStream;
import java.net.URI;
import java.net.URL;
import junit.framework.TestCase;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.springframework.mock.web.MockHttpServletResponse;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.ValueStackFactory;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.mock.MockActionInvocation;
@@ -44,7 +41,7 @@ import com.opensymphony.xwork2.util.ValueStack;
* Unit test for {@link StreamResult}.
*
*/
public class StreamResultTest extends StrutsTestCase {
public class StreamResultTest extends StrutsInternalTestCase {
private StreamResult result;
private MockHttpServletResponse response;
@@ -21,19 +21,18 @@
package org.apache.struts2.dispatcher;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.easymock.EasyMock;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
/**
* Test case for StrutsResultSupport.
*/
public class StrutsResultSupportTest extends StrutsTestCase {
public class StrutsResultSupportTest extends StrutsInternalTestCase {
public void testParse() throws Exception {
@@ -21,9 +21,7 @@
package org.apache.struts2.dispatcher;
import junit.framework.TestCase;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.velocity.Template;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.exception.ParseErrorException;
@@ -34,13 +32,12 @@ import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ActionProxy;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
/**
*
*/
public class VelocityResultTest extends StrutsTestCase {
public class VelocityResultTest extends StrutsInternalTestCase {
ActionInvocation actionInvocation;
Mock mockActionProxy;
@@ -30,7 +30,7 @@ import com.opensymphony.xwork2.config.ConfigurationManager;
import com.opensymphony.xwork2.config.entities.PackageConfig;
import com.opensymphony.xwork2.config.impl.DefaultConfiguration;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.dispatcher.StrutsResultSupport;
import org.apache.struts2.views.jsp.StrutsMockHttpServletRequest;
@@ -42,7 +42,7 @@ import java.util.Map;
* DefaultActionMapper test case.
*
*/
public class DefaultActionMapperTest extends StrutsTestCase {
public class DefaultActionMapperTest extends StrutsInternalTestCase {
private MockHttpServletRequest req;
private ConfigurationManager configManager;
@@ -21,7 +21,7 @@
package org.apache.struts2.dispatcher.mapper;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import com.mockobjects.servlet.MockHttpServletRequest;
import com.opensymphony.xwork2.config.ConfigurationManager;
import com.opensymphony.xwork2.config.Configuration;
@@ -30,7 +30,7 @@ import com.opensymphony.xwork2.config.impl.DefaultConfiguration;
import java.util.HashMap;
public class Restful2ActionMapperTest extends StrutsTestCase {
public class Restful2ActionMapperTest extends StrutsInternalTestCase {
private Restful2ActionMapper mapper;
private MockHttpServletRequest req;
@@ -4,13 +4,13 @@ import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.Result;
import com.opensymphony.xwork2.config.entities.ResultConfig;
import com.opensymphony.xwork2.factory.ResultFactory;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import com.opensymphony.xwork2.result.ParamNameAwareResult;
import java.util.HashMap;
import java.util.Map;
public class StrutsResultFactoryTest extends StrutsTestCase {
public class StrutsResultFactoryTest extends StrutsInternalTestCase {
public void testAcceptParams() throws Exception {
// given
@@ -24,7 +24,7 @@ package org.apache.struts2.interceptor;
import java.util.HashMap;
import java.util.Map;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.mock.MockActionInvocation;
@@ -32,7 +32,7 @@ import com.opensymphony.xwork2.mock.MockActionInvocation;
/**
* Unit test for ChecboxInterceptor.
*/
public class CheckboxInterceptorTest extends StrutsTestCase {
public class CheckboxInterceptorTest extends StrutsInternalTestCase {
private CheckboxInterceptor interceptor;
private MockActionInvocation ai;
@@ -26,7 +26,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.jmock.Mock;
import com.opensymphony.xwork2.ActionContext;
@@ -35,7 +35,7 @@ import com.opensymphony.xwork2.mock.MockActionInvocation;
/**
* Test case for ClearSessionInterceptor.
*/
public class ClearSessionInterceptorTest extends StrutsTestCase {
public class ClearSessionInterceptorTest extends StrutsInternalTestCase {
public void testCreateSession() throws Exception {
Mock httpServletRequestMock = new Mock(HttpServletRequest.class);
@@ -30,13 +30,13 @@ import org.easymock.MockControl;
import org.springframework.mock.web.MockHttpServletRequest;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ActionSupport;
public class CookieInterceptorTest extends StrutsTestCase {
public class CookieInterceptorTest extends StrutsInternalTestCase {
public void testIntercepDefault() throws Exception {
@@ -23,7 +23,7 @@ package org.apache.struts2.interceptor;
import com.opensymphony.xwork2.mock.MockActionInvocation;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.jmock.Mock;
import org.jmock.core.constraint.IsEqual;
import org.jmock.core.matcher.InvokeOnceMatcher;
@@ -34,7 +34,7 @@ import javax.servlet.http.HttpServletRequest;
* Test case for CreateSessionInterceptor.
*
*/
public class CreateSessionInterceptorTest extends StrutsTestCase {
public class CreateSessionInterceptorTest extends StrutsInternalTestCase {
public void testCreateSession() throws Exception {
Mock httpServletRequestMock = new Mock(HttpServletRequest.class);
@@ -34,7 +34,7 @@ import com.opensymphony.xwork2.interceptor.ParametersInterceptor;
import com.opensymphony.xwork2.mock.MockResult;
import com.opensymphony.xwork2.util.location.LocatableProperties;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.views.jsp.StrutsMockHttpServletRequest;
import org.apache.struts2.views.jsp.StrutsMockHttpSession;
@@ -45,7 +45,7 @@ import java.util.Map;
/**
* Test case for ExecuteAndWaitInterceptor.
*/
public class ExecuteAndWaitInterceptorTest extends StrutsTestCase {
public class ExecuteAndWaitInterceptorTest extends StrutsInternalTestCase {
private StrutsMockHttpServletRequest request;
private HttpSession httpSession;
@@ -29,7 +29,7 @@ import com.opensymphony.xwork2.mock.MockActionInvocation;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.TestAction;
import org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest;
import org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper;
@@ -48,7 +48,7 @@ import java.util.Map;
/**
* Test case for FileUploadInterceptor.
*/
public class FileUploadInterceptorTest extends StrutsTestCase {
public class FileUploadInterceptorTest extends StrutsInternalTestCase {
private FileUploadInterceptor interceptor;
private File tempDir;
@@ -27,7 +27,7 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.dispatcher.ServletActionRedirectResult;
import org.easymock.EasyMock;
@@ -42,7 +42,7 @@ import com.opensymphony.xwork2.ActionSupport;
*
* @version $Date$ $Id$
*/
public class MessageStoreInterceptorTest extends StrutsTestCase {
public class MessageStoreInterceptorTest extends StrutsInternalTestCase {
public void testStoreMessage() throws Exception {
MessageStoreInterceptor interceptor = new MessageStoreInterceptor();
@@ -29,12 +29,12 @@ import java.util.Map;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.mock.MockActionInvocation;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
/**
* Unit test for MultiselectInterceptor.
*/
public class MultiselectInterceptorTest extends StrutsTestCase {
public class MultiselectInterceptorTest extends StrutsInternalTestCase {
private MultiselectInterceptor interceptor;
private MockActionInvocation ai;
@@ -22,17 +22,14 @@
package org.apache.struts2.interceptor;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import javax.security.auth.login.FailedLoginException;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import com.mockobjects.servlet.MockHttpServletRequest;
import com.mockobjects.servlet.MockHttpServletResponse;
public class RolesInterceptorTest extends StrutsTestCase {
public class RolesInterceptorTest extends StrutsInternalTestCase {
private RolesInterceptor interceptor = new RolesInterceptor();
@@ -28,8 +28,8 @@ import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.StrutsStatics;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.util.ServletContextAware;
import org.easymock.MockControl;
import org.springframework.mock.web.MockHttpServletRequest;
@@ -44,7 +44,7 @@ import com.opensymphony.xwork2.mock.MockActionInvocation;
* Unit test for {@link ServletConfigInterceptor}.
*
*/
public class ServletConfigInterceptorTest extends StrutsTestCase {
public class ServletConfigInterceptorTest extends StrutsInternalTestCase {
private ServletConfigInterceptor interceptor;
@@ -28,7 +28,7 @@ import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import java.util.HashMap;
import java.util.Map;
@@ -38,7 +38,7 @@ import java.util.Map;
* StrutsConversionErrorInterceptorTest
*
*/
public class StrutsConversionErrorInterceptorTest extends StrutsTestCase {
public class StrutsConversionErrorInterceptorTest extends StrutsInternalTestCase {
protected ActionContext context;
protected ActionInvocation invocation;
@@ -21,7 +21,6 @@
package org.apache.struts2.interceptor;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;
@@ -29,7 +28,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.TestConfigurationProvider;
import org.apache.struts2.util.TokenHelper;
import org.apache.struts2.views.jsp.StrutsMockHttpServletRequest;
@@ -38,16 +37,13 @@ import org.apache.struts2.views.jsp.StrutsMockHttpSession;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionProxy;
import com.opensymphony.xwork2.ActionProxyFactory;
import com.opensymphony.xwork2.config.ConfigurationManager;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
/**
* TokenInterceptorTest
*/
public class TokenInterceptorTest extends StrutsTestCase {
public class TokenInterceptorTest extends StrutsInternalTestCase {
ActionContext oldContext;
HttpSession httpSession;
@@ -26,9 +26,9 @@ import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ActionProxy;
import com.opensymphony.xwork2.config.entities.ActionConfig;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
public class AnnotationValidationInterceptorTest extends StrutsTestCase {
public class AnnotationValidationInterceptorTest extends StrutsInternalTestCase {
private AnnotationValidationInterceptor interceptor = new AnnotationValidationInterceptor();
private Mock mockActionInvocation;
@@ -8,9 +8,9 @@ import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
import com.opensymphony.xwork2.util.location.LocatableProperties;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
public class ComponentUtilsTest extends StrutsTestCase {
public class ComponentUtilsTest extends StrutsInternalTestCase {
public void testStripExpression() throws Exception {
// given
@@ -26,7 +26,7 @@ import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ActionProxy;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import java.util.HashMap;
import java.util.Map;
@@ -36,7 +36,7 @@ import java.util.Map;
* InvocationSessionStoreTest
*
*/
public class InvocationSessionStoreTest extends StrutsTestCase {
public class InvocationSessionStoreTest extends StrutsInternalTestCase {
private static final String INVOCATION_KEY = "org.apache.struts2.util.InvocationSessionStoreTest.invocation";
private static final String TOKEN_VALUE = "org.apache.struts2.util.InvocationSessionStoreTest.token";
@@ -23,7 +23,7 @@ package org.apache.struts2.util;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.TestAction;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
@@ -39,7 +39,7 @@ import java.util.List;
* Test case for StrutsUtil.
*
*/
public class StrutsUtilTest extends StrutsTestCase {
public class StrutsUtilTest extends StrutsInternalTestCase {
protected ValueStack stack = null;
protected InternalMockHttpServletRequest request = null;
@@ -29,8 +29,8 @@ import com.opensymphony.xwork2.util.fs.DefaultFileManagerFactory;
import freemarker.template.Configuration;
import freemarker.template.TemplateExceptionHandler;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.StrutsStatics;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.dispatcher.Dispatcher;
import org.apache.struts2.dispatcher.mapper.ActionMapper;
import org.apache.struts2.dispatcher.mapper.ActionMapping;
@@ -50,7 +50,7 @@ import static org.apache.struts2.views.jsp.AbstractUITagTest.normalize;
* Test case for FreeMarkerResult.
*
*/
public class FreeMarkerResultTest extends StrutsTestCase {
public class FreeMarkerResultTest extends StrutsInternalTestCase {
ValueStack stack;
MockActionInvocation invocation;
@@ -23,13 +23,13 @@ package org.apache.struts2.views.freemarker;
import com.opensymphony.xwork2.util.fs.DefaultFileManagerFactory;
import org.apache.commons.io.FileUtils;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.views.jsp.StrutsMockServletContext;
/**
* Test case for FreemarkerManager
*/
public class FreemarkerManagerTest extends StrutsTestCase {
public class FreemarkerManagerTest extends StrutsInternalTestCase {
public void testIfStrutsEncodingIsSetProperty() throws Exception {
FreemarkerManager mgr = new FreemarkerManager();
@@ -23,15 +23,11 @@ package org.apache.struts2.views.freemarker;
import java.util.List;
import junit.framework.TestCase;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.util.ListEntry;
import org.apache.struts2.util.StrutsUtil;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
import freemarker.ext.beans.CollectionModel;
import freemarker.template.ObjectWrapper;
@@ -39,7 +35,7 @@ import freemarker.template.ObjectWrapper;
/**
*/
public class FreemarkerTest extends StrutsTestCase {
public class FreemarkerTest extends StrutsInternalTestCase {
TestAction testAction = null;
@@ -28,9 +28,8 @@ import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.components.Component;
import org.apache.struts2.views.freemarker.tags.TagModel;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
@@ -49,7 +48,7 @@ import freemarker.template.TemplateNumberModel;
import freemarker.template.TemplateScalarModel;
import freemarker.template.TemplateSequenceModel;
public class TagModelTest extends StrutsTestCase {
public class TagModelTest extends StrutsInternalTestCase {
final Object ADAPTER_TEMPLATE_MODEL_CONTAINED_OBJECT = new Object();
final Object WRAPPING_TEMPLATE_MODEL_CONTAINED_OBJECT = new Object();
@@ -30,7 +30,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.JspWriter;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.TestAction;
import org.apache.struts2.dispatcher.ApplicationMap;
import org.apache.struts2.dispatcher.Dispatcher;
@@ -42,14 +42,13 @@ import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
/**
* Base class to extend for unit testing UI Tags.
*
*/
public abstract class AbstractTagTest extends StrutsTestCase {
public abstract class AbstractTagTest extends StrutsInternalTestCase {
protected Action action;
protected Map context;
protected Map session;
@@ -28,7 +28,7 @@ import javax.servlet.jsp.tagext.DynamicAttributes;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
@@ -47,7 +47,7 @@ import org.w3c.dom.NodeList;
* that each of the tags defined as accepting dynamic
* attributes implements DynamicAttributes.
*/
public class DynAttribsTest extends StrutsTestCase {
public class DynAttribsTest extends StrutsInternalTestCase {
private Document doc ;
@@ -23,23 +23,19 @@ package org.apache.struts2.views.jsp;
import javax.servlet.jsp.tagext.TagSupport;
import junit.framework.TestCase;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.components.If;
import com.mockobjects.servlet.MockJspWriter;
import com.mockobjects.servlet.MockPageContext;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ognl.OgnlValueStack;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
/**
*
*/
public class ElseIfTagTest extends StrutsTestCase {
public class ElseIfTagTest extends StrutsInternalTestCase {
protected MockPageContext pageContext;
protected MockJspWriter jspWriter;
@@ -25,19 +25,18 @@ import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.components.If;
import com.mockobjects.servlet.MockJspWriter;
import com.mockobjects.servlet.MockPageContext;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
/**
*/
public class ElseTagTest extends StrutsTestCase {
public class ElseTagTest extends StrutsInternalTestCase {
ElseTag elseTag;
MockPageContext pageContext;
@@ -21,8 +21,7 @@
package org.apache.struts2.views.jsp;
import org.apache.struts2.TestAction;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsException;
import com.mockobjects.servlet.MockPageContext;
@@ -33,7 +32,7 @@ import com.opensymphony.xwork2.ActionContext;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;
public class I18nTagTest extends StrutsTestCase {
public class I18nTagTest extends StrutsInternalTestCase {
I18nTag tag;
MockPageContext pageContext;
@@ -24,21 +24,18 @@ package org.apache.struts2.views.jsp;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;
import junit.framework.TestCase;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import com.mockobjects.servlet.MockJspWriter;
import com.mockobjects.servlet.MockPageContext;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
/**
*/
public class IfTagTest extends StrutsTestCase {
public class IfTagTest extends StrutsInternalTestCase {
IfTag tag;
MockPageContext pageContext;
@@ -27,20 +27,19 @@ import javax.servlet.jsp.JspException;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import com.mockobjects.servlet.MockJspWriter;
import com.mockobjects.servlet.MockPageContext;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
/**
* PropertyTag test case.
*
*/
public class PropertyTagTest extends StrutsTestCase {
public class PropertyTagTest extends StrutsInternalTestCase {
StrutsMockHttpServletRequest request = new StrutsMockHttpServletRequest();
ValueStack stack;
@@ -21,23 +21,20 @@
package org.apache.struts2.views.util;
import junit.framework.TestCase;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import com.mockobjects.dynamic.C;
import com.mockobjects.dynamic.Mock;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.ValueStackFactory;
/**
* Test case for ContextUtil
*
*/
public class ContextUtilTest extends StrutsTestCase {
public class ContextUtilTest extends StrutsInternalTestCase {
private void setAltSyntax(ValueStack stack, String val) {
Mock container = new Mock(Container.class);
@@ -26,7 +26,7 @@ import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.inject.Scope.Strategy;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -41,7 +41,7 @@ import java.util.TreeMap;
* Test case for DefaultUrlHelper.
*
*/
public class DefaultUrlHelperTest extends StrutsTestCase {
public class DefaultUrlHelperTest extends StrutsInternalTestCase {
private StubContainer stubContainer;
private DefaultUrlHelper urlHelper;
@@ -27,7 +27,7 @@ import com.opensymphony.xwork2.mock.MockActionInvocation;
import com.opensymphony.xwork2.util.ClassLoaderUtil;
import com.opensymphony.xwork2.util.ValueStack;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.StrutsInternalTestCase;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.mock.web.MockServletContext;
@@ -43,7 +43,7 @@ import java.util.List;
* Unit test for {@link XSLTResult}.
*
*/
public class XSLTResultTest extends StrutsTestCase {
public class XSLTResultTest extends StrutsInternalTestCase {
private XSLTResult result;
private MockHttpServletResponse response;
@@ -23,8 +23,6 @@ package org.apache.struts2.s1;
import java.lang.reflect.InvocationTargetException;
import junit.framework.TestCase;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
@@ -37,10 +35,6 @@ import org.apache.struts2.StrutsTestCase;
import org.apache.struts2.config.StrutsXmlConfigurationProvider;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ObjectFactory;
import com.opensymphony.xwork2.config.Configuration;
import com.opensymphony.xwork2.config.ConfigurationManager;
import com.opensymphony.xwork2.config.ConfigurationProvider;
import com.opensymphony.xwork2.config.entities.ExceptionMappingConfig;
import com.opensymphony.xwork2.config.entities.PackageConfig;
import com.opensymphony.xwork2.config.entities.ResultConfig;