[gatein-commits] gatein SVN: r1903 - in portal/trunk: component/application-registry/src/test/java/org/exoplatform/application/gadget and 32 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Sun Feb 28 17:04:31 EST 2010


Author: julien_viet
Date: 2010-02-28 17:04:29 -0500 (Sun, 28 Feb 2010)
New Revision: 1903

Added:
   portal/trunk/component/test/core/src/main/java/org/exoplatform/component/test/AbstractKernelTest.java
Modified:
   portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java
   portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestGadgetRegistryService.java
   portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestSourceStorageService.java
   portal/trunk/component/common/src/test/java/org/exoplatform/commons/chromattic/ChromatticIntegrationTestCase.java
   portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/TestSerialization.java
   portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/TestTypeModel.java
   portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/TestConverter.java
   portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/factory/TestObjectFactory.java
   portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/metadata/TestMetaData.java
   portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestBufferingOutputStream.java
   portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestOutputStreamPrinter.java
   portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestPageListAccess.java
   portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestPrinter.java
   portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestSafe.java
   portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestTextEncoder.java
   portal/trunk/component/identity/pom.xml
   portal/trunk/component/identity/src/test/java/org/exoplatform/services/organization/TestConfigOrganizationService.java
   portal/trunk/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java
   portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractPortalTest.java
   portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java
   portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java
   portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestJIBXXmlMapping.java
   portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java
   portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/AbstractTestUserACL.java
   portal/trunk/component/resources/pom.xml
   portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/TestExoResourceBundle.java
   portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/TestLocaleConfigService.java
   portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/test/TestLocaleConfig.java
   portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/test/TestResourceBundleService.java
   portal/trunk/component/scripting/pom.xml
   portal/trunk/component/scripting/src/test/java/org/exoplatform/groovyscript/TestGroovyTemplateEngine.java
   portal/trunk/component/scripting/src/test/java/org/exoplatform/groovyscript/TestTemplateCompiler.java
   portal/trunk/component/scripting/src/test/java/org/exoplatform/groovyscript/TestTemplateParser.java
   portal/trunk/component/scripting/src/test/java/org/exoplatform/groovyscript/TestTemplateRendering.java
   portal/trunk/component/test/core/src/main/java/org/exoplatform/component/test/AbstractGateInTest.java
   portal/trunk/component/test/core/src/test/java/org/exoplatform/component/test/BootstrapTestCase.java
   portal/trunk/component/test/jcr/src/test/java/org/exoplatform/component/test/jcr/BootstrapTestCase.java
   portal/trunk/component/test/organization/src/test/java/org/exoplatform/component/test/organization/BootstrapTestCase.java
   portal/trunk/component/web/pom.xml
   portal/trunk/component/web/src/test/java/org/exoplatform/download/test/TestDownloadService.java
   portal/trunk/component/web/src/test/java/org/exoplatform/json/test/TestJSONConverterService.java
   portal/trunk/component/web/src/test/java/org/exoplatform/web/command/TestCommandHandler.java
   portal/trunk/component/web/src/test/java/org/exoplatform/web/filter/TestExtensibleFilter.java
   portal/trunk/component/web/src/test/java/org/exoplatform/web/filter/TestFilterDefinition.java
   portal/trunk/component/wsrp/src/test/java/org/gatein/portal/wsrp/state/consumer/ConsumerRegistryTestCase.java
   portal/trunk/component/xml-parser/pom.xml
   portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestExceptionParser.java
   portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestFileDetect.java
   portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestHTMLParser.java
   portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestNodeParser.java
   portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestURL.java
   portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/rss/test/TestRSSParser.java
   portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/HtmlCharsetDetector.java
   portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/TestAttributeParser.java
   portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/TestFile.java
   portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/TestHTMLTidy.java
   portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/TestParser.java
   portal/trunk/webui/core/pom.xml
   portal/trunk/webui/core/src/test/java/org/exoplatform/webui/core/renderers/ValueRendererRegistryTestCase.java
   portal/trunk/webui/core/src/test/java/org/exoplatform/webui/test/TestApplication.java
Log:
- added an intermediate AbstractKernelTest in addition of AbstractGateInTest
- now all the unit test to extend directly or indirectly AbstractGateInTest



Modified: portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java
===================================================================
--- portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -18,10 +18,7 @@
  */
 package org.exoplatform.application;
 
-import org.exoplatform.component.test.AbstractGateInTest;
-import org.exoplatform.component.test.ConfigurationUnit;
-import org.exoplatform.component.test.ConfiguredBy;
-import org.exoplatform.component.test.ContainerScope;
+import org.exoplatform.component.test.*;
 
 /**
  * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
@@ -33,7 +30,7 @@
    @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.application-registry-configuration.xml"),
    @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.portal-configuration1.xml")
 })
-public abstract class AbstractApplicationRegistryTest extends AbstractGateInTest
+public abstract class AbstractApplicationRegistryTest extends AbstractKernelTest
 {
 
 /*

Modified: portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestGadgetRegistryService.java
===================================================================
--- portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestGadgetRegistryService.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestGadgetRegistryService.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,8 +19,8 @@
 
 package org.exoplatform.application.gadget;
 
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.container.PortalContainer;
-import org.exoplatform.test.BasicTestCase;
 
 import java.util.List;
 
@@ -32,7 +32,7 @@
  *          thanhtungty at gmail.com
  * Jul 11, 2008  
  */
-public abstract class TestGadgetRegistryService extends BasicTestCase
+public abstract class TestGadgetRegistryService extends AbstractGateInTest
 {
 
    private GadgetRegistryService service_;

Modified: portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestSourceStorageService.java
===================================================================
--- portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestSourceStorageService.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestSourceStorageService.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,7 +19,7 @@
 
 package org.exoplatform.application.gadget;
 
-import org.exoplatform.test.BasicTestCase;
+import org.exoplatform.component.test.AbstractGateInTest;
 
 /**
  * todo julien : fix or remove
@@ -30,7 +30,7 @@
  * @since: 0.0
  * @email: tuan08 at yahoo.com
  */
-public class TestSourceStorageService extends BasicTestCase
+public class TestSourceStorageService extends AbstractGateInTest
 {
 
    private SourceStorage service_;

Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/chromattic/ChromatticIntegrationTestCase.java
===================================================================
--- portal/trunk/component/common/src/test/java/org/exoplatform/commons/chromattic/ChromatticIntegrationTestCase.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/chromattic/ChromatticIntegrationTestCase.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -20,10 +20,7 @@
 
 import org.chromattic.api.Chromattic;
 import org.chromattic.api.ChromatticSession;
-import org.exoplatform.component.test.AbstractGateInTest;
-import org.exoplatform.component.test.ConfigurationUnit;
-import org.exoplatform.component.test.ConfiguredBy;
-import org.exoplatform.component.test.ContainerScope;
+import org.exoplatform.component.test.*;
 import org.exoplatform.container.PortalContainer;
 
 import javax.jcr.Session;
@@ -37,7 +34,7 @@
    @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.test.jcr-configuration.xml"),
    @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.common-configuration.xml")
 })
