[portal-commits] JBoss Portal SVN: r11786 - in modules/cms/trunk: .settings and 7 other directories.

portal-commits at lists.jboss.org portal-commits at lists.jboss.org
Tue Sep 2 11:04:19 EDT 2008


Author: thomas.heute at jboss.com
Date: 2008-09-02 11:04:18 -0400 (Tue, 02 Sep 2008)
New Revision: 11786

Added:
   modules/cms/trunk/.settings/
   modules/cms/trunk/.settings/org.eclipse.jdt.ui.prefs
   modules/cms/trunk/.settings/org.maven.ide.eclipse.prefs
   modules/cms/trunk/cms-jackrabbit/build.xml
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/TestServiceLoader.java
   modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-unit.xml
Modified:
   modules/cms/trunk/.classpath
   modules/cms/trunk/.project
   modules/cms/trunk/build/pom.xml
   modules/cms/trunk/cms-jackrabbit/pom.xml
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/AbstractCMSTestCase.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/TestJackrabbit.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/TestRegEx.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/TestRepositoryUtil.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/AbstractCommandTestCase.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileArchiveUpload.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileCopy.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileCreate.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileCreateFailed.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileDelete.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileGet.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileGetList.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileGetVersion.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileSize.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileUpdate.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderCopy.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderCreate.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderDelete.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderGet.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderUpdate.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestRepositoryBootStrap.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestSearch.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/security/SecureCommandTestCase.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/security/TestManageAccess.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/security/TestReadAccess.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/security/TestWriteAccess.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/workflow/AbstractWorkflowTestCase.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/workflow/TestApprovedPublish.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/workflow/TestDeniedPublish.java
   modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/workflow/TestWorkflowEnvironment.java
   modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security.xml
   modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-workflow.xml
   modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans.xml
   modules/cms/trunk/cms-jackrabbit/src/test/resources/standardidentity-config.xml
Log:
Use JBoss Unit (removes some dependencies, more to do)

Modified: modules/cms/trunk/.classpath
===================================================================
--- modules/cms/trunk/.classpath	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/.classpath	2008-09-02 15:04:18 UTC (rev 11786)
@@ -1,67 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" path="cms-jackrabbit/src/main/java"/>
-	<classpathentry kind="src" path="cms-jackrabbit/src/test/java"/>
+	<classpathentry kind="src" output="cms-jackrabbit/target/classes" path="cms-jackrabbit/src/main/java"/>
+	<classpathentry kind="src" output="cms-jackrabbit/target/test-classes" path="cms-jackrabbit/src/test/java"/>
+	<classpathentry excluding="**" kind="src" output="cms-jackrabbit/target/classes" path="cms-jackrabbit/src/main/resources"/>
+	<classpathentry excluding="**" kind="src" output="cms-jackrabbit/target/test-classes" path="cms-jackrabbit/src/test/resources"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="output" path="bin"/>
-	
-	<classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/ant/ant/1.6.5/ant-1.6.5.jar"/>
-  <classpathentry kind="var" path="M2_REPO/ant/ant-junit/1.6.5/ant-junit-1.6.5.jar"/>
-  <classpathentry kind="var" path="M2_REPO/ant/ant-launcher/1.6.5/ant-launcher-1.6.5.jar"/>
-  <classpathentry kind="var" path="M2_REPO/ant/ant-nodeps/1.6.5/ant-nodeps-1.6.5.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/codehaus/cargo/cargo-core-uberjar/0.8/cargo-core-uberjar-0.8.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/portal/common/common-common/1.2.0-SNAPSHOT/common-common-1.2.0-SNAPSHOT.jar"/>
-  <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.2/commons-codec-1.2.jar"/>
-  <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/apache-httpclient/commons-httpclient/2.0.2/commons-httpclient-2.0.2.jar"/>
-  <classpathentry kind="var" path="M2_REPO/commons-httpclient/commons-httpclient/3.0.1/commons-httpclient-3.0.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/oswego-concurrent/concurrent/1.3.4/concurrent-1.3.4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/derby/derby/10.2.1.6/derby-10.2.1.6.jar"/>
-  <classpathentry kind="var" path="M2_REPO/hibernate/hibernate3/3.2.4.SP1/hibernate3-3.2.4.SP1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/portal/identity/identity-identity/1.0.2/identity-identity-1.0.2.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/jackrabbit/jackrabbit-api/1.4/jackrabbit-api-1.4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/jackrabbit/jackrabbit-core/1.4.5/jackrabbit-core-1.4.5.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/jackrabbit/jackrabbit-jcr-commons/1.4/jackrabbit-jcr-commons-1.4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/jackrabbit/jackrabbit-spi/1.4/jackrabbit-spi-1.4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/jackrabbit/jackrabbit-spi-commons/1.4/jackrabbit-spi-commons-1.4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/jackrabbit/jackrabbit-text-extractors/1.4/jackrabbit-text-extractors-1.4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/local/jboss/4.0.4.GA/jboss-4.0.4.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/jboss-common-core/2.0.2.GA/jboss-common-core-2.0.2.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/jboss-j2ee/4.2.0.GA/jboss-j2ee-4.2.0.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/jboss-jmx/4.2.0.GA/jboss-jmx-4.2.0.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/jboss-logging-jdk/2.0.2.GA/jboss-logging-jdk-2.0.2.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/jboss-logging-log4j/2.0.2.GA/jboss-logging-log4j-2.0.2.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jboss/jboss-logging-spi/2.0.2.GA/jboss-logging-spi-2.0.2.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/local/jboss-system/4.0.4.GA/jboss-system-4.0.4.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/cache/jbosscache-core/1.4.1.SP3/jbosscache-core-1.4.1.SP3.jar"/>
-  <classpathentry kind="var" path="M2_REPO/local/jbossha/4.0.4.GA/jbossha-4.0.4.GA.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jbpm/jbpm-jpdl/3.2.3/jbpm-jpdl-3.2.3.jar"/>
-  <classpathentry kind="var" path="M2_REPO/javax/jcr/jcr/1.0/jcr-1.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/jgroups/jgroups/2.4.1/jgroups-2.4.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.2/junit-3.8.2.jar"/>
-  <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-core/2.2.0/lucene-core-2.2.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/nekohtml/nekohtml/0.9.4/nekohtml-0.9.4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/pdfbox/pdfbox/0.6.4/pdfbox-0.6.4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/poi/poi/2.5.1-final-20040804/poi-2.5.1-final-20040804.jar"/>
-  <classpathentry kind="var" path="M2_REPO/local/portal-jems-lib/2.7/portal-jems-lib-2.7.jar"/>
-  <classpathentry kind="var" path="M2_REPO/local/portal-search-lib/2.7/portal-search-lib-2.7.jar"/>
-  <classpathentry kind="var" path="M2_REPO/local/portal-security-lib/2.7/portal-security-lib-2.7.jar"/>
-  <classpathentry kind="var" path="M2_REPO/local/portal-server-lib/2.7/portal-server-lib-2.7.jar"/>
-  <classpathentry kind="var" path="M2_REPO/local/portal-test-generic-lib/2.7/portal-test-generic-lib-2.7.jar"/>
-  <classpathentry kind="var" path="M2_REPO/local/portal-test-jboss-lib/2.7/portal-test-jboss-lib-2.7.jar"/>
-  <classpathentry kind="var" path="M2_REPO/local/portal-test-lib/2.7/portal-test-lib-2.7.jar"/>
-  <classpathentry kind="var" path="M2_REPO/local/portal-workflow-lib/2.7/portal-workflow-lib-2.7.jar"/>
-  <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.3.0/slf4j-api-1.3.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-simple/1.3.0/slf4j-simple-1.3.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/textmining/tm-extractors/0.4/tm-extractors-0.4.jar"/>
-  <classpathentry kind="var" path="M2_REPO/apache-slide/webdavlib/2.0/webdavlib-2.0.jar"/>
-  <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.8.1/xercesImpl-2.8.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/apache-xerces/xml-apis/2.7.1/xml-apis-2.7.1.jar"/>
-  <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.3.03/xml-apis-1.3.03.jar"/>	  
-  <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar"/>	  
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
 </classpath>

Modified: modules/cms/trunk/.project
===================================================================
--- modules/cms/trunk/.project	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/.project	2008-09-02 15:04:18 UTC (rev 11786)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>module-cms-trunk</name>
+	<name>module-cms</name>
 	<comment></comment>
 	<projects>
 	</projects>
@@ -10,8 +10,14 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
 	</natures>
 </projectDescription>

Added: modules/cms/trunk/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- modules/cms/trunk/.settings/org.eclipse.jdt.ui.prefs	                        (rev 0)
+++ modules/cms/trunk/.settings/org.eclipse.jdt.ui.prefs	2008-09-02 15:04:18 UTC (rev 11786)
@@ -0,0 +1,3 @@
+#Mon Sep 01 19:39:51 CEST 2008
+eclipse.preferences.version=1
+internal.default.compliance=user

Added: modules/cms/trunk/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- modules/cms/trunk/.settings/org.maven.ide.eclipse.prefs	                        (rev 0)
+++ modules/cms/trunk/.settings/org.maven.ide.eclipse.prefs	2008-09-02 15:04:18 UTC (rev 11786)
@@ -0,0 +1,8 @@
+#Mon Sep 01 19:37:03 CEST 2008
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=true
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+version=1

Modified: modules/cms/trunk/build/pom.xml
===================================================================
--- modules/cms/trunk/build/pom.xml	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/build/pom.xml	2008-09-02 15:04:18 UTC (rev 11786)
@@ -33,6 +33,7 @@
    	  <version.jgroups>2.4.1</version.jgroups>
    	  <version.jboss.hibernate>3.2.4.SP1</version.jboss.hibernate>   	  
    	  <version.jboss.logging>2.0.2.GA</version.jboss.logging> 
+      <version.jboss.jbossas.core-libs>4.0.4.GA</version.jboss.jbossas.core-libs>
    	  <version.dom4j>1.6.1</version.dom4j>	
    	  <version.cglib>2.1_3</version.cglib>
    	  <version.hsqldb>1.8.0.2</version.hsqldb>
@@ -46,6 +47,7 @@
    	  
    	  <version.jboss.portal.common>1.2.0</version.jboss.portal.common>
    	  <version.jboss.portal.identity>1.0.2</version.jboss.portal.identity>
+      <version.jboss.portal.test>1.2.0.Beta2</version.jboss.portal.test>
    </properties>
 
 
@@ -100,6 +102,37 @@
 
    <dependencyManagement>      
       <dependencies>
