Commits

Anonymous committed 2ec6f26

- make test caseses extends off XWorkTestCase
(XWorkTestCase cleans up thread local, static variables etc.)

git-svn-id: http://svn.opensymphony.com/svn/xwork/branches/xwork_1-2@1332e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (17)

src/test/com/opensymphony/xwork/interceptor/component/DefaultComponentManagerTest.java

  */
 package com.opensymphony.xwork.interceptor.component;
 
-import junit.framework.TestCase;
 import org.xml.sax.SAXException;
 
+import com.opensymphony.xwork.XWorkTestCase;
+
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 
  * @author $Author$
  * @version $Revision$
  */
-public class DefaultComponentManagerTest extends TestCase {
+public class DefaultComponentManagerTest extends XWorkTestCase {
 
     public void testFoo() throws IOException, SAXException {
         ComponentConfiguration cc = new ComponentConfiguration();

src/test/com/opensymphony/xwork/spring/interceptor/ActionAutowiringInterceptorTest.java

 import com.opensymphony.xwork.ActionInvocation;
 import com.opensymphony.xwork.SimpleAction;
 import com.opensymphony.xwork.TestBean;
+import com.opensymphony.xwork.XWorkTestCase;
 import com.opensymphony.xwork.config.ConfigurationManager;
 import com.opensymphony.xwork.config.providers.XmlConfigurationProvider;
 
 import java.util.HashMap;
 import java.util.Map;
 
-import junit.framework.TestCase;
-
 /**
  * @author Simon Stewart
  */
-public class ActionAutowiringInterceptorTest extends TestCase {
+public class ActionAutowiringInterceptorTest extends XWorkTestCase {
 
   public void testShouldAutowireAction() throws Exception {
     StaticWebApplicationContext context = new StaticWebApplicationContext();

src/test/com/opensymphony/xwork/util/DomHelperTest.java

 
 import java.io.StringReader;
 
-import junit.framework.TestCase;
-
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
 import org.xml.sax.InputSource;
 
+import com.opensymphony.xwork.XWorkTestCase;
 import com.opensymphony.xwork.util.location.Location;
 
 /**
  * Test cases for {@link DomHelper}.
  */
-public class DomHelperTest extends TestCase {
+public class DomHelperTest extends XWorkTestCase {
 
     private String xml = "<!DOCTYPE foo [\n" +
                          "<!ELEMENT foo (bar)>\n" +

src/test/com/opensymphony/xwork/util/InstantiatingNullHandlerTest.java

 import junit.framework.TestCase;
 import ognl.OgnlContext;
 
+import com.opensymphony.xwork.XWorkTestCase;
 import com.opensymphony.xwork.test.TestBean2;
 
 
  * @author <a href='mailto:the_mindstorm[at]evolva[dot]ro'>Alexandru Popescu</a>
  * @version $Revision$
  */
-public class InstantiatingNullHandlerTest extends TestCase {
+public class InstantiatingNullHandlerTest extends XWorkTestCase {
 
     /*public void testInheritance() {
         Tiger t = new Tiger();

src/test/com/opensymphony/xwork/validator/DateRangeValidatorTest.java

 import com.opensymphony.xwork.ActionProxy;
 import com.opensymphony.xwork.ActionProxyFactory;
 import com.opensymphony.xwork.ValidationAware;
+import com.opensymphony.xwork.XWorkTestCase;
 import com.opensymphony.xwork.validator.validators.DateRangeFieldValidator;
 import com.opensymphony.xwork.config.ConfigurationManager;
 import com.opensymphony.xwork.config.providers.MockConfigurationProvider;
-import junit.framework.TestCase;
 
 import java.util.*;
 
  * @author Jason Carreira
  *         Created Feb 9, 2003 1:25:42 AM
  */
-public class DateRangeValidatorTest extends TestCase {
+public class DateRangeValidatorTest extends XWorkTestCase {
 
     private Locale origLocale;
 

src/test/com/opensymphony/xwork/validator/ExpressionValidatorTest.java

 
 import com.mockobjects.dynamic.C;
 import com.mockobjects.dynamic.Mock;
-import junit.framework.TestCase;
 
 import java.util.Collection;
 import java.util.HashMap;
  * @author Jason Carreira
  * @author Claus Ibsen
  */
-public class ExpressionValidatorTest extends TestCase {
+public class ExpressionValidatorTest extends XWorkTestCase {
 
     public void testExpressionValidationOfStringLength() throws ValidationException {
         TestBean bean = new TestBean();

src/test/com/opensymphony/xwork/validator/IntRangeValidatorTest.java

 import com.opensymphony.xwork.ActionProxy;
 import com.opensymphony.xwork.ActionProxyFactory;
 import com.opensymphony.xwork.ValidationAware;
+import com.opensymphony.xwork.XWorkTestCase;
 import com.opensymphony.xwork.config.ConfigurationManager;
 import com.opensymphony.xwork.config.providers.MockConfigurationProvider;
-import junit.framework.TestCase;
 
 import java.util.HashMap;
 import java.util.List;
  *
  * @author Jason Carreira
  */
-public class IntRangeValidatorTest extends TestCase {
+public class IntRangeValidatorTest extends XWorkTestCase {
 
     public void testRangeValidation() {
         HashMap params = new HashMap();

src/test/com/opensymphony/xwork/validator/ModelDrivenValidationTest.java

 
 import com.opensymphony.xwork.*;
 import com.opensymphony.xwork.config.ConfigurationManager;
-import junit.framework.TestCase;
 
 import java.util.HashMap;
 import java.util.List;
  * @author Jason Carreira
  *         Created Oct 1, 2003 10:08:25 AM
  */
-public class ModelDrivenValidationTest extends TestCase {
+public class ModelDrivenValidationTest extends XWorkTestCase {
 
     public void testModelDrivenValidation() throws Exception {
         Map params = new HashMap();

src/test/com/opensymphony/xwork/validator/RegexFieldValidatorTest.java

 package com.opensymphony.xwork.validator;
 
 import com.opensymphony.xwork.ActionContext;
+import com.opensymphony.xwork.XWorkTestCase;
 import com.opensymphony.xwork.util.OgnlValueStack;
 import com.opensymphony.xwork.validator.validators.RegexFieldValidator;
-import junit.framework.TestCase;
 
 import java.util.List;
 
  *
  * @author Claus Ibsen
  */
-public class RegexFieldValidatorTest extends TestCase {
+public class RegexFieldValidatorTest extends XWorkTestCase {
 
     public void testMatch() throws Exception {
         MyTestPerson testPerson = new MyTestPerson();

src/test/com/opensymphony/xwork/validator/SimpleActionValidationTest.java

 import com.opensymphony.xwork.config.providers.MockConfigurationProvider;
 import com.opensymphony.xwork.util.OgnlValueStack;
 import com.opensymphony.xwork.validator.validators.ValidatorSupport;
-import junit.framework.TestCase;
 
 import java.util.*;
 
  *
  * @author Jason Carreira
  */
-public class SimpleActionValidationTest extends TestCase {
+public class SimpleActionValidationTest extends XWorkTestCase {
 
     private Locale origLocale;
 

src/test/com/opensymphony/xwork/validator/StringLengthFieldValidatorTest.java

 package com.opensymphony.xwork.validator;
 
 import com.opensymphony.xwork.ActionSupport;
+import com.opensymphony.xwork.XWorkTestCase;
 import com.opensymphony.xwork.validator.validators.StringLengthFieldValidator;
 
-import junit.framework.TestCase;
-
-
 /**
  * 
  * @author tm_jee
  * @version $Date$ $Id$
  */
-public class StringLengthFieldValidatorTest extends TestCase {
+public class StringLengthFieldValidatorTest extends XWorkTestCase {
 
 	protected InternalActionSupport action;
 	protected StringLengthFieldValidator validator;

src/test/com/opensymphony/xwork/validator/StringValidatorTest.java

 
 import com.opensymphony.xwork.ActionContext;
 import com.opensymphony.xwork.ValidationAwareSupport;
+import com.opensymphony.xwork.XWorkTestCase;
 import com.opensymphony.xwork.validator.validators.RequiredStringValidator;
 import com.opensymphony.xwork.config.ConfigurationManager;
 import com.opensymphony.xwork.config.providers.MockConfigurationProvider;
 import com.opensymphony.xwork.test.Equidae;
 import com.opensymphony.xwork.util.OgnlValueStack;
-import junit.framework.TestCase;
 
 import java.util.List;
 import java.util.Map;
  * @author Mark Woon
  * @author tm_jee (tm_jee (at) yahoo.co.uk )
  */
-public class StringValidatorTest extends TestCase {
+public class StringValidatorTest extends XWorkTestCase {
 
 	public void testRequiredStringWithNullValue() throws Exception {
 		Equidae equidae = new Equidae();

src/test/com/opensymphony/xwork/validator/URLValidatorTest.java

 package com.opensymphony.xwork.validator;
 
 import com.opensymphony.xwork.ActionContext;
+import com.opensymphony.xwork.XWorkTestCase;
 import com.opensymphony.xwork.util.OgnlValueStack;
 import com.opensymphony.xwork.validator.validators.URLValidator;
 
-import junit.framework.TestCase;
-
 /**
  * Test case for URLValidator
  * 
  * @author tm_jee
  * @version $Date$ $Id$
  */
-public class URLValidatorTest extends TestCase {
+public class URLValidatorTest extends XWorkTestCase {
 
 	
 	OgnlValueStack stack;

src/test/com/opensymphony/xwork/validator/VisitorFieldValidatorModelTest.java

 
 import com.opensymphony.xwork.ActionContext;
 import com.opensymphony.xwork.TestBean;
+import com.opensymphony.xwork.XWorkTestCase;
 import com.opensymphony.xwork.test.TestBean2;
 import com.opensymphony.xwork.util.OgnlValueStack;
-import junit.framework.TestCase;
 
 import java.util.*;
 
  * @author Jason Carreira
  *         Date: Mar 18, 2004 2:51:42 PM
  */
-public class VisitorFieldValidatorModelTest extends TestCase {
+public class VisitorFieldValidatorModelTest extends XWorkTestCase {
 
     protected VisitorValidatorModelAction action;
     private Locale origLocale;

src/test/com/opensymphony/xwork/validator/VisitorFieldValidatorTest.java

 
 import com.opensymphony.xwork.ActionContext;
 import com.opensymphony.xwork.TestBean;
+import com.opensymphony.xwork.XWorkTestCase;
 import com.opensymphony.xwork.util.OgnlValueStack;
-import junit.framework.TestCase;
 
 import java.util.*;
 
  * @author Jason Carreira
  *         Created Aug 4, 2003 1:26:01 AM
  */
-public class VisitorFieldValidatorTest extends TestCase {
+public class VisitorFieldValidatorTest extends XWorkTestCase {
 
     protected VisitorValidatorTestAction action;
     private Locale origLocale;

src/test/com/opensymphony/xwork/validator/validators/CollectionFieldValidatorTest.java

 import java.util.List;
 
 import com.opensymphony.xwork.ActionSupport;
+import com.opensymphony.xwork.XWorkTestCase;
 import com.opensymphony.xwork.validator.DelegatingValidatorContext;
 import com.opensymphony.xwork.validator.validators.CollectionFieldValidator.PropertySpliter;
 
-import junit.framework.TestCase;
-
 /**
  * @author tmjee
  * @version $Date$ $Id$
  */
-public class CollectionFieldValidatorTest extends TestCase {
+public class CollectionFieldValidatorTest extends XWorkTestCase {
 
 	public void testValidator1() throws Exception {
 		TestAction action = new TestAction();

src/test/com/opensymphony/xwork/validator/validators/ValidatorSupportTest.java

 package com.opensymphony.xwork.validator.validators;
 
 import com.opensymphony.xwork.ActionContext;
+import com.opensymphony.xwork.XWorkTestCase;
 import com.opensymphony.xwork.util.OgnlValueStack;
 import com.opensymphony.xwork.validator.ValidationException;
 import com.opensymphony.xwork.validator.validators.ValidatorSupport;
 
-import junit.framework.TestCase;
 
 /**
  * @author tmjee
  * @version $Date$ $Id$
  */
-public class ValidatorSupportTest extends TestCase {
+public class ValidatorSupportTest extends XWorkTestCase {
 
 	public void testConditionalParseExpression()  throws Exception {
 		OgnlValueStack oldStack = ActionContext.getContext().getValueStack();