-public class ChromatticIntegrationTestCase extends AbstractGateInTest
+public class ChromatticIntegrationTestCase extends AbstractKernelTest
 {
 
    /** . */

Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/TestSerialization.java
===================================================================
--- portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/TestSerialization.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/TestSerialization.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,9 +19,8 @@
 
 package org.exoplatform.commons.serialization;
 
-import junit.framework.TestCase;
-import org.exoplatform.commons.serialization.SerializationContext;
 import org.exoplatform.commons.serialization.model.TypeDomain;
+import org.exoplatform.component.test.AbstractGateInTest;
 
 import java.io.ByteArrayInputStream;
 import java.io.NotSerializableException;
@@ -30,7 +29,7 @@
  * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
  * @version $Revision$
  */
-public class TestSerialization extends TestCase
+public class TestSerialization extends AbstractGateInTest
 {
 
    public void testState() throws Exception

Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/TestTypeModel.java
===================================================================
--- portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/TestTypeModel.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/TestTypeModel.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,8 +19,8 @@
 
 package org.exoplatform.commons.serialization;
 
-import junit.framework.TestCase;
 import org.exoplatform.commons.serialization.model.*;
+import org.exoplatform.component.test.AbstractGateInTest;
 
 import java.util.Map;
 
@@ -28,7 +28,7 @@
  * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
  * @version $Revision$
  */
-public class TestTypeModel extends TestCase
+public class TestTypeModel extends AbstractGateInTest
 {
 
 

Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/TestConverter.java
===================================================================
--- portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/TestConverter.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/TestConverter.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -20,10 +20,10 @@
 package org.exoplatform.commons.serialization.converter;
 
 import junit.framework.AssertionFailedError;
-import junit.framework.TestCase;
 import org.exoplatform.commons.serialization.SerializationContext;
 import org.exoplatform.commons.serialization.api.TypeConverter;
 import org.exoplatform.commons.serialization.model.TypeDomain;
+import org.exoplatform.component.test.AbstractGateInTest;
 
 import java.io.InvalidObjectException;
 
@@ -31,7 +31,7 @@
  * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
  * @version $Revision$
  */
-public class TestConverter extends TestCase
+public class TestConverter extends AbstractGateInTest
 {
 
    public void testConvertSerializedType() throws Exception

Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/factory/TestObjectFactory.java
===================================================================
--- portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/factory/TestObjectFactory.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/factory/TestObjectFactory.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,9 +19,9 @@
 
 package org.exoplatform.commons.serialization.factory;
 
-import junit.framework.TestCase;
 import org.exoplatform.commons.serialization.SerializationContext;
 import org.exoplatform.commons.serialization.model.TypeDomain;
+import org.exoplatform.component.test.AbstractGateInTest;
 
 import java.io.InvalidClassException;
 
@@ -29,7 +29,7 @@
  * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
  * @version $Revision$
  */
-public class TestObjectFactory extends TestCase
+public class TestObjectFactory extends AbstractGateInTest
 {
 
    public void testCustomFactory() throws Exception

Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/metadata/TestMetaData.java
===================================================================
--- portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/metadata/TestMetaData.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/metadata/TestMetaData.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,12 +19,12 @@
 
 package org.exoplatform.commons.serialization.metadata;
 
-import junit.framework.TestCase;
 import org.exoplatform.commons.serialization.model.ClassTypeModel;
 import org.exoplatform.commons.serialization.model.ConvertedTypeModel;
 import org.exoplatform.commons.serialization.model.SerializationMode;
 import org.exoplatform.commons.serialization.model.TypeDomain;
 import org.exoplatform.commons.serialization.model.metadata.DomainMetaData;
+import org.exoplatform.component.test.AbstractGateInTest;
 
 import java.util.ArrayList;
 import java.util.LinkedList;
@@ -33,7 +33,7 @@
  * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
  * @version $Revision$
  */
-public class TestMetaData extends TestCase
+public class TestMetaData extends AbstractGateInTest
 {
 
    public void testSerializedObjectClassType() throws Exception

Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestBufferingOutputStream.java
===================================================================
--- portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestBufferingOutputStream.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestBufferingOutputStream.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -18,18 +18,17 @@
  */
 package org.exoplatform.commons.utils;
 
-import junit.framework.TestCase;
+import org.exoplatform.component.test.AbstractGateInTest;
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
-import java.util.Arrays;
 import java.util.concurrent.atomic.AtomicBoolean;
 
 /**
  * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
  * @version $Revision$
  */
-public class TestBufferingOutputStream extends TestCase
+public class TestBufferingOutputStream extends AbstractGateInTest
 {
 
    private ByteArrayOutputStream bytes = new ByteArrayOutputStream();

Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestOutputStreamPrinter.java
===================================================================
--- portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestOutputStreamPrinter.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestOutputStreamPrinter.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -20,7 +20,7 @@
 package org.exoplatform.commons.utils;
 
 import junit.framework.Assert;
-import junit.framework.TestCase;
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.gatein.common.io.UndeclaredIOException;
 
 import java.io.IOException;
@@ -31,7 +31,7 @@
  * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
  * @version $Revision$
  */
-public class TestOutputStreamPrinter extends TestCase
+public class TestOutputStreamPrinter extends AbstractGateInTest
 {
 
    static final int NOOP = -1;

Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestPageListAccess.java
===================================================================
--- portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestPageListAccess.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestPageListAccess.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -20,7 +20,7 @@
 package org.exoplatform.commons.utils;
 
 import junit.framework.AssertionFailedError;
-import junit.framework.TestCase;
+import org.exoplatform.component.test.AbstractGateInTest;
 
 import java.io.*;
 import java.util.List;
@@ -29,7 +29,7 @@
  * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
  * @version $Revision$
  */
-public class TestPageListAccess extends TestCase
+public class TestPageListAccess extends AbstractGateInTest
 {
 
    private final String[] l = {"0", "1", "2", "3", "4", "5", "6"};

Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestPrinter.java
===================================================================
--- portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestPrinter.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestPrinter.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,7 +19,7 @@
 
 package org.exoplatform.commons.utils;
 
-import junit.framework.TestCase;
+import org.exoplatform.component.test.AbstractGateInTest;
 
 import java.io.IOException;
 
@@ -27,7 +27,7 @@
  * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
  * @version $Revision$
  */
-public class TestPrinter extends TestCase
+public class TestPrinter extends AbstractGateInTest
 {
 
    private MyPrinter printer;

Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestSafe.java
===================================================================
--- portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestSafe.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestSafe.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -20,7 +20,7 @@
 package org.exoplatform.commons.utils;
 
 import junit.framework.AssertionFailedError;
-import junit.framework.TestCase;
+import org.exoplatform.component.test.AbstractGateInTest;
 
 import java.io.ByteArrayOutputStream;
 import java.io.Closeable;
@@ -30,7 +30,7 @@
  * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
  * @version $Revision$
  */
-public class TestSafe extends TestCase
+public class TestSafe extends AbstractGateInTest
 {
 
    public TestSafe()

Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestTextEncoder.java
===================================================================
--- portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestTextEncoder.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/utils/TestTextEncoder.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,7 +19,7 @@
 
 package org.exoplatform.commons.utils;
 
-import junit.framework.TestCase;
+import org.exoplatform.component.test.AbstractGateInTest;
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -31,7 +31,7 @@
  * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
  * @version $Revision$
  */
-public class TestTextEncoder extends TestCase
+public class TestTextEncoder extends AbstractGateInTest
 {
 
    public void testA() throws IOException

Modified: portal/trunk/component/identity/pom.xml
===================================================================
--- portal/trunk/component/identity/pom.xml	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/identity/pom.xml	2010-02-28 22:04:29 UTC (rev 1903)
@@ -74,11 +74,17 @@
         <artifactId>picketlink-idm-cache</artifactId>
      </dependency>
 
-      <dependency>
-         <groupId>hsqldb</groupId>
-         <artifactId>hsqldb</artifactId>
-         <scope>test</scope>
-      </dependency>
+     <dependency>
+        <groupId>hsqldb</groupId>
+        <artifactId>hsqldb</artifactId>
+        <scope>test</scope>
+     </dependency>
+     <dependency>
+       <groupId>org.exoplatform.portal</groupId>
+       <artifactId>exo.portal.component.test.core</artifactId>
+       <version>3.0.0-CR02-SNAPSHOT</version>
+       <scope>test</scope>
+     </dependency>
 
     <dependency>
       <groupId>javax.resource</groupId>

Modified: portal/trunk/component/identity/src/test/java/org/exoplatform/services/organization/TestConfigOrganizationService.java
===================================================================
--- portal/trunk/component/identity/src/test/java/org/exoplatform/services/organization/TestConfigOrganizationService.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/identity/src/test/java/org/exoplatform/services/organization/TestConfigOrganizationService.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -22,12 +22,12 @@
 package org.exoplatform.services.organization;
 
 import org.exoplatform.commons.utils.PageList;
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.container.PortalContainer;
 import org.exoplatform.container.component.ComponentRequestLifecycle;
 import org.exoplatform.container.component.RequestLifeCycle;
 import org.exoplatform.services.organization.idm.Config;
 import org.exoplatform.services.organization.idm.PicketLinkIDMOrganizationServiceImpl;
-import org.exoplatform.test.BasicTestCase;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -37,7 +37,7 @@
  * Oct 27, 2005
  */
 
-public class TestConfigOrganizationService extends BasicTestCase
+public class TestConfigOrganizationService extends AbstractGateInTest
 {
 
    static String Group1 = "Group1";

Modified: portal/trunk/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java
===================================================================
--- portal/trunk/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -20,11 +20,11 @@
 package org.exoplatform.services.organization;
 
 import org.exoplatform.commons.utils.PageList;
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.container.PortalContainer;
 import org.exoplatform.container.component.ComponentRequestLifecycle;
 import org.exoplatform.container.component.RequestLifeCycle;
 import org.exoplatform.services.organization.idm.UserDAOImpl;
-import org.exoplatform.test.BasicTestCase;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -34,7 +34,7 @@
  * Oct 27, 2005
  */
 
-public class TestOrganizationService extends BasicTestCase
+public class TestOrganizationService extends AbstractGateInTest
 {
 
    static String Group1 = "Group1";

Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractPortalTest.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractPortalTest.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractPortalTest.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,10 +19,7 @@
 package org.exoplatform.portal.config;
 
 import org.exoplatform.commons.chromattic.ChromatticManager;
-import org.exoplatform.component.test.AbstractGateInTest;
-import org.exoplatform.component.test.ConfigurationUnit;
-import org.exoplatform.component.test.ConfiguredBy;
-import org.exoplatform.component.test.ContainerScope;
+import org.exoplatform.component.test.*;
 import org.exoplatform.container.PortalContainer;
 
 /**
@@ -35,7 +32,7 @@
    @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.portal-configuration1.xml"),
    @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.portal-configuration2.xml")
 })
-public abstract class AbstractPortalTest extends AbstractGateInTest
+public abstract class AbstractPortalTest extends AbstractKernelTest
 {
 
    public AbstractPortalTest()

Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -22,7 +22,6 @@
 import org.exoplatform.portal.config.model.Page;
 import org.exoplatform.portal.pom.config.POMSession;
 import org.exoplatform.portal.pom.config.POMSessionManager;
-import org.exoplatform.test.BasicTestCase;
 
 import java.util.concurrent.atomic.AtomicBoolean;
 

Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -21,7 +21,6 @@
 import org.exoplatform.container.PortalContainer;
 import org.exoplatform.portal.pom.config.POMSession;
 import org.exoplatform.portal.pom.config.POMSessionManager;
-import org.exoplatform.test.BasicTestCase;
 
 /**
  * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>

Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestJIBXXmlMapping.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestJIBXXmlMapping.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestJIBXXmlMapping.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,6 +19,7 @@
 
 package org.exoplatform.portal.config;
 
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.portal.application.PortletPreferences.PortletPreferencesSet;
 import org.exoplatform.portal.config.model.Application;
 import org.exoplatform.portal.config.model.Page;
@@ -28,7 +29,6 @@
 import org.exoplatform.portal.config.model.Page.PageSet;
 import org.exoplatform.portal.pom.spi.portlet.Portlet;
 import org.exoplatform.portal.pom.spi.portlet.PortletBuilder;
-import org.exoplatform.test.BasicTestCase;
 import org.jibx.runtime.BindingDirectory;
 import org.jibx.runtime.IBindingFactory;
 import org.jibx.runtime.IMarshallingContext;
@@ -44,7 +44,7 @@
  * @since: 0.0
  * @email: tuan08 at yahoo.com
  */
-public class TestJIBXXmlMapping extends BasicTestCase
+public class TestJIBXXmlMapping extends AbstractGateInTest
 {
 
    public TestJIBXXmlMapping(String name)

Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -30,7 +30,6 @@
 import org.exoplatform.portal.config.model.PortalConfig;
 import org.exoplatform.portal.pom.config.POMSession;
 import org.exoplatform.portal.pom.config.POMSessionManager;
-import org.exoplatform.test.BasicTestCase;
 
 import java.util.Arrays;
 import java.util.GregorianCalendar;

Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/AbstractTestUserACL.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/AbstractTestUserACL.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/security/AbstractTestUserACL.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,7 +19,7 @@
 
 package org.exoplatform.portal.config.security;
 
-import junit.framework.TestCase;
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.portal.config.UserACL;
 import org.exoplatform.portal.config.UserACLMetaData;
 import org.exoplatform.portal.config.model.Page;
@@ -39,7 +39,7 @@
  * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
  * @version $Revision$
  */
-public abstract class AbstractTestUserACL extends TestCase
+public abstract class AbstractTestUserACL extends AbstractGateInTest
 {
 
    protected UserACL ua;

Modified: portal/trunk/component/resources/pom.xml
===================================================================
--- portal/trunk/component/resources/pom.xml	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/resources/pom.xml	2010-02-28 22:04:29 UTC (rev 1903)
@@ -79,10 +79,17 @@
       <version>3.0.0-CR02-SNAPSHOT</version>
     </dependency>
 
-      <dependency>
-        <groupId>junit</groupId>
-        <artifactId>junit</artifactId>
-        <scope>test</scope>
-      </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.exoplatform.portal</groupId>
+      <artifactId>exo.portal.component.test.core</artifactId>
+      <version>3.0.0-CR02-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
+
   </dependencies>
 </project>

Modified: portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/TestExoResourceBundle.java
===================================================================
--- portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/TestExoResourceBundle.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/TestExoResourceBundle.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,9 +19,9 @@
 
 package org.exoplatform.services.resources;
 
-import junit.framework.TestCase;
+import org.exoplatform.component.test.AbstractGateInTest;
 
-public class TestExoResourceBundle extends TestCase
+public class TestExoResourceBundle extends AbstractGateInTest
 {
 
    public void testConstructor()

Modified: portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/TestLocaleConfigService.java
===================================================================
--- portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/TestLocaleConfigService.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/TestLocaleConfigService.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,9 +19,8 @@
 
 package org.exoplatform.services.resources;
 
-import junit.framework.TestCase;
-
 import org.exoplatform.commons.utils.PropertyManager;
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.container.configuration.ConfigurationManagerImpl;
 import org.exoplatform.container.xml.InitParams;
 import org.exoplatform.container.xml.ValueParam;
@@ -36,7 +35,7 @@
  * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
  * @version $Revision$
  */
-public class TestLocaleConfigService extends TestCase
+public class TestLocaleConfigService extends AbstractGateInTest
 {
 
    public TestLocaleConfigService()

Modified: portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/test/TestLocaleConfig.java
===================================================================
--- portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/test/TestLocaleConfig.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/test/TestLocaleConfig.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,13 +19,12 @@
 
 package org.exoplatform.services.resources.test;
 
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.container.PortalContainer;
 import org.exoplatform.services.resources.LocaleConfig;
 import org.exoplatform.services.resources.LocaleConfigService;
-import org.exoplatform.test.BasicTestCase;
 
 import java.util.Collection;
-import java.util.Comparator;
 import java.util.Locale;
 
 /**
@@ -34,7 +33,7 @@
  * @version: $Id: TestLocaleConfig.java 5799 2006-05-28 17:55:42Z geaz $
  * @email: tuan08 at yahoo.com
  */
-public class TestLocaleConfig extends BasicTestCase
+public class TestLocaleConfig extends AbstractGateInTest
 {
 
    private LocaleConfigService service_;
@@ -76,21 +75,20 @@
       assertTrue(locales.size() == 4);
 
       Locale vnlocale = service_.getLocaleConfig("vi").getLocale();
-      hasObjectInCollection(vnlocale, locales, new LocaleComparator());
-      hasObjectInCollection(Locale.ENGLISH, locales, new LocaleComparator());
-      hasObjectInCollection(Locale.FRENCH, locales, new LocaleComparator());
+      assertContains(locales, vnlocale);
+      assertContains(locales, Locale.ENGLISH);
+      assertContains(locales, Locale.FRENCH);
    }
 
-   public static class LocaleComparator implements Comparator
+   private void assertContains(Collection<LocaleConfig> configs, Locale locale)
    {
-
-      public int compare(Object o1, Object o2)
+      for (LocaleConfig config : configs)
       {
-         Locale locale1 = (Locale)o1;
-         LocaleConfig localse2 = (LocaleConfig)o2;
-         if (locale1.equals(localse2.getLocale()))
-            return 0;
-         return -1;
+         if (config.getLocale().equals(locale))
+         {
+            return;
+         }
       }
+      fail("Was expecting locale " + locale + " to be present in " + configs);
    }
 }
\ No newline at end of file

Modified: portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/test/TestResourceBundleService.java
===================================================================
--- portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/test/TestResourceBundleService.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/test/TestResourceBundleService.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,12 +19,12 @@
 
 package org.exoplatform.services.resources.test;
 
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.container.PortalContainer;
 import org.exoplatform.services.resources.LocaleConfigService;
 import org.exoplatform.services.resources.Query;
 import org.exoplatform.services.resources.ResourceBundleData;
 import org.exoplatform.services.resources.ResourceBundleService;
-import org.exoplatform.test.BasicTestCase;
 
 import java.util.List;
 import java.util.Locale;
@@ -37,7 +37,7 @@
  * @since: 0.0
  * @email: tuan08 at yahoo.com
  */
-public class TestResourceBundleService extends BasicTestCase
+public class TestResourceBundleService extends AbstractGateInTest
 {
 
    final static private String PROPERTIES = "language=en\nproperty=property";

Modified: portal/trunk/component/scripting/pom.xml
===================================================================
--- portal/trunk/component/scripting/pom.xml	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/scripting/pom.xml	2010-02-28 22:04:29 UTC (rev 1903)
@@ -58,5 +58,12 @@
       <groupId>org.codehaus.groovy</groupId>
       <artifactId>groovy-all</artifactId>
     </dependency>
+
+    <dependency>
+      <groupId>org.exoplatform.portal</groupId>
+      <artifactId>exo.portal.component.test.core</artifactId>
+      <version>3.0.0-CR02-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>

Modified: portal/trunk/component/scripting/src/test/java/org/exoplatform/groovyscript/TestGroovyTemplateEngine.java
===================================================================
--- portal/trunk/component/scripting/src/test/java/org/exoplatform/groovyscript/TestGroovyTemplateEngine.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/scripting/src/test/java/org/exoplatform/groovyscript/TestGroovyTemplateEngine.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -18,7 +18,7 @@
  */
 package org.exoplatform.groovyscript;
 
-import junit.framework.TestCase;
+import org.exoplatform.component.test.AbstractGateInTest;
 
 import java.io.IOException;
 
@@ -26,7 +26,7 @@
  * @author <a href="mailto:trong.tran at exoplatform.com">Trong Tran</a>
  * @version $Revision$
  */
-public class TestGroovyTemplateEngine extends TestCase
+public class TestGroovyTemplateEngine extends AbstractGateInTest
 {
    public void testFileName() throws IOException, TemplateCompilationException
    {

Modified: portal/trunk/component/scripting/src/test/java/org/exoplatform/groovyscript/TestTemplateCompiler.java
===================================================================
--- portal/trunk/component/scripting/src/test/java/org/exoplatform/groovyscript/TestTemplateCompiler.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/scripting/src/test/java/org/exoplatform/groovyscript/TestTemplateCompiler.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -18,7 +18,7 @@
  */
 package org.exoplatform.groovyscript;
 
-import junit.framework.TestCase;
+import org.exoplatform.component.test.AbstractGateInTest;
 
 import java.io.IOException;
 
@@ -26,7 +26,7 @@
  * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
  * @version $Revision$
  */
-public class TestTemplateCompiler extends TestCase
+public class TestTemplateCompiler extends AbstractGateInTest
 {
 
    /** . */

Modified: portal/trunk/component/scripting/src/test/java/org/exoplatform/groovyscript/TestTemplateParser.java
===================================================================
--- portal/trunk/component/scripting/src/test/java/org/exoplatform/groovyscript/TestTemplateParser.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/scripting/src/test/java/org/exoplatform/groovyscript/TestTemplateParser.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -18,10 +18,7 @@
  */
 package org.exoplatform.groovyscript;
 
-import junit.framework.TestCase;
-import org.exoplatform.groovyscript.TemplateSection;
-import org.exoplatform.groovyscript.SectionType;
-import org.exoplatform.groovyscript.TemplateParser;
+import org.exoplatform.component.test.AbstractGateInTest;
 
 import java.io.IOException;
 import java.util.Arrays;
@@ -32,7 +29,7 @@
  * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
  * @version $Revision$
  */
-public class TestTemplateParser extends TestCase
+public class TestTemplateParser extends AbstractGateInTest
 {
 
    /** . */

Modified: portal/trunk/component/scripting/src/test/java/org/exoplatform/groovyscript/TestTemplateRendering.java
===================================================================
--- portal/trunk/component/scripting/src/test/java/org/exoplatform/groovyscript/TestTemplateRendering.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/scripting/src/test/java/org/exoplatform/groovyscript/TestTemplateRendering.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -18,9 +18,9 @@
  */
 package org.exoplatform.groovyscript;
 
-import junit.framework.TestCase;
 import org.exoplatform.commons.utils.CharsetTextEncoder;
 import org.exoplatform.commons.utils.OutputStreamPrinter;
+import org.exoplatform.component.test.AbstractGateInTest;
 
 import java.awt.*;
 import java.io.*;
@@ -32,7 +32,7 @@
  * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
  * @version $Revision$
  */
-public class TestTemplateRendering extends TestCase
+public class TestTemplateRendering extends AbstractGateInTest
 {
 
    public void testOutputStreamWriter() throws Exception

Modified: portal/trunk/component/test/core/src/main/java/org/exoplatform/component/test/AbstractGateInTest.java
===================================================================
--- portal/trunk/component/test/core/src/main/java/org/exoplatform/component/test/AbstractGateInTest.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/test/core/src/main/java/org/exoplatform/component/test/AbstractGateInTest.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -18,20 +18,13 @@
  */
 package org.exoplatform.component.test;
 
-import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.container.component.RequestLifeCycle;
 import org.gatein.common.logging.Logger;
 import org.gatein.common.logging.LoggerFactory;
 
-import java.io.File;
-import java.io.FilenameFilter;
 import java.util.*;
 
 /**
- * An abstract test that takes care of running the unit tests with the semantic described by the
- * {#link GateInTestClassLoader}.
  *
  * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
  * @version $Revision$
@@ -39,18 +32,11 @@
 public abstract class AbstractGateInTest extends TestCase
 {
 
-   /** The system property for gatein tmp dir. */
-   private static final String TMP_DIR = "gatein.test.tmp.dir";
-
    /** . */
    protected final Logger log = LoggerFactory.getLogger(getClass());
 
-   /** . */
-   private PortalContainer container;
-
    protected AbstractGateInTest()
    {
-      super();
    }
 
    protected AbstractGateInTest(String name)
@@ -58,26 +44,22 @@
       super(name);
    }
 
-   public PortalContainer getContainer()
+   protected void beforeRunBare() throws Exception
    {
-      return container;
+      //
    }
 
-   protected void begin()
+   /**
+    * After the run base, it should not throw anything as it is executed in a finally clause.
+    */
+   protected void afterRunBare()
    {
-      RequestLifeCycle.begin(container);
+      //
    }
 
-   protected void end()
-   {
-      RequestLifeCycle.end();
-   }
-
    @Override
-   public void runBare() throws Throwable
+   public final void runBare() throws Throwable
    {
-      ClassLoader realClassLoader = Thread.currentThread().getContextClassLoader();
-
       // Patch a bug with maven that does not pass properly the system property
       // with an empty value
       if ("org.hsqldb.jdbcDriver".equals(System.getProperty("gatein.test.datasource.driver")))
@@ -86,7 +68,7 @@
       }
 
       //
-      log.info("Listing gatein system properties:");
+      log.info("Running unit test:" + getName());
       for (Map.Entry<?, ?> entry : System.getProperties().entrySet())
       {
          if (entry.getKey() instanceof String)
@@ -96,118 +78,32 @@
             {
                log.info(key + "=" + entry.getValue());
             }
-         }
-      }
-
-      //
-      Set<String> rootConfigPaths = new HashSet<String>();
-      rootConfigPaths.add("conf/root-configuration.xml");
-
-      //
-      Set<String> portalConfigPaths = new HashSet<String>();
-      portalConfigPaths.add("conf/portal-configuration.xml");
-
-      //
-      EnumMap<ContainerScope, Set<String>> configs = new EnumMap<ContainerScope, Set<String>>(ContainerScope.class);
-      configs.put(ContainerScope.ROOT, rootConfigPaths);
-      configs.put(ContainerScope.PORTAL, portalConfigPaths);
-
-      //
-      ConfiguredBy cfBy = getClass().getAnnotation(ConfiguredBy.class);
-      if (cfBy != null)
-      {
-         for (ConfigurationUnit src : cfBy.value())
-         {
-            configs.get(src.scope()).add(src.path());
-         }
-      }
-
-      // Take care of creating tmp directory for unit test
-      if (System.getProperty(TMP_DIR) == null)
-      {
-         // Get base dir set by maven or die
-         File targetDir = new File(new File(System.getProperty("basedir")), "target");
-         if (!targetDir.exists())
-         {
-            throw new AssertionFailedError("Target dir for unit test does not exist");
-         }
-         if (!targetDir.isDirectory())
-         {
-            throw new AssertionFailedError("Target dir is not a directory");
-         }
-         if (!targetDir.canWrite())
-         {
-            throw new AssertionFailedError("Target dir is not writable");
-         }
-
-         //
-         Set<String> fileNames = new HashSet<String>();
-         for (File child : targetDir.listFiles(new FilenameFilter()
-         {
-            public boolean accept(File dir, String name)
+            else
             {
-               return name.startsWith("gateintest-");
+               log.debug(key + "=" + entry.getValue());
             }
-         })) 
-         {
-            fileNames.add(child.getName());
          }
-
-         //
-         String fileName;
-         int count = 0;
-         while (true)
-         {
-            fileName = "gateintest-" + count;
-            if (!fileNames.contains(fileName)) {
-               break;
-            }
-            count++;
-         }
-
-         //
-         File tmp = new File(targetDir, fileName);
-         if (!tmp.mkdirs())
-         {
-            throw new AssertionFailedError("Could not create directory " + tmp.getCanonicalPath());
-         }
-
-         //
-         System.setProperty(TMP_DIR, tmp.getCanonicalPath());
       }
 
       //
-//      List<Throwable> failures = new ArrayList<Throwable>();
+      beforeRunBare();
 
       //
       try
       {
-         ClassLoader testClassLoader = new GateInTestClassLoader(realClassLoader, rootConfigPaths, portalConfigPaths);
-         Thread.currentThread().setContextClassLoader(testClassLoader);
-
-         // Boot the container
-         container = PortalContainer.getInstance();
-
-         // Execute test
          super.runBare();
+         log.info("Unit test " + getName() + " completed");
       }
-      finally
+      catch (Throwable throwable)
       {
-         container = null;
+         log.error("Unit test " + getName() + " did not complete", throwable);
 
          //
-         Thread.currentThread().setContextClassLoader(realClassLoader);
+         throw throwable;
       }
-
-      //
-/*
-      if (failures.size() > 0)
+      finally
       {
-         Throwable failure = failures.get(0);
-         AssertionFailedError afe = new AssertionFailedError();
-         afe.initCause(failure);
-         throw afe;
+         afterRunBare();
       }
-*/
    }
 }

Added: portal/trunk/component/test/core/src/main/java/org/exoplatform/component/test/AbstractKernelTest.java
===================================================================
--- portal/trunk/component/test/core/src/main/java/org/exoplatform/component/test/AbstractKernelTest.java	                        (rev 0)
+++ portal/trunk/component/test/core/src/main/java/org/exoplatform/component/test/AbstractKernelTest.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -0,0 +1,187 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.component.test;
+
+import junit.framework.AssertionFailedError;
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.container.component.RequestLifeCycle;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.util.EnumMap;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * An abstract test that takes care of running the unit tests with the semantic described by the
+ * {#link GateInTestClassLoader}.
+ * 
+ * @author <a href="mailto:julien.viet at exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class AbstractKernelTest extends AbstractGateInTest
+{
+
+   /** The system property for gatein tmp dir. */
+   private static final String TMP_DIR = "gatein.test.tmp.dir";
+
+   /** . */
+   private PortalContainer container;
+
+   /** . */
+   private ClassLoader realClassLoader;
+
+   protected AbstractKernelTest()
+   {
+      super();
+   }
+
+   protected AbstractKernelTest(String name)
+   {
+      super(name);
+   }
+
+   public PortalContainer getContainer()
+   {
+      return container;
+   }
+
+   protected void begin()
+   {
+      RequestLifeCycle.begin(container);
+   }
+
+   protected void end()
+   {
+      RequestLifeCycle.end();
+   }
+
+   @Override
+   protected void beforeRunBare() throws Exception
+   {
+      realClassLoader = Thread.currentThread().getContextClassLoader();
+
+      //
+      Set<String> rootConfigPaths = new HashSet<String>();
+      rootConfigPaths.add("conf/root-configuration.xml");
+
+      //
+      Set<String> portalConfigPaths = new HashSet<String>();
+      portalConfigPaths.add("conf/portal-configuration.xml");
+
+      //
+      EnumMap<ContainerScope, Set<String>> configs = new EnumMap<ContainerScope, Set<String>>(ContainerScope.class);
+      configs.put(ContainerScope.ROOT, rootConfigPaths);
+      configs.put(ContainerScope.PORTAL, portalConfigPaths);
+
+      //
+      ConfiguredBy cfBy = getClass().getAnnotation(ConfiguredBy.class);
+      if (cfBy != null)
+      {
+         for (ConfigurationUnit src : cfBy.value())
+         {
+            configs.get(src.scope()).add(src.path());
+         }
+      }
+
+      // Take care of creating tmp directory for unit test
+      if (System.getProperty(TMP_DIR) == null)
+      {
+         // Get base dir set by maven or die
+         File targetDir = new File(new File(System.getProperty("basedir")), "target");
+         if (!targetDir.exists())
+         {
+            throw new AssertionFailedError("Target dir for unit test does not exist");
+         }
+         if (!targetDir.isDirectory())
+         {
+            throw new AssertionFailedError("Target dir is not a directory");
+         }
+         if (!targetDir.canWrite())
+         {
+            throw new AssertionFailedError("Target dir is not writable");
+         }
+
+         //
+         Set<String> fileNames = new HashSet<String>();
+         for (File child : targetDir.listFiles(new FilenameFilter()
+         {
+            public boolean accept(File dir, String name)
+            {
+               return name.startsWith("gateintest-");
+            }
+         }))
+         {
+            fileNames.add(child.getName());
+         }
+
+         //
+         String fileName;
+         int count = 0;
+         while (true)
+         {
+            fileName = "gateintest-" + count;
+            if (!fileNames.contains(fileName)) {
+               break;
+            }
+            count++;
+         }
+
+         //
+         File tmp = new File(targetDir, fileName);
+         if (!tmp.mkdirs())
+         {
+            throw new AssertionFailedError("Could not create directory " + tmp.getCanonicalPath());
+         }
+
+         //
+         System.setProperty(TMP_DIR, tmp.getCanonicalPath());
+      }
+
+      //
+      ClassLoader testClassLoader = new GateInTestClassLoader(realClassLoader, rootConfigPaths, portalConfigPaths);
+      Thread.currentThread().setContextClassLoader(testClassLoader);
+
+      // Boot the container
+      container = PortalContainer.getInstance();
+
+      //
+//      List<Throwable> failures = new ArrayList<Throwable>();
+   }
+
+   @Override
+   protected void afterRunBare()
+   {
+      container = null;
+
+      //
+      Thread.currentThread().setContextClassLoader(realClassLoader);
+
+/*
+      if (failures.size() > 0)
+      {
+         Throwable failure = failures.get(0);
+         AssertionFailedError afe = new AssertionFailedError();
+         afe.initCause(failure);
+         throw afe;
+      }
+*/
+   }
+}

Modified: portal/trunk/component/test/core/src/test/java/org/exoplatform/component/test/BootstrapTestCase.java
===================================================================
--- portal/trunk/component/test/core/src/test/java/org/exoplatform/component/test/BootstrapTestCase.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/test/core/src/test/java/org/exoplatform/component/test/BootstrapTestCase.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -36,7 +36,7 @@
    @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/jcr/jcr-configuration.xml"),
    @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/test-configuration.xml")
 })
-public class BootstrapTestCase extends AbstractGateInTest
+public class BootstrapTestCase extends AbstractKernelTest
 {
 
    /** . */

Modified: portal/trunk/component/test/jcr/src/test/java/org/exoplatform/component/test/jcr/BootstrapTestCase.java
===================================================================
--- portal/trunk/component/test/jcr/src/test/java/org/exoplatform/component/test/jcr/BootstrapTestCase.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/test/jcr/src/test/java/org/exoplatform/component/test/jcr/BootstrapTestCase.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -18,10 +18,7 @@
  */
 package org.exoplatform.component.test.jcr;
 
-import org.exoplatform.component.test.AbstractGateInTest;
-import org.exoplatform.component.test.ConfigurationUnit;
-import org.exoplatform.component.test.ConfiguredBy;
-import org.exoplatform.component.test.ContainerScope;
+import org.exoplatform.component.test.*;
 import org.exoplatform.container.PortalContainer;
 import org.exoplatform.services.jcr.RepositoryService;
 import org.exoplatform.services.jcr.core.ManageableRepository;
@@ -33,7 +30,7 @@
  * @version $Revision$
  */
 @ConfiguredBy({@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.test.jcr-configuration.xml")})
-public class BootstrapTestCase extends AbstractGateInTest
+public class BootstrapTestCase extends AbstractKernelTest
 {
 
    public void testWorkspace() throws Exception

Modified: portal/trunk/component/test/organization/src/test/java/org/exoplatform/component/test/organization/BootstrapTestCase.java
===================================================================
--- portal/trunk/component/test/organization/src/test/java/org/exoplatform/component/test/organization/BootstrapTestCase.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/test/organization/src/test/java/org/exoplatform/component/test/organization/BootstrapTestCase.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -23,10 +23,7 @@
 
 package org.exoplatform.component.test.organization;
 
-import org.exoplatform.component.test.AbstractGateInTest;
-import org.exoplatform.component.test.ConfigurationUnit;
-import org.exoplatform.component.test.ConfiguredBy;
-import org.exoplatform.component.test.ContainerScope;
+import org.exoplatform.component.test.*;
 import org.exoplatform.container.PortalContainer;
 import org.exoplatform.services.database.HibernateService;
 import org.exoplatform.services.organization.OrganizationService;
@@ -34,7 +31,7 @@
 import org.exoplatform.services.organization.impl.UserImpl;
 
 @ConfiguredBy({@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.test.organization-configuration.xml")})
-public class BootstrapTestCase extends AbstractGateInTest
+public class BootstrapTestCase extends AbstractKernelTest
 {
 
    public void testWorkspace() throws Exception

Modified: portal/trunk/component/web/pom.xml
===================================================================
--- portal/trunk/component/web/pom.xml	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/web/pom.xml	2010-02-28 22:04:29 UTC (rev 1903)
@@ -105,6 +105,13 @@
      </dependency>
 
      <dependency>
+       <groupId>org.exoplatform.portal</groupId>
+       <artifactId>exo.portal.component.test.core</artifactId>
+       <version>3.0.0-CR02-SNAPSHOT</version>
+       <scope>test</scope>
+     </dependency>
+
+     <dependency>
         <groupId>org.jboss.jbossas</groupId>
         <artifactId>jboss-as-tomcat</artifactId>
         <version>5.1.0.GA</version>

Modified: portal/trunk/component/web/src/test/java/org/exoplatform/download/test/TestDownloadService.java
===================================================================
--- portal/trunk/component/web/src/test/java/org/exoplatform/download/test/TestDownloadService.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/web/src/test/java/org/exoplatform/download/test/TestDownloadService.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,8 +19,8 @@
 
 package org.exoplatform.download.test;
 
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.download.DownloadService;
-import org.exoplatform.test.BasicTestCase;
 
 /**
  * Created by The eXo Platform SARL
@@ -28,7 +28,7 @@
  *          tuan08 at users.sourceforge.net
  * Dec 26, 2005
  */
-public class TestDownloadService extends BasicTestCase
+public class TestDownloadService extends AbstractGateInTest
 {
 
    private DownloadService service_;

Modified: portal/trunk/component/web/src/test/java/org/exoplatform/json/test/TestJSONConverterService.java
===================================================================
--- portal/trunk/component/web/src/test/java/org/exoplatform/json/test/TestJSONConverterService.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/web/src/test/java/org/exoplatform/json/test/TestJSONConverterService.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,11 +19,11 @@
 
 package org.exoplatform.json.test;
 
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.json.BeanToJSONPlugin;
 import org.exoplatform.json.JSONMap;
 import org.exoplatform.json.JSONService;
 import org.exoplatform.json.MapToJSONPlugin;
-import org.exoplatform.test.BasicTestCase;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -36,7 +36,7 @@
  *          nhudinhthuan at exoplatform.com
  * Mar 26, 2007  
  */
-public class TestJSONConverterService extends BasicTestCase
+public class TestJSONConverterService extends AbstractGateInTest
 {
 
    private JSONService service_;

Modified: portal/trunk/component/web/src/test/java/org/exoplatform/web/command/TestCommandHandler.java
===================================================================
--- portal/trunk/component/web/src/test/java/org/exoplatform/web/command/TestCommandHandler.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/web/src/test/java/org/exoplatform/web/command/TestCommandHandler.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,7 +19,7 @@
 
 package org.exoplatform.web.command;
 
-import org.exoplatform.test.BasicTestCase;
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.web.WebAppController;
 
 import java.util.HashMap;
@@ -34,7 +34,7 @@
  *          nhudinhthuan at exoplatform.com
  * Mar 26, 2007  
  */
-public class TestCommandHandler extends BasicTestCase
+public class TestCommandHandler extends AbstractGateInTest
 {
 
    public TestCommandHandler(String name)

Modified: portal/trunk/component/web/src/test/java/org/exoplatform/web/filter/TestExtensibleFilter.java
===================================================================
--- portal/trunk/component/web/src/test/java/org/exoplatform/web/filter/TestExtensibleFilter.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/web/src/test/java/org/exoplatform/web/filter/TestExtensibleFilter.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,7 +19,7 @@
 
 package org.exoplatform.web.filter;
 
-import junit.framework.TestCase;
+import org.exoplatform.component.test.AbstractGateInTest;
 
 import java.io.BufferedReader;
 import java.io.IOException;
@@ -47,7 +47,7 @@
  *          nicolas.filotto at exoplatform.com
  * 25 sept. 2009  
  */
-public class TestExtensibleFilter extends TestCase
+public class TestExtensibleFilter extends AbstractGateInTest
 {
 
    public void testDoFilter() throws IOException, ServletException

Modified: portal/trunk/component/web/src/test/java/org/exoplatform/web/filter/TestFilterDefinition.java
===================================================================
--- portal/trunk/component/web/src/test/java/org/exoplatform/web/filter/TestFilterDefinition.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/web/src/test/java/org/exoplatform/web/filter/TestFilterDefinition.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,7 +19,7 @@
 
 package org.exoplatform.web.filter;
 
-import junit.framework.TestCase;
+import org.exoplatform.component.test.AbstractGateInTest;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -30,7 +30,7 @@
  *          nicolas.filotto at exoplatform.com
  * 25 sept. 2009  
  */
-public class TestFilterDefinition extends TestCase
+public class TestFilterDefinition extends AbstractGateInTest
 {
 
    public void testMatch()

Modified: portal/trunk/component/wsrp/src/test/java/org/gatein/portal/wsrp/state/consumer/ConsumerRegistryTestCase.java
===================================================================
--- portal/trunk/component/wsrp/src/test/java/org/gatein/portal/wsrp/state/consumer/ConsumerRegistryTestCase.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/wsrp/src/test/java/org/gatein/portal/wsrp/state/consumer/ConsumerRegistryTestCase.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -23,10 +23,7 @@
 
 package org.gatein.portal.wsrp.state.consumer;
 
-import org.exoplatform.component.test.AbstractGateInTest;
-import org.exoplatform.component.test.ConfigurationUnit;
-import org.exoplatform.component.test.ConfiguredBy;
-import org.exoplatform.component.test.ContainerScope;
+import org.exoplatform.component.test.*;
 import org.gatein.pc.federation.impl.FederatingPortletInvokerService;
 import org.gatein.wsrp.WSRPConsumer;
 import org.gatein.wsrp.consumer.ConsumerException;
@@ -47,7 +44,7 @@
    @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.test.jcr-configuration.xml"),
    @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.wsrp-configuration.xml")
 })
-public class ConsumerRegistryTestCase extends AbstractGateInTest
+public class ConsumerRegistryTestCase extends AbstractKernelTest
 {
    private JCRConsumerRegistry registry;
 

Modified: portal/trunk/component/xml-parser/pom.xml
===================================================================
--- portal/trunk/component/xml-parser/pom.xml	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/xml-parser/pom.xml	2010-02-28 22:04:29 UTC (rev 1903)
@@ -46,6 +46,13 @@
       <artifactId>commons-httpclient</artifactId>
       <scope>compile</scope>
     </dependency>
+
+    <dependency>
+      <groupId>org.exoplatform.portal</groupId>
+      <artifactId>exo.portal.component.test.core</artifactId>
+      <version>3.0.0-CR02-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
     <testResources>

Modified: portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestExceptionParser.java
===================================================================
--- portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestExceptionParser.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestExceptionParser.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,6 +19,7 @@
 
 package org.exoplatform.services.parser.html.test;
 
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.services.html.HTMLDocument;
 import org.exoplatform.services.html.HTMLNode;
 import org.exoplatform.services.html.Name;
@@ -27,7 +28,6 @@
 import org.exoplatform.services.html.path.NodePath;
 import org.exoplatform.services.html.path.NodePathParser;
 import org.exoplatform.services.html.path.NodePathUtil;
-import org.exoplatform.test.BasicTestCase;
 
 import java.io.File;
 import java.util.List;
@@ -38,7 +38,7 @@
  *          nhudinhthuan at exoplatform.com
  * Nov 30, 2006  
  */
-public class TestExceptionParser extends BasicTestCase
+public class TestExceptionParser extends AbstractGateInTest
 {
    private File file_;
 

Modified: portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestFileDetect.java
===================================================================
--- portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestFileDetect.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestFileDetect.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,6 +19,7 @@
 
 package org.exoplatform.services.parser.html.test;
 
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.services.html.HTMLDocument;
 import org.exoplatform.services.html.HTMLNode;
 import org.exoplatform.services.html.Name;
@@ -26,7 +27,6 @@
 import org.exoplatform.services.html.path.NodePath;
 import org.exoplatform.services.html.path.NodePathParser;
 import org.exoplatform.services.html.path.NodePathUtil;
-import org.exoplatform.test.BasicTestCase;
 
 import java.io.File;
 import java.net.URL;
@@ -35,7 +35,7 @@
  * Created by The eXo Platform SARL Author : Nhu Dinh Thuan
  * nhudinhthuan at exoplatform.com Nov 29, 2006
  */
-public class TestFileDetect extends BasicTestCase
+public class TestFileDetect extends AbstractGateInTest
 {
    private File file_;
 

Modified: portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestHTMLParser.java
===================================================================
--- portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestHTMLParser.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestHTMLParser.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -25,6 +25,7 @@
  *          laivankhoi46pm1 at yahoo.com
  * Nov 28, 2006  
  */
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.services.html.HTMLDocument;
 import org.exoplatform.services.html.HTMLNode;
 import org.exoplatform.services.html.Name;
@@ -35,13 +36,12 @@
 import org.exoplatform.services.token.attribute.Attribute;
 import org.exoplatform.services.token.attribute.AttributeParser;
 import org.exoplatform.services.token.attribute.Attributes;
-import org.exoplatform.test.BasicTestCase;
 
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 
-public class TestHTMLParser extends BasicTestCase
+public class TestHTMLParser extends AbstractGateInTest
 {
 
    private File file_;

Modified: portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestNodeParser.java
===================================================================
--- portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestNodeParser.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestNodeParser.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,6 +19,7 @@
 
 package org.exoplatform.services.parser.html.test;
 
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.services.html.HTMLDocument;
 import org.exoplatform.services.html.HTMLNode;
 import org.exoplatform.services.html.Name;
@@ -27,7 +28,6 @@
 import org.exoplatform.services.html.path.NodePath;
 import org.exoplatform.services.html.path.NodePathParser;
 import org.exoplatform.services.html.path.NodePathUtil;
-import org.exoplatform.test.BasicTestCase;
 
 import java.io.File;
 
@@ -37,7 +37,7 @@
  *          nhudinhthuan at exoplatform.com
  * Nov 29, 2006  
  */
-public class TestNodeParser extends BasicTestCase
+public class TestNodeParser extends AbstractGateInTest
 {
 
    private File file_;

Modified: portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestURL.java
===================================================================
--- portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestURL.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/html/test/TestURL.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,6 +19,7 @@
 
 package org.exoplatform.services.parser.html.test;
 
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.services.html.HTMLDocument;
 import org.exoplatform.services.html.HTMLNode;
 import org.exoplatform.services.html.Name;
@@ -27,7 +28,6 @@
 import org.exoplatform.services.html.path.NodePathUtil;
 import org.exoplatform.services.html.util.HyperLinkUtil;
 import org.exoplatform.services.html.util.URLCreator;
-import org.exoplatform.test.BasicTestCase;
 
 import java.net.URL;
 import java.util.ArrayList;
@@ -39,7 +39,7 @@
  *          nhudinhthuan at exoplatform.com
  * Nov 30, 2006  
  */
-public class TestURL extends BasicTestCase
+public class TestURL extends AbstractGateInTest
 {
    //test ContentBuilder.java
    private URL url_;

Modified: portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/rss/test/TestRSSParser.java
===================================================================
--- portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/rss/test/TestRSSParser.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/xml-parser/src/test/java/org/exoplatform/services/parser/rss/test/TestRSSParser.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,13 +19,13 @@
 
 package org.exoplatform.services.parser.rss.test;
 
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.container.PortalContainer;
 import org.exoplatform.services.rss.parser.DefaultRSSChannel;
 import org.exoplatform.services.rss.parser.DefaultRSSItem;
 import org.exoplatform.services.rss.parser.IRSSChannel;
 import org.exoplatform.services.rss.parser.RSSDocument;
 import org.exoplatform.services.rss.parser.RSSParser;
-import org.exoplatform.test.BasicTestCase;
 
 import java.net.URL;
 import java.util.List;
@@ -35,7 +35,7 @@
  * hoa.nguyen at exoplatform.com Jul 20, 2006
  */
 
-public class TestRSSParser extends BasicTestCase
+public class TestRSSParser extends AbstractGateInTest
 {
 
    private RSSParser parser_;

Modified: portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/HtmlCharsetDetector.java
===================================================================
--- portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/HtmlCharsetDetector.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/HtmlCharsetDetector.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -24,6 +24,7 @@
  */
 package org.exoplatform.test;
 
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.services.chars.chardet.Detector;
 import org.exoplatform.services.chars.chardet.ICharsetDetectionObserver;
 import org.exoplatform.services.chars.chardet.PSMDetector;
@@ -37,7 +38,7 @@
  *          laivankhoi46pm1 at yahoo.com
  * Nov 27, 2006  
  */
-public class HtmlCharsetDetector extends BasicTestCase
+public class HtmlCharsetDetector extends AbstractGateInTest
 {
 
    public static boolean found = false;

Modified: portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/TestAttributeParser.java
===================================================================
--- portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/TestAttributeParser.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/TestAttributeParser.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,6 +19,7 @@
 
 package org.exoplatform.test;
 
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.services.token.Node;
 import org.exoplatform.services.token.attribute.Attribute;
 import org.exoplatform.services.token.attribute.AttributeParser;
@@ -30,7 +31,7 @@
  *          laivankhoi46pm1 at yahoo.com
  * Nov 28, 2006  
  */
-public class TestAttributeParser extends BasicTestCase
+public class TestAttributeParser extends AbstractGateInTest
 {
    public void testAttributes()
    {

Modified: portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/TestFile.java
===================================================================
--- portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/TestFile.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/TestFile.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -25,8 +25,7 @@
  *          laivankhoi46pm1 at yahoo.com
  * Nov 27, 2006  
  */
-import junit.framework.TestCase;
-
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.services.chars.chardet.Detector;
 import org.exoplatform.services.chars.chardet.ICharsetDetectionObserver;
 import org.exoplatform.services.chars.chardet.PSMDetector;
@@ -35,7 +34,7 @@
 import java.io.File;
 import java.io.FileInputStream;
 
-public class TestFile extends TestCase
+public class TestFile extends AbstractGateInTest
 {
    public static boolean found = false;
 

Modified: portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/TestHTMLTidy.java
===================================================================
--- portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/TestHTMLTidy.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/TestHTMLTidy.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -25,13 +25,12 @@
  *          laivankhoi46pm1 at yahoo.com
  * Nov 27, 2006  
  */
-import junit.framework.TestCase;
-
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.services.html.tidy.HTMLTidy;
 
 import java.util.List;
 
-public class TestHTMLTidy extends TestCase
+public class TestHTMLTidy extends AbstractGateInTest
 {
 
    public void testText() throws Exception

Modified: portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/TestParser.java
===================================================================
--- portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/TestParser.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/component/xml-parser/src/test/java/org/exoplatform/test/TestParser.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -25,13 +25,14 @@
  *          laivankhoi46pm1 at yahoo.com
  * Nov 28, 2006  
  */
+import org.exoplatform.component.test.AbstractGateInTest;
 import org.exoplatform.services.html.HTMLNode;
 import org.exoplatform.services.html.parser.HTMLParser;
 
 import java.io.File;
 import java.util.List;
 
-public class TestParser extends BasicTestCase
+public class TestParser extends AbstractGateInTest
 {
 
    public static void print(String text, HTMLNode element)

Modified: portal/trunk/webui/core/pom.xml
===================================================================
--- portal/trunk/webui/core/pom.xml	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/webui/core/pom.xml	2010-02-28 22:04:29 UTC (rev 1903)
@@ -46,6 +46,12 @@
       <groupId>org.gatein.common</groupId>
       <artifactId>common-common</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.exoplatform.portal</groupId>
+      <artifactId>exo.portal.component.test.core</artifactId>
+      <version>3.0.0-CR02-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   
   <build>

Modified: portal/trunk/webui/core/src/test/java/org/exoplatform/webui/core/renderers/ValueRendererRegistryTestCase.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/core/renderers/ValueRendererRegistryTestCase.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/webui/core/src/test/java/org/exoplatform/webui/core/renderers/ValueRendererRegistryTestCase.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -23,7 +23,7 @@
 
 package org.exoplatform.webui.core.renderers;
 
-import junit.framework.TestCase;
+import org.exoplatform.component.test.AbstractGateInTest;
 
 import java.text.SimpleDateFormat;
 import java.util.Date;
@@ -32,7 +32,7 @@
  * @author <a href="mailto:chris.laprun at jboss.com">Chris Laprun</a>
  * @version $Revision$
  */
-public class ValueRendererRegistryTestCase extends TestCase
+public class ValueRendererRegistryTestCase extends AbstractGateInTest
 {
    private ValueRendererRegistry registry;
 

Modified: portal/trunk/webui/core/src/test/java/org/exoplatform/webui/test/TestApplication.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/test/TestApplication.java	2010-02-28 18:10:35 UTC (rev 1902)
+++ portal/trunk/webui/core/src/test/java/org/exoplatform/webui/test/TestApplication.java	2010-02-28 22:04:29 UTC (rev 1903)
@@ -19,7 +19,7 @@
 
 package org.exoplatform.webui.test;
 
-import org.exoplatform.test.BasicTestCase;
+import org.exoplatform.component.test.AbstractGateInTest;
 
 import java.io.File;
 import java.net.URL;
@@ -31,7 +31,7 @@
  *          nhudinhthuan at yahoo.com
  * May 5, 2006
  */
-public class TestApplication extends BasicTestCase
+public class TestApplication extends AbstractGateInTest
 {
 
    public void testApplication() throws Exception



More information about the gatein-commits mailing list