+         <dependency>
+            <groupId>org.jboss.unit</groupId>
+            <artifactId>jboss-unit</artifactId>
+            <version>${version.jboss.portal.test}</version>
+         </dependency>
+         <dependency>
+            <groupId>org.jboss.unit</groupId>
+            <artifactId>opends</artifactId>
+            <version>${version.jboss.portal.test}</version>
+            <type>sar</type>
+         </dependency>
+         <dependency>
+            <groupId>org.jboss.unit</groupId>
+            <artifactId>jboss-unit-mc</artifactId>
+            <version>${version.jboss.portal.test}</version>
+         </dependency>
+         <dependency>
+            <groupId>org.jboss.unit</groupId>
+            <artifactId>portal-test</artifactId>
+            <version>${version.jboss.portal.test}</version>
+         </dependency>
+         <dependency>
+            <groupId>org.jboss.unit</groupId>
+            <artifactId>jboss-unit-tooling-maven2</artifactId>
+            <version>${version.jboss.portal.test}</version>
+         </dependency>
+         <dependency>
+            <groupId>org.jboss.unit</groupId>
+            <artifactId>jboss-unit-tooling-ant</artifactId>
+            <version>${version.jboss.portal.test}</version>
+         </dependency>
       	 <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
@@ -205,6 +238,16 @@
             <artifactId>ehcache</artifactId>
             <version>${version.ehcache}</version>
          </dependency>
+         <dependency>
+            <groupId>jboss.jbossas.core-libs</groupId>
+            <artifactId>jboss-local-jdbc</artifactId>
+            <version>${version.jboss.jbossas.core-libs}</version>
+         </dependency>
+         <dependency>
+            <groupId>jboss.jbossas.core-libs</groupId>
+            <artifactId>jboss-common-jdbc-wrapper</artifactId>
+            <version>${version.jboss.jbossas.core-libs}</version>
+         </dependency>
     </dependencies>
   </dependencyManagement>
 

Added: modules/cms/trunk/cms-jackrabbit/build.xml
===================================================================
--- modules/cms/trunk/cms-jackrabbit/build.xml	                        (rev 0)
+++ modules/cms/trunk/cms-jackrabbit/build.xml	2008-09-02 15:04:18 UTC (rev 11786)
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<project name="cms-test" xmlns:artifact="urn:maven-artifact-ant">
+
+   <target name="test" unless="maven.test.skip">
+
+      <!--<echo message="compile classpath: ${compile_classpath}"/>-->
+      <!--<echo message="runtime classpath: ${runtime_classpath}"/>-->
+      <!--<echo message="test classpath:    ${test_classpath}"/>-->
+      <!--<echo message="plugin classpath:  ${plugin_classpath}"/>-->
+
+      <property name="target" value="${basedir}/target"/>
+
+      <property name="jboss-unit" value="${target}/jboss-unit"/>
+
+
+      <mkdir dir="${jboss-unit}"/>
+
+      <ant>
+         <target name="jboss-unit"/>
+      </ant>
+   </target>
+
+   <target name="jboss-unit">
+      <taskdef name="jboss-unit" classname="org.jboss.unit.tooling.ant.JBossUnitTask" classpath="${test_classpath}"/>
+      <jboss-unit>
+         <tests config="src/test/resources/jboss-unit.xml" suiteName="CMSTests">
+            <!--<include keywords="DB,generic"/>-->
+         </tests>
+
+         <reports>
+            <xml toDir="target/jboss-unit/reports/xml"/>
+            <html toDir="target/jboss-unit/reports/html"/>
+         </reports>
+
+         <classpath>
+            <pathelement path="${test_classpath}"/>
+         </classpath>
+
+      </jboss-unit>
+
+   </target>
+
+
+</project>
\ No newline at end of file

Modified: modules/cms/trunk/cms-jackrabbit/pom.xml
===================================================================
--- modules/cms/trunk/cms-jackrabbit/pom.xml	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/pom.xml	2008-09-02 15:04:18 UTC (rev 11786)
@@ -112,26 +112,6 @@
          <artifactId>portal-server-lib</artifactId>
          <version>${local.version.jboss.portal}</version>
       </dependency>
-      <dependency>
-         <groupId>local</groupId>
-         <artifactId>portal-test-lib</artifactId>
-         <version>${local.version.jboss.portal}</version>
-      </dependency>
-      <dependency>
-         <groupId>local</groupId>
-         <artifactId>portal-test-generic-lib</artifactId>
-         <version>${local.version.jboss.portal}</version>
-      </dependency>
-      <dependency>
-         <groupId>local</groupId>
-         <artifactId>portal-test-jboss-lib</artifactId>
-         <version>${local.version.jboss.portal}</version>
-      </dependency>
-      <dependency>
-         <groupId>local</groupId>
-         <artifactId>portal-core-lib</artifactId>
-         <version>${local.version.jboss.portal}</version>
-      </dependency>
       
       <dependency>
          <groupId>local</groupId>
@@ -159,113 +139,122 @@
          <artifactId>jbossha</artifactId>
          <version>${local.version.jboss.as}</version>
       </dependency>      
-      <!-- test dependencies -->      
+      
+            <!--TEST SCOPE-->
       <dependency>
-         <groupId>local</groupId>
-         <artifactId>jboss-microcontainer</artifactId>
-         <version>${local.version.jboss.as}</version>
+         <groupId>org.jboss.unit</groupId>
+         <artifactId>jboss-unit</artifactId>
          <scope>test</scope>
-      </dependency>   
-      <dependency>
-         <groupId>local</groupId>
-         <artifactId>jboss-container</artifactId>
-         <version>${local.version.jboss.as}</version>
-         <scope>test</scope>
-      </dependency>   
-      <dependency>
-         <groupId>local</groupId>
-         <artifactId>jboss-dependency</artifactId>
-         <version>${local.version.jboss.as}</version>
-         <scope>test</scope>
       </dependency>
       <dependency>
-         <groupId>local</groupId>
-         <artifactId>jboss-common</artifactId>
-         <version>${local.version.jboss.as}</version>
+         <groupId>org.jboss.unit</groupId>
+         <artifactId>opends</artifactId>
+         <type>sar</type>
          <scope>test</scope>
       </dependency>
       <dependency>
-         <groupId>local</groupId>
-         <artifactId>jboss-xml-binding</artifactId>
-         <version>${local.version.jboss.as}</version>
+         <groupId>org.jboss.unit</groupId>
+         <artifactId>jboss-unit-mc</artifactId>
          <scope>test</scope>
       </dependency>
       <dependency>
-         <groupId>local</groupId>
-         <artifactId>jnp-client</artifactId>
-         <version>${local.version.jboss.as}</version>
+         <groupId>org.jboss.unit</groupId>
+         <artifactId>jboss-unit-tooling-ant</artifactId>
          <scope>test</scope>
       </dependency>
       <dependency>
-         <groupId>local</groupId>
-         <artifactId>jnpserver</artifactId>
-         <version>${local.version.jboss.as}</version>
+         <groupId>org.jboss.unit</groupId>
+         <artifactId>portal-test</artifactId>
          <scope>test</scope>
       </dependency>
       <dependency>
-         <groupId>local</groupId>
-         <artifactId>jboss-transaction</artifactId>
-         <version>${local.version.jboss.as}</version>
-         <scope>test</scope>
-      </dependency>
-      <dependency>
-         <groupId>local</groupId>
-         <artifactId>jboss-jca</artifactId>
-         <version>${local.version.jboss.as}</version>
-         <scope>test</scope>
-      </dependency>
-      <dependency>
-         <groupId>local</groupId>
-         <artifactId>jboss-local-jdbc</artifactId>
-         <version>${local.version.jboss.as}</version>
-         <scope>test</scope>
-      </dependency>
-      <dependency>
-         <groupId>local</groupId>
-         <artifactId>jboss-common-jdbc-wrapper</artifactId>
-         <version>${local.version.jboss.as}</version>
-         <scope>test</scope>
-      </dependency>
-      
-      <dependency>
-        <groupId>junit</groupId>
-        <artifactId>junit</artifactId>
-        <scope>test</scope>        
-      </dependency>
-      <dependency>
-        <groupId>dom4j</groupId>
-        <artifactId>dom4j</artifactId>            
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-        <groupId>cglib</groupId>
-        <artifactId>cglib</artifactId>            
-        <scope>test</scope>
-      </dependency>
-      <dependency>
         <groupId>hsqldb</groupId>
         <artifactId>hsqldb</artifactId>           
         <scope>test</scope>
       </dependency>
-      <dependency>
-        <groupId>antlr</groupId>
-        <artifactId>antlr</artifactId>            
+           <dependency>
+            <groupId>jboss.jbossas.core-libs</groupId>
+            <artifactId>jboss-local-jdbc</artifactId>
         <scope>test</scope>
-      </dependency>   
+         </dependency>
+         <dependency>
+            <groupId>jboss.jbossas.core-libs</groupId>
+            <artifactId>jboss-common-jdbc-wrapper</artifactId>
+        <scope>test</scope>
+         </dependency>
+         <dependency>
+            <groupId>cglib</groupId>
+            <artifactId>cglib</artifactId>
+        <scope>test</scope>
+         </dependency> 
       <dependency>
       	<groupId>bsh</groupId>
         <artifactId>bsh</artifactId>        
         <scope>test</scope>
       </dependency> 
+               <dependency>
+            <groupId>antlr</groupId>
+            <artifactId>antlr</artifactId>
+        <scope>test</scope>
+         </dependency>
       <dependency>
         <groupId>net.sf.ehcache</groupId>
         <artifactId>ehcache</artifactId> 
         <scope>test</scope>       
       </dependency>  
+               <dependency>
+         <groupId>local</groupId>
+         <artifactId>portal-core-lib</artifactId>
+         <version>${local.version.jboss.portal}</version>
+        <scope>test</scope>
+      </dependency>
+         
+      
    </dependencies>
 
    <build>
       <plugins>
+         <plugin>
+            <groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
+            <artifactId>maven-antrun-extended-plugin</artifactId>
+            <version>1.13</version>
+            <dependencies>
+               <dependency>
+                  <groupId>cargo</groupId>
+                  <artifactId>cargo-ant</artifactId>
+                  <version>0.9-portal</version>
+               </dependency>
+               <dependency>
+                  <groupId>cargo</groupId>
+                  <artifactId>cargo-core-uberjar</artifactId>
+                  <version>0.9-portal</version>
+                  <scope>test</scope>
+               </dependency>
+            </dependencies>
+            <executions>
+               <execution>
+                  <id>test</id>
+                  <phase>test</phase>
+                  <configuration>
+                     <tasks>
+
+                        <property name="compile_classpath" refid="maven.compile.classpath"/>
+                        <property name="runtime_classpath" refid="maven.runtime.classpath"/>
+                        <property name="test_classpath" refid="maven.test.classpath"/>
+                        <property name="plugin_classpath" refid="maven.plugin.classpath"/>
+
+                        <ant antfile="${basedir}/build.xml">
+                           <target name="test"/>
+                        </ant>
+
+                     </tasks>
+                  </configuration>
+                  <goals>
+                     <goal>run</goal>
+                  </goals>
+               </execution>
+            </executions>
+         </plugin>
         <plugin>
         	<groupId>org.apache.maven.plugins</groupId>
         	<artifactId>maven-antrun-plugin</artifactId>
@@ -302,21 +291,6 @@
         		</execution>
         	</executions>        	
         </plugin>
-      	<plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-surefire-plugin</artifactId>            
-            <configuration>
-               <skip>false</skip>                              	           
-               <excludes>               		
-               		<exclude>**/TestFileCreateFailed$1TestCommand.java</exclude>               	
-               </excludes> 
-               <!--                             
-               <includes>                    	          		
-	          		<include>**/TestSearch.java</include>
-	           </includes>
-	           -->	     	           	           	           	           	           
-            </configuration>
-         </plugin>          
          <plugin>
 	        <groupId>org.apache.maven.plugins</groupId>
 	        <artifactId>maven-compiler-plugin</artifactId>
@@ -326,5 +300,5 @@
           </plugin>        
       </plugins>
    </build>   
-</project>
+ </project>
 

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/AbstractCMSTestCase.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/AbstractCMSTestCase.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/AbstractCMSTestCase.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -22,83 +22,72 @@
  ******************************************************************************/
 package org.jboss.portal.cms.test;
 
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.jboss.portal.test.framework.embedded.DataSourceSupport;
+import org.jboss.beans.metadata.api.annotations.Inject;
 import org.jboss.portal.test.framework.embedded.HibernateSupport;
-import org.jboss.portal.test.framework.junit.JUnitAdapter;
-import org.jboss.portal.test.framework.junit.POJOJUnitTest;
-import org.jboss.portal.test.framework.mc.TestRuntimeContext;
+import org.jboss.unit.api.pojo.annotations.Parameter;
 
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Collection;
-
 /**
  * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
  * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  * @version $Revision: 7954 $
  */
-public abstract class AbstractCMSTestCase extends TestCase
+public abstract class AbstractCMSTestCase
 {
 
-   /** . */
-   protected DataSourceSupport.Config dataSourceConfigParameter;
+   private String dataSourceName;
 
-   /** . */
-   protected TestRuntimeContext runtimeContext;
+   private String hibernateConfig;
 
-   /**
-    *
-    *
-    */
-   protected String configuration = "jboss-beans.xml";
+   private HibernateSupport hibernateSupport;
 
+   private String datasources;
+   
    public AbstractCMSTestCase()
    {
    }
 
-   public DataSourceSupport.Config getDataSourceConfigParameter()
+   public String getDataSourceName()
    {
-      return dataSourceConfigParameter;
+      return dataSourceName;
    }
 
-   public void setDataSourceConfigParameter(DataSourceSupport.Config dataSourceConfigParameter)
+   @Parameter(name="dataSourceName")
+   public void setDataSourceName(String dataSourceName)
    {
-      this.dataSourceConfigParameter = dataSourceConfigParameter;
+      this.dataSourceName = dataSourceName;
    }
 
-   public void setUp() throws Exception
+   public String getHibernateConfig()
    {
-      URL configsURL = Thread.currentThread().getContextClassLoader().getResource("datasources.xml");
-      Collection dataSourceConfigs = (Collection)DataSourceSupport.Config.fromXML2(configsURL).get();
-      this.dataSourceConfigParameter = (DataSourceSupport.Config)dataSourceConfigs.iterator().next();
-      
-      //Bootstrapping low-level services needed by PortalCMS
-      runtimeContext = new TestRuntimeContext(this.configuration);
-      runtimeContext.addBean("DataSourceConfig", dataSourceConfigParameter);
-      runtimeContext.addBean("HibernateConfig", HibernateSupport.getConfig(dataSourceConfigParameter.getName()));
-
-      //Start the context
-      runtimeContext.start();
+      return hibernateConfig;
    }
 
-   public void tearDown() throws Exception
+   @Parameter(name="hibernateConfig")
+   public void setHibernateConfig(String hibernateConfig)
    {
-      runtimeContext.stop();
+      this.hibernateConfig = hibernateConfig;
    }
+   
+   @Parameter(name="datasources")
+   public void setDatasources(String datasources)
+   {
+      this.datasources = datasources;
+   }
+   
+   public String getDatasources()
+   {
+      return datasources;
+   }
+   
+   @Inject(bean="HibernateSupport")
+   public void setHibernateSupport(HibernateSupport support)
+   {
+      hibernateSupport = support;
+   }
 
-   public static TestSuite createTestSuite(Class clazz) throws Exception
+   public HibernateSupport getHibernateSupport()
    {
-      URL configsURL = Thread.currentThread().getContextClassLoader().getResource("datasources.xml");
-      Map parameterMap = new HashMap();
-      parameterMap.put("DataSourceConfig", DataSourceSupport.Config.fromXML2(configsURL));
-      POJOJUnitTest abc = new POJOJUnitTest(clazz);
-      JUnitAdapter adapter = new JUnitAdapter(abc, parameterMap);
-      TestSuite suite = new TestSuite();
-      suite.addTest(adapter);
-      return suite;
+      return hibernateSupport;
    }
+
 }

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/TestJackrabbit.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/TestJackrabbit.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/TestJackrabbit.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -32,6 +32,11 @@
 
 import org.jboss.portal.cms.impl.jcr.jackrabbit.JackrabbitJCRService;
 import org.jboss.portal.cms.util.RepositoryUtil;
+import org.jboss.unit.api.pojo.annotations.Create;
+import org.jboss.unit.api.pojo.annotations.Destroy;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
+import static org.jboss.unit.api.Assert.*;
 
 import javax.jcr.Node;
 import javax.jcr.Repository;
@@ -39,10 +44,13 @@
 import javax.jcr.Workspace;
 import javax.jcr.nodetype.NodeTypeManager;
 
+
+
 /**
  * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
  * @version $Revision: 6653 $
  */
+ at Bootstrap(beanName = "TestCase", resourceName = "/jboss-beans.xml")
 public class TestJackrabbit extends AbstractCMSTestCase
 {
 
@@ -52,10 +60,9 @@
 
    private JackrabbitJCRService jcr;
 
+   @Create
    public void setUp() throws Exception
    {
-      super.setUp();
-
       // Load config
       LoaderResource res = new CLResourceLoader().getResource("jcr/repository.xml");
       String config = res.asString();
@@ -67,13 +74,14 @@
       jcr.start();
    }
 
+   @Destroy
    public void tearDown() throws Exception
    {
       jcr.stop();
       jcr = null;
-      super.tearDown();
    }
 
+   @Test
    public void testRepository() throws Exception
    {
       Repository repo = jcr.getRepository();

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/TestRegEx.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/TestRegEx.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/TestRegEx.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -22,8 +22,9 @@
  ******************************************************************************/
 package org.jboss.portal.cms.test;
 
-import junit.framework.TestCase;
 import org.jboss.portal.cms.util.FileUtil;
+import org.jboss.unit.api.pojo.annotations.Test;
+import static org.jboss.unit.api.Assert.*;
 
 import java.io.BufferedReader;
 import java.io.InputStreamReader;
@@ -35,7 +36,7 @@
  *
  * @author <a href="mailto:roy at jboss.org">Roy Russo</a>
  */
-public class TestRegEx extends TestCase
+public class TestRegEx
 {
 
    String HTMLHeaderFile = "jcr/headerpage.html";
@@ -69,16 +70,12 @@
 
    private static final Pattern STRIP_TAGS_PATTERN = Pattern.compile(HTMLStripperRegex, Pattern.DOTALL | Pattern.CASE_INSENSITIVE);
 
-   public void setUp() throws Exception
-   {
-      super.setUp();
-   }
-
    /**
     * Tests HTML rewriting of header content and links in CMSPortlet.
     *
     * @throws Exception
     */
+   @Test
    public void testHTMLPageHeaderRewrite() throws Exception
    {
       String fileHTML = "";
@@ -134,11 +131,6 @@
       assertEquals("RegEx failed to match!", CleanHTML, goodHTML);
    }
 
-   protected void tearDown() throws Exception
-   {
-      super.tearDown();
-   }
-
    /** Faking it. */
    private String buildURL(String path)
    {

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/TestRepositoryUtil.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/TestRepositoryUtil.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/TestRepositoryUtil.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -23,7 +23,11 @@
 package org.jboss.portal.cms.test;
 
 import org.jboss.portal.cms.util.NodeUtil;
+import org.jboss.unit.api.pojo.annotations.Test;
 
+import static org.jboss.unit.api.Assert.*;
+
+
 /**
  * Tests RepositoryUtil
  *
@@ -31,6 +35,7 @@
  */
 public class TestRepositoryUtil extends AbstractCMSTestCase
 {   
+   @Test
    public void testGetParentPath()
    {
       try
@@ -52,6 +57,7 @@
       }
    }
 
+   @Test
    public void testGetNodeName()
    {
       try
@@ -76,14 +82,4 @@
    {
    }
 
-   public void setUp() throws Exception
-   {
-      super.setUp();
-   }
-
-   public void tearDown() throws Exception
-   {
-      super.tearDown();
-
-   }   
 }
\ No newline at end of file

Added: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/TestServiceLoader.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/TestServiceLoader.java	                        (rev 0)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/TestServiceLoader.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -0,0 +1,214 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.jboss.portal.cms.test;
+
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.portal.identity.DelegatingUserProfileModuleImpl;
+import org.jboss.portal.identity.IdentityContext;
+import org.jboss.portal.identity.IdentityContextImpl;
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.MembershipModule;
+import org.jboss.portal.identity.RoleModule;
+import org.jboss.portal.identity.UserModule;
+import org.jboss.portal.identity.UserProfileModule;
+import org.jboss.portal.identity.boot.IdentityServiceLoader;
+import org.jboss.portal.identity.event.IdentityEvent;
+import org.jboss.portal.identity.event.IdentityEventBroadcaster;
+import org.jboss.portal.identity.ldap.LDAPConnectionContext;
+import org.jboss.portal.identity.ldap.LDAPMembershipModule;
+import org.jboss.portal.identity.ldap.LDAPRoleModule;
+import org.jboss.portal.identity.ldap.LDAPUserModule;
+import org.jboss.portal.identity.ldap.LDAPUserProfileModuleImpl;
+import org.jboss.portal.identity.metadata.service.IdentityServicesMetaData;
+import org.jboss.portal.identity.service.IdentityConfigurationService;
+import org.jboss.portal.identity.service.MembershipModuleService;
+import org.jboss.portal.identity.service.RoleModuleService;
+import org.jboss.portal.identity.service.UserModuleService;
+import org.jboss.portal.test.framework.embedded.DSConfig;
+
+/**
+ * @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
+ * @version $Revision: 0.1 $
+ */
+public class TestServiceLoader
+{
+
+   public IdentityContext loadServices(String defaultConfigFile, DSConfig directoryConfig) throws Exception
+   {
+      return loadServices(defaultConfigFile, directoryConfig.getConfigFile());
+   }
+   
+
+   public IdentityContext loadServices(String defaultConfigFile, String identityConfig) throws Exception
+   {
+      //initialize microcontainer stuff
+      try
+      {
+
+
+         BasicBootstrap bootstrap = new BasicBootstrap();
+         bootstrap.run();
+         Kernel kernel = bootstrap.getKernel();
+
+
+         IdentityServicesMetaData servicesMetaData = new IdentityServicesMetaData(defaultConfigFile, identityConfig);
+
+         IdentityContext identityContext = bootstrapIdentityContext(kernel);
+
+         // IdentityEventBroadcaster
+         IdentityEventBroadcaster broadcaster =  new IdentityEventBroadcaster()
+         {
+            public void fireEvent(IdentityEvent event)
+            {
+               // Noop
+            }
+         };
+      
+         //
+         try
+         {
+            identityContext.register(broadcaster, IdentityContext.TYPE_IDENTITY_EVENT_BROADCASTER);
+         }
+         catch (Throwable throwable)
+         {
+            throw new IdentityException("Unable to install IdentityEventBroadcaster", throwable);
+         }
+
+         //inject configuration service
+         IdentityConfigurationService configuration = servicesMetaData.getConfigurationService();
+         configuration.setIdentityContext(identityContext);
+         //TODO:set proper jndiName and serviceName and JNDI binder
+         configuration.start();
+
+         IdentityServiceLoader serviceLoader = new IdentityServiceLoader(identityContext, kernel, false);
+
+         // process datasources and modules
+         serviceLoader.bootstrapDatasource(servicesMetaData.getDatasourceServices().getDatasourcesList());
+
+         LDAPConnectionContext connectionContext = null;
+
+
+         try
+         {
+            connectionContext = (LDAPConnectionContext)identityContext.getObject(IdentityContext.TYPE_CONNECTION_CONTEXT);
+         }
+         catch (IdentityException e)
+         {
+            // 
+         }
+
+         serviceLoader.bootstrapModules(servicesMetaData.getModuleServices().getModulesList());
+
+         UserModule userModule = (UserModuleService)identityContext.getObject(IdentityContext.TYPE_USER_MODULE);
+         RoleModule roleModule = (RoleModuleService)identityContext.getObject(IdentityContext.TYPE_ROLE_MODULE);
+         MembershipModule membershipModule = (MembershipModuleService)identityContext.getObject(IdentityContext.TYPE_MEMBERSHIP_MODULE);
+
+
+         if (userModule instanceof LDAPUserModule)
+         {
+            ((LDAPUserModule)userModule).setConnectionContext(connectionContext);
+         }
+         if (roleModule instanceof LDAPRoleModule)
+         {
+            ((LDAPRoleModule)roleModule).setConnectionContext(connectionContext);
+         }
+         if (membershipModule instanceof LDAPMembershipModule)
+         {
+            ((LDAPMembershipModule)membershipModule).setConnectionContext(connectionContext);
+         }
+
+         //inject delegating profile modules if present
+         UserProfileModule userProfileModule = (UserProfileModule)identityContext.getObject(IdentityContext.TYPE_USER_PROFILE_MODULE);
+
+         if (userProfileModule != null && userProfileModule instanceof DelegatingUserProfileModuleImpl)
+         {
+            DelegatingUserProfileModuleImpl delegatingModule = (DelegatingUserProfileModuleImpl)userProfileModule;
+
+
+            try {
+
+
+               UserProfileModule dbModule = (UserProfileModule)identityContext.getObject("DBDelegateUserProfile");
+               if (dbModule != null)
+               {
+                  delegatingModule.setDbModule(dbModule);
+               }
+
+            }
+            catch(IdentityException e)
+            {
+               //nothirng
+            }
+
+            try
+            {
+               UserProfileModule ldapModule = (UserProfileModule)identityContext.getObject("LDAPDelegateUserProfile");
+               if (ldapModule != null)
+               {
+                  delegatingModule.setLDAPModule(ldapModule);
+                  ((LDAPUserProfileModuleImpl)ldapModule).setConnectionContext(connectionContext);
+               }
+            }
+            catch (IdentityException e)
+            {
+               //nothing
+            }
+         }
+         else if (userProfileModule != null && userProfileModule instanceof LDAPUserProfileModuleImpl)
+         {
+            ((LDAPUserProfileModuleImpl)userProfileModule).setConnectionContext(connectionContext);
+         }
+
+
+         return identityContext;
+      }
+      catch (Throwable e)
+      {
+         throw new IdentityException(e);
+      }
+   }
+
+   private IdentityContext bootstrapIdentityContext(Kernel kernel) throws Exception
+   {
+      KernelControllerContext identityKernelContext;
+      try
+      {
+         AbstractBeanMetaData contextBMD = new AbstractBeanMetaData(
+            "portal:identity=IdentityContext",
+            IdentityContextImpl.class.getName());
+         //beans.add(contextBMD);
+         identityKernelContext = kernel.getController().install(contextBMD);
+         return (IdentityContext)identityKernelContext.getTarget();
+
+      }
+      catch (Throwable throwable)
+      {
+         throw new IdentityException("Unable to install IdentityContext",throwable);
+      }
+
+   }
+
+}

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/AbstractCommandTestCase.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/AbstractCommandTestCase.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/AbstractCommandTestCase.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -28,6 +28,8 @@
 import org.jboss.portal.common.xml.XMLTools;
 
 import org.jboss.portal.cms.test.AbstractCMSTestCase;
+import org.jboss.unit.api.pojo.annotations.Create;
+import org.jboss.unit.api.pojo.annotations.Destroy;
 
 import org.w3c.dom.Document;
 
@@ -52,9 +54,10 @@
    /**
     *
     */
+   @Create
    public void setUp() throws Exception
    {
-      super.setUp();
+      // super.setUp();
 
       LoaderResource res = new CLResourceLoader().getResource("jcr/repository.xml");
       Document config = res.asDocument(XMLTools.getDocumentBuilderFactory().newDocumentBuilder());
@@ -66,7 +69,7 @@
 
       service.setConfig(config.getDocumentElement());
       service.setRepositoryName("repo");
-      service.setHomeDir("repotest-" + dataSourceConfigParameter.getName());
+      service.setHomeDir("repotest-" + getDataSourceName());
       service.setJNDIName("java:portal/CMS");
       service.startService();
    }
@@ -74,9 +77,10 @@
    /**
     *
     */
+   @Destroy
    public void tearDown() throws Exception
    {
       service.stopService();
-      super.tearDown();
+      // super.tearDown();
    }
 }

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileArchiveUpload.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileArchiveUpload.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileArchiveUpload.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -27,7 +27,11 @@
 import org.jboss.portal.cms.model.Folder;
 import org.jboss.portal.cms.model.File;
 import org.jboss.portal.common.io.IOTools;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.List;
@@ -39,6 +43,7 @@
  * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
  */
+ at Bootstrap(beanName = "TestCase", resourceName = "/jboss-beans.xml")
 public class TestFileArchiveUpload extends AbstractCommandTestCase
 {
    /**
@@ -54,7 +59,7 @@
    {
    }
 
-   
+   @Test
    public void testArchiveUpload() throws CMSException, IOException
    {
       //create archive

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileCopy.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileCopy.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileCopy.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -28,7 +28,11 @@
 import org.jboss.portal.cms.impl.FileImpl;
 import org.jboss.portal.cms.model.Content;
 import org.jboss.portal.cms.model.File;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
 import java.util.Locale;
 
 
@@ -37,6 +41,7 @@
  * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
  */
+ at Bootstrap(beanName = "TestCase", resourceName = "/jboss-beans.xml")
 public class TestFileCopy extends AbstractCommandTestCase
 {
    private String sFilePath = "/testdoc.gif";
@@ -55,6 +60,7 @@
     *
     *
     */
+   @Test
    public void testFileCopy() throws CMSException
    {
       createFile();

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileCreate.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileCreate.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileCreate.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -30,7 +30,11 @@
 import org.jboss.portal.cms.model.File;
 import org.jboss.portal.cms.util.NodeUtil;
 import org.jboss.portal.cms.util.RepositoryUtil;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
 import javax.jcr.Node;
 import javax.jcr.Session;
 import java.util.Locale;
@@ -41,6 +45,7 @@
  * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
  */
+ at Bootstrap(beanName = "TestCase", resourceName = "/jboss-beans.xml")
 public class TestFileCreate extends AbstractCommandTestCase
 {
    /**
@@ -62,6 +67,7 @@
     *
     *
     */
+   @Test
    public void testFileCreate() throws Exception
    {
       // create file english
@@ -134,7 +140,7 @@
       session.logout();
    }
    
-   
+   @Test
    public void testRootFileCreate() throws Exception
    {            
       try
@@ -148,6 +154,7 @@
       }
    }
    
+   @Test
    public void testRecursiveFileCreate() throws Exception
    {  
       //Create a legal file

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileCreateFailed.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileCreateFailed.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileCreateFailed.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -31,7 +31,11 @@
 import org.jboss.portal.cms.model.File;
 import org.jboss.portal.cms.util.RepositoryUtil;
 import org.jboss.portal.cms.test.mock.RuntimeExceptionCommand;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
 import javax.jcr.Item;
 import javax.jcr.Node;
 import javax.jcr.Session;
@@ -43,6 +47,7 @@
  * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
  */
+ at Bootstrap(beanName = "TestCase", resourceName = "/jboss-beans.xml")
 public class TestFileCreateFailed extends AbstractCommandTestCase
 {
    /**
@@ -64,6 +69,7 @@
     *
     *
     */
+   @Test
    public void testFileCreateFailed() throws Exception
    {
       Session session = null;

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileDelete.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileDelete.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileDelete.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -29,7 +29,12 @@
 import org.jboss.portal.cms.model.Content;
 import org.jboss.portal.cms.model.File;
 import org.jboss.portal.cms.util.RepositoryUtil;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
+
 import javax.jcr.Session;
 import java.util.Locale;
 
@@ -39,6 +44,7 @@
  * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
  */
+ at Bootstrap(beanName = "TestCase", resourceName = "/jboss-beans.xml")
 public class TestFileDelete extends AbstractCommandTestCase
 {
    
@@ -68,6 +74,7 @@
     *
     *
     */
+   @Test
    public void testFileDelete() throws Exception
    {
       createFile();

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileGet.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileGet.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileGet.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -28,7 +28,12 @@
 import org.jboss.portal.cms.impl.FileImpl;
 import org.jboss.portal.cms.model.Content;
 import org.jboss.portal.cms.model.File;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
+
 import java.util.Locale;
 
 
@@ -37,6 +42,7 @@
  * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
  */
+ at Bootstrap(beanName = "TestCase", resourceName = "/jboss-beans.xml")
 public class TestFileGet extends AbstractCommandTestCase
 {
    /**
@@ -55,6 +61,7 @@
    
 
    /** Tests retrieval of the version labeled LIVE. */
+   @Test
    public void testFileGet() throws CMSException
    {
       createFile();

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileGetList.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileGetList.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileGetList.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -28,7 +28,12 @@
 import org.jboss.portal.cms.impl.FileImpl;
 import org.jboss.portal.cms.model.Content;
 import org.jboss.portal.cms.model.File;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
+
 import java.util.List;
 import java.util.Locale;
 
@@ -38,6 +43,7 @@
  * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
  */
+ at Bootstrap(beanName = "TestCase", resourceName = "/jboss-beans.xml")
 public class TestFileGetList extends AbstractCommandTestCase
 {
    /**
@@ -56,6 +62,7 @@
 
    
    /** Tests retrieving a list of contents under a file and the versions for contents. */
+   @Test
    public void testFileList() throws CMSException
    {
       createFile();

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileGetVersion.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileGetVersion.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileGetVersion.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -28,7 +28,12 @@
 import org.jboss.portal.cms.impl.FileImpl;
 import org.jboss.portal.cms.model.Content;
 import org.jboss.portal.cms.model.File;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
+
 import java.util.Locale;
 
 
@@ -37,6 +42,7 @@
  * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
  */
+ at Bootstrap(beanName = "TestCase", resourceName = "/jboss-beans.xml")
 public class TestFileGetVersion extends AbstractCommandTestCase
 {
    /**
@@ -54,6 +60,7 @@
 
    
    /** Tests retrieval of a specific version by version number. */
+   @Test
    public void testFileGetVersion() throws CMSException
    {
       createFile();

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileSize.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileSize.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileSize.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -27,7 +27,12 @@
 import org.jboss.portal.cms.impl.FileImpl;
 import org.jboss.portal.cms.model.Content;
 import org.jboss.portal.cms.model.File;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
+
 import java.util.Locale;
 
 
@@ -36,6 +41,7 @@
  * @author <a href="mailto:sshah at redhat.com">Sohil Shah</a>
  *
  */
+ at Bootstrap(beanName = "TestCase", resourceName = "/jboss-beans.xml")
 public class TestFileSize extends AbstractCommandTestCase
 {
    /**
@@ -57,6 +63,7 @@
    *
    *
    */
+   @Test
   public void testFileCreate() throws Exception
   {
      // create file english
@@ -86,7 +93,7 @@
      
      Command fileGet = service.getCommandFactory().createFileGetCommand(sFilePath, Locale.ENGLISH);
      File cour = (File)service.execute(fileGet);
-     assertEquals("File Size Incorrect", cour.getSize(), "1234567890".length());
+     assertEquals("File Size Incorrect got '" + cour.getSize() + "' instead of '" + "1234567890".length() + "'", cour.getSize(), (long)"1234567890".length());
      
      
      //create content spanish
@@ -109,13 +116,14 @@
      
      fileGet = service.getCommandFactory().createFileGetCommand(sFilePath, new Locale("es"));
      cour = (File)service.execute(fileGet);     
-     assertEquals("File Size Incorrect", cour.getSize(), "0987654321/es".length());
+     assertEquals("File Size Incorrect", cour.getSize(), (long)"0987654321/es".length());
   }
   
   /**
   *
   *
   */
+   @Test
  public void testFileUpdate() throws Exception
  {
     // create file english
@@ -145,7 +153,7 @@
     
     Command fileGet = service.getCommandFactory().createFileGetCommand(sFilePath, Locale.ENGLISH);
     File cour = (File)service.execute(fileGet);
-    assertEquals("File Size Incorrect", cour.getSize(), "1234567890".length());
+    assertEquals("File Size Incorrect", cour.getSize(), (long)"1234567890".length());
     assertEquals("File Content Incorrect", new String(cour.getContent().getBytes()), "1234567890");
     
     //Now Update this content and create a new version
@@ -155,7 +163,7 @@
     
     fileGet = service.getCommandFactory().createFileGetCommand(sFilePath, Locale.ENGLISH);
     cour = (File)service.execute(fileGet);
-    assertEquals("File Size Incorrect", cour.getSize(), "1234567890/updated".length());
+    assertEquals("File Size Incorrect", cour.getSize(), (long)"1234567890/updated".length());
     assertEquals("File Content Incorrect", new String(cour.getContent().getBytes()), "1234567890/updated");
  }
 }

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileUpdate.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileUpdate.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileUpdate.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -30,7 +30,12 @@
 import org.jboss.portal.cms.model.Content;
 import org.jboss.portal.cms.model.File;
 import org.jboss.portal.cms.util.RepositoryUtil;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
+
 import javax.jcr.Node;
 import javax.jcr.Property;
 import javax.jcr.Session;
@@ -42,6 +47,7 @@
  * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
  */
+ at Bootstrap(beanName = "TestCase", resourceName = "/jboss-beans.xml")
 public class TestFileUpdate extends AbstractCommandTestCase
 {
    /**
@@ -63,6 +69,7 @@
     *
     * @throws Exception
     */
+   @Test
    public void testFileUpdate() throws Exception
    {
       createFile();

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderCopy.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderCopy.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderCopy.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -29,7 +29,12 @@
 import org.jboss.portal.cms.model.Content;
 import org.jboss.portal.cms.model.File;
 import org.jboss.portal.cms.model.Folder;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
+
 import java.util.Date;
 import java.util.Locale;
 
@@ -39,6 +44,7 @@
  * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
  */
+ at Bootstrap(beanName = "TestCase", resourceName = "/jboss-beans.xml")
 public class TestFolderCopy extends AbstractCommandTestCase
 {
    /**
@@ -50,6 +56,7 @@
    }
 
    /** Copy test data from repo */
+   @Test
    public void testFolderCopy() throws Exception
    {
       // create folder object

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderCreate.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderCreate.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderCreate.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -26,7 +26,12 @@
 import org.jboss.portal.cms.impl.FolderImpl;
 import org.jboss.portal.cms.model.Folder;
 import org.jboss.portal.cms.util.RepositoryUtil;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
+
 import javax.jcr.Node;
 import javax.jcr.Property;
 import javax.jcr.Session;
@@ -38,6 +43,7 @@
  * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
  */
+ at Bootstrap(beanName = "TestCase", resourceName = "/jboss-beans.xml")
 public class TestFolderCreate extends AbstractCommandTestCase
 {
    /** A test folder path * */
@@ -57,6 +63,7 @@
     *
     *
     */
+   @Test
    public void testFolderCreate() throws Exception
    {
       // create folder object

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderDelete.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderDelete.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderDelete.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -24,7 +24,12 @@
 
 import org.jboss.portal.cms.Command;
 import org.jboss.portal.cms.util.RepositoryUtil;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
+
 import javax.jcr.Session;
 
 
@@ -33,6 +38,7 @@
  * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
  */
+ at Bootstrap(beanName = "TestCase", resourceName = "/jboss-beans.xml")
 public class TestFolderDelete extends AbstractCommandTestCase
 {
    /** A test folder path * */
@@ -55,6 +61,7 @@
     *
     * @throws Exception
     */
+   @Test
    public void testFolderDelete() throws Exception
    {
       Session session = RepositoryUtil.login(service.getRepository(), "anonid", "");

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderGet.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderGet.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderGet.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -26,7 +26,12 @@
 import org.jboss.portal.cms.Command;
 import org.jboss.portal.cms.impl.FolderImpl;
 import org.jboss.portal.cms.model.Folder;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
+
 import java.util.Date;
 
 /**
@@ -34,6 +39,7 @@
  * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
  */
+ at Bootstrap(beanName = "TestCase", resourceName = "/jboss-beans.xml")
 public class TestFolderGet extends AbstractCommandTestCase
 {
    /** A test folder path * */
@@ -52,6 +58,7 @@
     *
     *
     */
+   @Test
    public void testFolderGet() throws CMSException
    {
       createFolder();

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderUpdate.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderUpdate.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFolderUpdate.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -27,7 +27,12 @@
 import org.jboss.portal.cms.impl.FolderImpl;
 import org.jboss.portal.cms.model.Folder;
 import org.jboss.portal.cms.util.RepositoryUtil;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
+
 import javax.jcr.Property;
 import javax.jcr.Session;
 import java.util.Date;
@@ -37,6 +42,7 @@
  * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
  */
+ at Bootstrap(beanName = "TestCase", resourceName = "/jboss-beans.xml")
 public class TestFolderUpdate extends AbstractCommandTestCase
 {
    /** A test folder path * */
@@ -55,6 +61,7 @@
     *
     *
     */
+   @Test
    public void testFolderUpdate() throws Exception
    {
       createFolder();

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestRepositoryBootStrap.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestRepositoryBootStrap.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestRepositoryBootStrap.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -25,7 +25,11 @@
 import org.jboss.portal.cms.util.RepositoryUtil;
 
 import org.jboss.portal.cms.test.commands.AbstractCommandTestCase;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
 import javax.jcr.Session;
 
 /**
@@ -33,6 +37,7 @@
  *
  * @author Roy Russo : roy at jboss dot org
  */
+ at Bootstrap(beanName = "TestCase", resourceName = "/jboss-beans.xml")
 public class TestRepositoryBootStrap extends AbstractCommandTestCase
 {
 
@@ -40,6 +45,7 @@
    {
    }
 
+   @Test
    public void testService() throws Exception
    {
       assertTrue(service.contentExists());

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestSearch.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestSearch.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestSearch.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -30,11 +30,16 @@
 import org.jboss.portal.search.impl.jcr.JCRQuery;
 import org.jboss.portal.search.impl.jcr.JCRQueryConverter;
 import org.jboss.portal.search.QueryConversionException;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
 import java.util.List;
 
 
 /** @author <a href="mailto:theute at jboss.org">Thomas Heute</a> */
+ at Bootstrap(beanName = "TestCase", resourceName = "/jboss-beans.xml")
 public class TestSearch extends AbstractCommandTestCase
 {
    /**
@@ -46,6 +51,7 @@
    }   
 
    /** Tests retrieval of the version labeled LIVE. */
+   @Test
    public void testFileGet() throws CMSException, QueryConversionException
    {      
       FederatedQuery query = new FederatedQuery("risks");

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/security/SecureCommandTestCase.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/security/SecureCommandTestCase.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/security/SecureCommandTestCase.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -36,13 +36,21 @@
 import org.jboss.portal.cms.security.AuthorizationProviderImpl;
 import org.jboss.portal.cms.test.commands.AbstractCommandTestCase;
 import org.jboss.portal.cms.test.commands.CMSInterceptorStackFactory;
+import org.jboss.unit.api.pojo.annotations.Create;
+import org.jboss.unit.api.pojo.annotations.Destroy;
+import org.jboss.unit.api.pojo.annotations.Parameter;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
-
 import javax.naming.InitialContext;
 
 /** @author Sohil Shah - sohil.shah at jboss.com - Nov 30, 2006 */
 public abstract class SecureCommandTestCase extends AbstractCommandTestCase
 {
+   
+   private String standardIdentityConfig;
+   
+   private String identityConfig;
+   
    /**
     * 
     */
@@ -59,10 +67,11 @@
    /**
     *
     */
+   @Create
    public void setUp() throws Exception
    {
       //override the configration location to include workflow services
-      this.configuration = "jboss-beans-security.xml";
+      //this.configuration = "jboss-beans-security.xml";
       super.setUp();
 
       ACLInterceptor aclInterceptor = this.getACLInterceptor();
@@ -87,6 +96,7 @@
    /**
     *
     */
+   @Destroy
    public void tearDown() throws Exception
    {
       super.tearDown();
@@ -111,4 +121,26 @@
       tx.commit();
       session.close();
    }
+
+   public String getStandardIdentityConfig()
+   {
+      return standardIdentityConfig;
+   }
+
+   @Parameter(name="standardIdentityConfig")
+   public void setStandardIdentityConfig(String standardIdentityConfig)
+   {
+      this.standardIdentityConfig = standardIdentityConfig;
+   }
+
+   public String getIdentityConfig()
+   {
+      return identityConfig;
+   }
+
+   @Parameter(name="identityConfig")
+   public void setIdentityConfig(String identityConfig)
+   {
+      this.identityConfig = identityConfig;
+   }
 }
\ No newline at end of file

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/security/TestManageAccess.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/security/TestManageAccess.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/security/TestManageAccess.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -26,10 +26,14 @@
 import org.jboss.portal.cms.Command;
 import org.jboss.portal.cms.impl.FolderImpl;
 import org.jboss.portal.cms.model.Folder;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
 import java.util.Date;
 
 /** @author Sohil Shah - sohil.shah at jboss.com - Nov 30, 2006 */
+ at Bootstrap(beanName = "TestCase", resourceName="/jboss-beans-security.xml")
 public class TestManageAccess extends SecureCommandTestCase
 {
    String rejectPath = "/default/private";
@@ -124,6 +128,7 @@
    }
 
    /** @throws Exception  */
+   @Test
    public void testAnonymous() throws Exception
    {
       // first run against non-access scenario
@@ -157,6 +162,7 @@
    }
 
    /** @throws Exception  */
+   @Test
    public void testUser() throws Exception
    {
       this.runAs("user");
@@ -190,6 +196,7 @@
    }
 
    /** @throws Exception  */
+   @Test
    public void testAdmin() throws Exception
    {
       this.runAs("admin");
@@ -221,6 +228,7 @@
    }
 
    /** @throws Exception  */
+   @Test
    public void testCopyToDeniedDestination() throws Exception
    {
       this.runAs("user");
@@ -253,6 +261,7 @@
    }
 
    /** @throws Exception  */
+   @Test
    public void testMoveToDeniedDestination() throws Exception
    {
       this.runAs("user");

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/security/TestReadAccess.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/security/TestReadAccess.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/security/TestReadAccess.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -26,11 +26,16 @@
 import org.jboss.portal.cms.Command;
 import org.jboss.portal.cms.model.File;
 import org.jboss.portal.cms.model.Folder;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
 import java.util.List;
 import java.util.Locale;
 
 /** @author Sohil Shah - sohil.shah at jboss.com - Nov 30, 2006 */
+ at Bootstrap(beanName = "TestCase", resourceName="/jboss-beans-security.xml")
 public class TestReadAccess extends SecureCommandTestCase
 {
    String rejectFolderPath = "/default/private";
@@ -88,6 +93,7 @@
 
 
    /** @throws Exception  */
+   @Test
    public void testAnonymous() throws Exception
    {
       try
@@ -140,6 +146,7 @@
    }
 
    /** @throws Exception  */
+   @Test
    public void testUser() throws Exception
    {
       this.runAs("user");
@@ -194,6 +201,7 @@
    }
 
    /** @throws Exception  */
+   @Test
    public void testAdmin() throws Exception
    {
       this.runAs("admin");

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/security/TestWriteAccess.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/security/TestWriteAccess.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/security/TestWriteAccess.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -30,12 +30,17 @@
 import org.jboss.portal.cms.model.Content;
 import org.jboss.portal.cms.model.File;
 import org.jboss.portal.cms.model.Folder;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
 import java.util.Date;
 import java.util.List;
 import java.util.Locale;
 
 /** @author Sohil Shah - sohil.shah at jboss.com - Nov 30, 2006 */
+ at Bootstrap(beanName = "TestCase", resourceName="/jboss-beans-security.xml")
 public class TestWriteAccess extends SecureCommandTestCase
 {
    String rejectPath = "/default/private";
@@ -186,6 +191,7 @@
 
 
    /** @throws Exception  */
+   @Test
    public void testAnonymous() throws Exception
    {
       // first run against non-access scenario
@@ -219,6 +225,7 @@
    }
 
    /** @throws Exception  */
+   @Test
    public void testUser() throws Exception
    {
       this.runAs("user");
@@ -252,6 +259,7 @@
    }
 
    /** @throws Exception  */
+   @Test
    public void testAdmin() throws Exception
    {
       this.runAs("admin");
@@ -296,6 +304,7 @@
    }
 
    /** @throws Exception  */
+   @Test
    public void testSysAdmin() throws Exception
    {
       this.runAs("sysadmin");

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/workflow/AbstractWorkflowTestCase.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/workflow/AbstractWorkflowTestCase.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/workflow/AbstractWorkflowTestCase.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -42,11 +42,16 @@
 import org.jboss.portal.identity.db.HibernateRoleImpl;
 import org.jboss.portal.identity.db.HibernateUserImpl;
 import org.jboss.portal.server.impl.invocation.JBossInterceptorStack;
+import org.jboss.unit.api.pojo.annotations.Parameter;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
-
 /** @author Sohil Shah - sohil.shah at jboss.com - Nov 30, 2006 */
 public abstract class AbstractWorkflowTestCase extends AbstractCommandTestCase
 {
+   private String standardIdentityConfig;
+   
+   private String identityConfig;
+   
    /**
     * 
     */
@@ -66,7 +71,7 @@
    public void setUp() throws Exception
    {
       //override the configration location to include workflow services
-      this.configuration = "jboss-beans-workflow.xml";
+      // this.configuration = "jboss-beans-workflow.xml";
       super.setUp();
 
       ApprovalWorkflowInterceptor workflowInterceptor = this.getApprovalWorkflowInterceptor();
@@ -184,4 +189,26 @@
       User user = this.userModule.findUserByUserName(username);
       JCRCMS.getUserInfo().set(user);
    }
+   
+   public String getStandardIdentityConfig()
+   {
+      return standardIdentityConfig;
+   }
+
+   @Parameter(name="standardIdentityConfig")
+   public void setStandardIdentityConfig(String standardIdentityConfig)
+   {
+      this.standardIdentityConfig = standardIdentityConfig;
+   }
+
+   public String getIdentityConfig()
+   {
+      return identityConfig;
+   }
+
+   @Parameter(name="identityConfig")
+   public void setIdentityConfig(String identityConfig)
+   {
+      this.identityConfig = identityConfig;
+   }
 }

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/workflow/TestApprovedPublish.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/workflow/TestApprovedPublish.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/workflow/TestApprovedPublish.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -22,7 +22,6 @@
  ******************************************************************************/
 package org.jboss.portal.cms.test.workflow;
 
-import junit.framework.TestSuite;
 import org.hibernate.Session;
 import org.hibernate.SessionFactory;
 import org.hibernate.Transaction;
@@ -33,13 +32,20 @@
 import org.jboss.portal.cms.model.Content;
 import org.jboss.portal.cms.model.File;
 import org.jboss.portal.cms.workflow.ApprovePublish;
+import org.jboss.unit.api.pojo.annotations.Create;
+import org.jboss.unit.api.pojo.annotations.Destroy;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
+import static org.jboss.unit.api.Assert.*;
+
 import javax.naming.InitialContext;
 import java.util.Collection;
 import java.util.Locale;
 import java.util.Set;
 
 /** @author Sohil Shah - sohil.shah at jboss.com - Nov 30, 2006 */
+ at Bootstrap(beanName = "TestCase", resourceName="/jboss-beans-workflow.xml")
 public class TestApprovedPublish extends AbstractWorkflowTestCase
 {
    private String file = "/default/workflow.html";
@@ -58,14 +64,17 @@
     *
     *
     */
+   /*
    public static TestSuite suite() throws Exception
    {
-      return createTestSuite(TestApprovedPublish.class);
+       return createTestSuite(TestApprovedPublish.class);
    }
+   */
 
    /**
     *
     */
+   @Create
    public void setUp() throws Exception
    {
       super.setUp();
@@ -79,6 +88,7 @@
    /**
     *
     */
+   @Destroy
    public void tearDown() throws Exception
    {
       this.tx.commit();
@@ -89,6 +99,7 @@
 
 
    /** @throws Exception  */
+   @Test
    public void test() throws Exception
    {
       //Execute file creation as a regular user/non-manager

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/workflow/TestDeniedPublish.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/workflow/TestDeniedPublish.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/workflow/TestDeniedPublish.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -22,7 +22,8 @@
  ******************************************************************************/
 package org.jboss.portal.cms.test.workflow;
 
-import junit.framework.TestSuite;
+import static org.jboss.unit.api.Assert.*;
+
 import org.hibernate.Session;
 import org.hibernate.SessionFactory;
 import org.hibernate.Transaction;
@@ -33,6 +34,10 @@
 import org.jboss.portal.cms.model.Content;
 import org.jboss.portal.cms.model.File;
 import org.jboss.portal.cms.workflow.ApprovePublish;
+import org.jboss.unit.api.pojo.annotations.Create;
+import org.jboss.unit.api.pojo.annotations.Destroy;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
 import javax.naming.InitialContext;
 import java.util.Collection;
@@ -41,6 +46,7 @@
 import java.util.Set;
 
 /** @author Sohil Shah - sohil.shah at jboss.com - Nov 30, 2006 */
+ at Bootstrap(beanName = "TestCase", resourceName="/jboss-beans-workflow.xml")
 public class TestDeniedPublish extends AbstractWorkflowTestCase
 {
    private String newFile = "/default/workflow.html";
@@ -60,14 +66,17 @@
     *
     *
     */
+   /*
    public static TestSuite suite() throws Exception
    {
       return createTestSuite(TestDeniedPublish.class);
    }
+   */
 
    /**
     *
     */
+   @Create
    public void setUp() throws Exception
    {
       super.setUp();
@@ -81,6 +90,7 @@
    /**
     *
     */
+   @Destroy
    public void tearDown() throws Exception
    {
       this.tx.commit();
@@ -91,6 +101,7 @@
 
 
    /** @throws Exception  */
+   @Test
    public void testPublishExistingFile() throws Exception
    {
       ApprovePublish approvePublish = this.service.getApprovePublishWorkflow();
@@ -157,6 +168,7 @@
     * 
     * @throws Exception
     */
+   @Test
    public void testPublishNewFile() throws Exception
    {
       //Execute file creation as a regular user/non-manager

Modified: modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/workflow/TestWorkflowEnvironment.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/workflow/TestWorkflowEnvironment.java	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/workflow/TestWorkflowEnvironment.java	2008-09-02 15:04:18 UTC (rev 11786)
@@ -23,14 +23,16 @@
 package org.jboss.portal.cms.test.workflow;
 
 import junit.framework.Assert;
-import junit.framework.TestSuite;
 import org.jboss.portal.cms.CMSException;
 import org.jboss.portal.cms.workflow.ApprovePublish;
+import org.jboss.unit.api.pojo.annotations.Test;
+import org.jboss.unit.mc.api.annotations.Bootstrap;
 
 import java.util.Set;
 
 
 /** @author Sohil Shah - sohil.shah at jboss.com - Nov 30, 2006 */
+ at Bootstrap(beanName = "TestCase", resourceName="/jboss-beans-workflow.xml")
 public class TestWorkflowEnvironment extends AbstractWorkflowTestCase
 {
    String rejectPath = "/default/private/license.html";
@@ -49,12 +51,15 @@
     *
     *
     */
+   /*
    public static TestSuite suite() throws Exception
    {
       return createTestSuite(TestWorkflowEnvironment.class);
    }
+   */
 
    /** @throws CMSException  */
+   @Test
    public void test() throws Exception
    {
       //Get the ApprovePublish service

Modified: modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security.xml
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security.xml	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-security.xml	2008-09-02 15:04:18 UTC (rev 11786)
@@ -23,22 +23,21 @@
   ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.                  ~
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
 
-<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
-            xmlns="urn:jboss:bean-deployer">
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
 
+
    <bean name="DataSourceConfig" class="org.jboss.portal.test.framework.embedded.DataSourceSupport$Config">
-      <constructor factoryMethod="getBean">
-         <factory bean="BeanFactory"/>
-         <parameter>DataSourceConfig</parameter>
+      <constructor factoryMethod="obtainConfig" factoryClass="org.jboss.portal.test.framework.embedded.DataSourceSupport$Config">
+         <parameter><inject bean="TestCase" property="datasources" state="Instantiated"/></parameter>
+         <parameter><inject bean="TestCase" property="dataSourceName" state="Instantiated"/></parameter>
       </constructor>
    </bean>
 
    <bean name="HibernateConfig" class="org.jboss.portal.test.framework.embedded.HibernateSupport$Config">
-      <constructor factoryMethod="getBean">
-         <factory bean="BeanFactory"/>
-         <parameter>HibernateConfig</parameter>
-      </constructor>
+      <constructor factoryMethod="getConfig" factoryClass="org.jboss.portal.test.framework.embedded.HibernateSupport">
+         <parameter><inject bean="TestCase" property="dataSourceName" state="Instantiated"/></parameter>
+         <parameter><inject bean="TestCase" property="hibernateConfig" state="Instantiated"/></parameter>
+      </constructor>                            
    </bean>
 
    <bean name="JNDISupport" class="org.jboss.portal.test.framework.embedded.JNDISupport">
@@ -53,22 +52,63 @@
 
    <bean name="DataSourceSupport" class="org.jboss.portal.test.framework.embedded.DataSourceSupport">
       <property name="transactionManager"><inject bean="TransactionManagerSupport" property="transactionManager"/></property>
-      <property name="connectionManagerReference"><inject bean="ConnectionManagerSupport"
-                                                          property="connectionManagerReference"/></property>
+      <property name="connectionManagerReference"><inject bean="ConnectionManagerSupport" property="connectionManagerReference"/></property>
       <property name="config"><inject bean="DataSourceConfig"/></property>
    </bean>
 
    <bean name="HibernateSupport" class="org.jboss.portal.test.framework.embedded.HibernateSupport">
       <property name="config"><inject bean="HibernateConfig"/></property>
-      <property name="jNDIName">java:/SessionFactory</property>
+      <property name="JNDIName">java:/SessionFactory</property>
       <property name="mappings">
          <list elementClass="java.lang.String">
-            <value>domain.hbm.xml</value>
-            <value>domain-identity.hbm.xml</value>                      		    
+            <value>domain.hbm.xml</value>            
+            <value>domain-identity.hbm.xml</value>
          </list>
       </property>
    </bean>
-            
+
+   <bean name="IdentityTestServiceLoader" class="org.jboss.portal.cms.test.TestServiceLoader">
+      <depends>JNDISupport</depends>
+      <depends>HibernateSupport</depends>
+      <depends>DataSourceSupport</depends>
+   </bean>
+
+   <bean name="IdentityContext" class="org.jboss.portal.identity.IdentityContext">
+      <constructor factoryMethod="loadServices">
+         <factory bean="IdentityTestServiceLoader"/>
+         <parameter class="java.lang.String"><inject bean="TestCase" property="standardIdentityConfig" state="Instantiated"/></parameter>
+         <parameter class="java.lang.String"><inject bean="TestCase" property="identityConfig" state="Instantiated"/></parameter>
+      </constructor>
+   </bean>
+
+   <bean name="UserModule" class="org.jboss.portal.identity.UserModule">
+      <constructor factoryMethod="getObject">
+         <factory bean="IdentityContext" />
+         <parameter>User</parameter>
+      </constructor>
+   </bean>
+
+   <bean name="RoleModule" class="org.jboss.portal.identity.RoleModule">
+      <constructor factoryMethod="getObject">
+         <factory bean="IdentityContext" />
+         <parameter>Role</parameter>
+      </constructor>
+   </bean>
+
+   <bean name="MembershipModule" class="org.jboss.portal.identity.MembershipModule">
+      <constructor factoryMethod="getObject">
+         <factory bean="IdentityContext" />
+         <parameter>Membership</parameter>
+      </constructor>
+   </bean>
+
+   <bean name="UserProfileModule" class="org.jboss.portal.identity.UserProfileModule">
+      <constructor factoryMethod="getObject">
+         <factory bean="IdentityContext" />
+         <parameter>UserProfile</parameter>
+      </constructor>
+   </bean>
+   
    <bean name="IdentityServiceController" class="org.jboss.portal.core.identity.service.IdentityServiceControllerImpl">
    		<property name="configFile">db-config.xml</property>
    		<property name="defaultConfigFile">standardidentity-config.xml</property>
@@ -88,18 +128,18 @@
    
    <bean name="AuthorizationManager" class="org.jboss.portal.cms.security.AuthorizationManagerImpl">
    		<property name="provider"><inject bean="AuthorizationProvider"/></property>
-   		<property name="jNDIName">java:portal/cms/AuthorizationManager</property>
+   		<property name="JNDIName">java:portal/cms/AuthorizationManager</property>
    </bean>
    
    <bean name="ACLInterceptor" class="org.jboss.portal.cms.impl.interceptors.ACLInterceptor">
    		<property name="authorizationManager"><inject bean="AuthorizationManager"/></property>
-   		<property name="jNDIName">java:/portal/cms/ACLInterceptor</property>
+   		<property name="JNDIName">java:/portal/cms/ACLInterceptor</property>
    		<property name="cmsSessionFactory">java:/SessionFactory</property>
    		<property name="identitySessionFactory">java:/SessionFactory</property>
    		<property name="defaultPolicy">
       	<![CDATA[
       	<policy>
-      			<!-- permissions on the root cms node -->      			
+      			<!-- permissions on the root cms node -->
       			<criteria name="path" value="/">
       				<permission name="cms" action="read">
       					<role name="Anonymous"/>
@@ -111,7 +151,7 @@
       					<role name="Admin"/>
       				</permission>
       			</criteria>
-      			<!-- permissions on the default cms node -->      			
+      			<!-- permissions on the default cms node -->      		
       			<criteria name="path" value="/default">
       				<permission name="cms" action="read">
       					<role name="Anonymous"/>

Modified: modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-workflow.xml
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-workflow.xml	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans-workflow.xml	2008-09-02 15:04:18 UTC (rev 11786)
@@ -23,22 +23,22 @@
   ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.                  ~
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
 
-<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
-            xmlns="urn:jboss:bean-deployer">
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
 
+
+
    <bean name="DataSourceConfig" class="org.jboss.portal.test.framework.embedded.DataSourceSupport$Config">
-      <constructor factoryMethod="getBean">
-         <factory bean="BeanFactory"/>
-         <parameter>DataSourceConfig</parameter>
+      <constructor factoryMethod="obtainConfig" factoryClass="org.jboss.portal.test.framework.embedded.DataSourceSupport$Config">
+         <parameter><inject bean="TestCase" property="datasources" state="Instantiated"/></parameter>
+         <parameter><inject bean="TestCase" property="dataSourceName" state="Instantiated"/></parameter>
       </constructor>
    </bean>
 
    <bean name="HibernateConfig" class="org.jboss.portal.test.framework.embedded.HibernateSupport$Config">
-      <constructor factoryMethod="getBean">
-         <factory bean="BeanFactory"/>
-         <parameter>HibernateConfig</parameter>
-      </constructor>
+      <constructor factoryMethod="getConfig" factoryClass="org.jboss.portal.test.framework.embedded.HibernateSupport">
+         <parameter><inject bean="TestCase" property="dataSourceName" state="Instantiated"/></parameter>
+         <parameter><inject bean="TestCase" property="hibernateConfig" state="Instantiated"/></parameter>
+      </constructor>                            
    </bean>
 
    <bean name="JNDISupport" class="org.jboss.portal.test.framework.embedded.JNDISupport">
@@ -53,17 +53,16 @@
 
    <bean name="DataSourceSupport" class="org.jboss.portal.test.framework.embedded.DataSourceSupport">
       <property name="transactionManager"><inject bean="TransactionManagerSupport" property="transactionManager"/></property>
-      <property name="connectionManagerReference"><inject bean="ConnectionManagerSupport"
-                                                          property="connectionManagerReference"/></property>
+      <property name="connectionManagerReference"><inject bean="ConnectionManagerSupport" property="connectionManagerReference"/></property>
       <property name="config"><inject bean="DataSourceConfig"/></property>
    </bean>
 
    <bean name="HibernateSupport" class="org.jboss.portal.test.framework.embedded.HibernateSupport">
       <property name="config"><inject bean="HibernateConfig"/></property>
-      <property name="jNDIName">java:/SessionFactory</property>
+      <property name="JNDIName">java:/SessionFactory</property>
       <property name="mappings">
          <list elementClass="java.lang.String">
-            <value>domain.hbm.xml</value>
+            <value>domain.hbm.xml</value>            
             <value>domain-identity.hbm.xml</value>
             <value>org/jbpm/graph/action/Script.hbm.xml</value>
             <value>org/jbpm/identity/User.hbm.xml</value>
@@ -156,14 +155,60 @@
          </list>
       </property>
    </bean>
-         
+
+   <bean name="IdentityTestServiceLoader" class="org.jboss.portal.cms.test.TestServiceLoader">
+      <depends>JNDISupport</depends>
+      <depends>HibernateSupport</depends>
+      <depends>DataSourceSupport</depends>
+   </bean>
+
+   <bean name="IdentityContext" class="org.jboss.portal.identity.IdentityContext">
+      <constructor factoryMethod="loadServices">
+         <factory bean="IdentityTestServiceLoader"/>
+         <parameter class="java.lang.String"><inject bean="TestCase" property="standardIdentityConfig" state="Instantiated"/></parameter>
+         <parameter class="java.lang.String"><inject bean="TestCase" property="identityConfig" state="Instantiated"/></parameter>
+      </constructor>
+   </bean>
+
+   <bean name="UserModule" class="org.jboss.portal.identity.UserModule">
+      <constructor factoryMethod="getObject">
+         <factory bean="IdentityContext" />
+         <parameter>User</parameter>
+      </constructor>
+   </bean>
+
+   <bean name="RoleModule" class="org.jboss.portal.identity.RoleModule">
+      <constructor factoryMethod="getObject">
+         <factory bean="IdentityContext" />
+         <parameter>Role</parameter>
+      </constructor>
+   </bean>
+
+   <bean name="MembershipModule" class="org.jboss.portal.identity.MembershipModule">
+      <constructor factoryMethod="getObject">
+         <factory bean="IdentityContext" />
+         <parameter>Membership</parameter>
+      </constructor>
+   </bean>
+
+   <bean name="UserProfileModule" class="org.jboss.portal.identity.UserProfileModule">
+      <constructor factoryMethod="getObject">
+         <factory bean="IdentityContext" />
+         <parameter>UserProfile</parameter>
+      </constructor>
+   </bean>
+   
    <bean name="IdentityServiceController" class="org.jboss.portal.core.identity.service.IdentityServiceControllerImpl">
    		<property name="configFile">db-config.xml</property>
    		<property name="defaultConfigFile">standardidentity-config.xml</property>
    		<property name="registerMBeans">false</property>
    </bean>
-
-
+   
+   <bean name="IdentityDataLoader" class="org.jboss.portal.cms.test.security.IdentityDataLoader">   	
+   		<property name="identityServiceController"><inject bean="IdentityServiceController"/></property>	
+   		<property name="identitySessionFactory">java:/SessionFactory</property>
+   </bean>
+         
    <!-- setup for cms workflow testing -->
    <bean name="WorkflowService" class="org.jboss.portal.workflow.service.WorkflowServiceImpl">
       <property name="jbpmConfigurationXml">
@@ -190,7 +235,7 @@
    	<property name="identityServiceController"><inject bean="IdentityServiceController"/></property>
    	<property name="overwrite">false</property>
    	<property name="managerRoles">Admin</property>
-    <property name="jNDIName">java:/portal/ApprovePublishWorkflow</property>
+    <property name="JNDIName">java:/portal/ApprovePublishWorkflow</property>
     <property name="process">
       	<![CDATA[      	     
   	         <!-- cms approval workflow -->
@@ -218,6 +263,6 @@
    </bean>
    
    <bean class="org.jboss.portal.cms.impl.interceptors.ApprovalWorkflowInterceptor" name="ApprovalWorkflowInterceptor">
-   	<property name="jNDIName">java:/portal/cms/ApprovalWorkflowInterceptor</property>              
+   	<property name="JNDIName">java:/portal/cms/ApprovalWorkflowInterceptor</property>              
    </bean>
 </deployment>

Modified: modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans.xml
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans.xml	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-beans.xml	2008-09-02 15:04:18 UTC (rev 11786)
@@ -23,22 +23,20 @@
   ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.                  ~
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
 
-<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
-            xmlns="urn:jboss:bean-deployer">
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
 
    <bean name="DataSourceConfig" class="org.jboss.portal.test.framework.embedded.DataSourceSupport$Config">
-      <constructor factoryMethod="getBean">
-         <factory bean="BeanFactory"/>
-         <parameter>DataSourceConfig</parameter>
+      <constructor factoryMethod="obtainConfig" factoryClass="org.jboss.portal.test.framework.embedded.DataSourceSupport$Config">
+         <parameter><inject bean="TestCase" property="datasources" state="Instantiated"/></parameter>
+         <parameter><inject bean="TestCase" property="dataSourceName" state="Instantiated"/></parameter>
       </constructor>
    </bean>
 
    <bean name="HibernateConfig" class="org.jboss.portal.test.framework.embedded.HibernateSupport$Config">
-      <constructor factoryMethod="getBean">
-         <factory bean="BeanFactory"/>
-         <parameter>HibernateConfig</parameter>
-      </constructor>
+      <constructor factoryMethod="getConfig" factoryClass="org.jboss.portal.test.framework.embedded.HibernateSupport">
+         <parameter><inject bean="TestCase" property="dataSourceName" state="Instantiated"/></parameter>
+         <parameter><inject bean="TestCase" property="hibernateConfig" state="Instantiated"/></parameter>
+      </constructor>                            
    </bean>
 
    <bean name="JNDISupport" class="org.jboss.portal.test.framework.embedded.JNDISupport">
@@ -53,18 +51,17 @@
 
    <bean name="DataSourceSupport" class="org.jboss.portal.test.framework.embedded.DataSourceSupport">
       <property name="transactionManager"><inject bean="TransactionManagerSupport" property="transactionManager"/></property>
-      <property name="connectionManagerReference"><inject bean="ConnectionManagerSupport"
-                                                          property="connectionManagerReference"/></property>
+      <property name="connectionManagerReference"><inject bean="ConnectionManagerSupport" property="connectionManagerReference"/></property>
       <property name="config"><inject bean="DataSourceConfig"/></property>
    </bean>
 
    <bean name="HibernateSupport" class="org.jboss.portal.test.framework.embedded.HibernateSupport">
       <property name="config"><inject bean="HibernateConfig"/></property>
-      <property name="jNDIName">java:/SessionFactory</property>
+      <property name="JNDIName">java:/SessionFactory</property>
       <property name="mappings">
          <list elementClass="java.lang.String">
             <value>domain.hbm.xml</value>            
          </list>
       </property>
-   </bean>         
+   </bean> 
 </deployment>

Added: modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-unit.xml
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-unit.xml	                        (rev 0)
+++ modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-unit.xml	2008-09-02 15:04:18 UTC (rev 11786)
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-unit
+   xmlns="urn:jboss:jboss-unit:1.0"
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="urn:jboss:jboss-unit:1.0 jboss-unit_1_0.xsd">
+   <pojo>
+      <parameter name="datasources" value="datasources.xml"/>
+      <parameter name="dataSourceName" value="hsqldb"/>
+      <parameter name="hibernateConfig" value="hibernates.xml"/>
+      <test >
+         <class name="org.jboss.portal.cms.test.TestJackrabbit"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.TestRegEx"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.TestRepositoryUtil"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.commands.TestFileArchiveUpload"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.commands.TestFileCopy"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.commands.TestFileCreate"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.commands.TestFileCreateFailed"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.commands.TestFileDelete"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.commands.TestFileGet"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.commands.TestFileGetList"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.commands.TestFileGetVersion"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.commands.TestFileSize"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.commands.TestFileUpdate"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.commands.TestFolderCopy"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.commands.TestFolderCreate"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.commands.TestFolderDelete"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.commands.TestFolderGet"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.commands.TestFolderUpdate"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.commands.TestRepositoryBootStrap"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.commands.TestSearch"/>
+      </test>
+   </pojo>
+
+   <pojo>
+      <parameter name="datasources" value="datasources.xml"/>
+      <parameter name="dataSourceName" value="hsqldb"/>
+      <parameter name="hibernateConfig" value="hibernates.xml"/>
+      <parameter name="standardIdentityConfig" value="standardidentity-config.xml"/>
+      <parameter name="identityConfig" value="db-config.xml"/>
+      <test >
+         <class name="org.jboss.portal.cms.test.security.TestManageAccess"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.security.TestReadAccess"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.security.TestWriteAccess"/>
+      </test>
+    </pojo>
+    
+    <pojo>
+      <parameter name="datasources" value="datasources.xml"/>
+      <parameter name="dataSourceName" value="hsqldb"/>
+      <parameter name="hibernateConfig" value="hibernates.xml"/>
+      <parameter name="standardIdentityConfig" value="standardidentity-config.xml"/>
+      <parameter name="identityConfig" value="db-config.xml"/>
+      <test >
+         <class name="org.jboss.portal.cms.test.workflow.TestApprovedPublish"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.workflow.TestDeniedPublish"/>
+      </test>
+      <test >
+         <class name="org.jboss.portal.cms.test.workflow.TestWorkflowEnvironment"/>
+      </test>
+   </pojo>
+</jboss-unit>

Modified: modules/cms/trunk/cms-jackrabbit/src/test/resources/standardidentity-config.xml
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/resources/standardidentity-config.xml	2008-09-02 14:13:15 UTC (rev 11785)
+++ modules/cms/trunk/cms-jackrabbit/src/test/resources/standardidentity-config.xml	2008-09-02 15:04:18 UTC (rev 11786)
@@ -56,7 +56,7 @@
                <value>password</value>
             </option>
             <option>
-               <name>jNDIName</name>
+               <name>JNDIName</name>
                <value>java:/portal/LDAPConnectionContext</value>
             </option>
             <option>
@@ -91,7 +91,7 @@
                <value>java:/SessionFactory</value>
             </option>
             <option>
-               <name>jNDIName</name>
+               <name>JNDIName</name>
                <value>java:/portal/UserModule</value>
             </option>
          </config>
@@ -113,7 +113,7 @@
                <value>java:/SessionFactory</value>
             </option>
             <option>
-               <name>jNDIName</name>
+               <name>JNDIName</name>
                <value>java:/portal/RoleModule</value>
             </option>
          </config>
@@ -135,7 +135,7 @@
                <value>java:/SessionFactory</value>
             </option>
             <option>
-               <name>jNDIName</name>
+               <name>JNDIName</name>
                <value>java:/portal/MembershipModule</value>
             </option>
          </config>
@@ -157,7 +157,7 @@
                <value>java:/SessionFactory</value>
             </option>
             <option>
-               <name>jNDIName</name>
+               <name>JNDIName</name>
                <value>java:/portal/UserProfileModule</value>
             </option>
          </config>




More information about the portal-commits mailing list