portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r224634 - in /portals/jetspeed-2/trunk/components/capability: project.xml src/test/org/apache/jetspeed/capabilities/TestCapability.java
Date Sun, 24 Jul 2005 17:52:20 GMT
Author: taylor
Date: Sun Jul 24 10:52:15 2005
New Revision: 224634

URL: http://svn.apache.org/viewcvs?rev=224634&view=rev
Log:
1. continuing effort to get tests working again
   Capabilities is now passing tests


Modified:
    portals/jetspeed-2/trunk/components/capability/project.xml
    portals/jetspeed-2/trunk/components/capability/src/test/org/apache/jetspeed/capabilities/TestCapability.java

Modified: portals/jetspeed-2/trunk/components/capability/project.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/capability/project.xml?rev=224634&r1=224633&r2=224634&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/capability/project.xml (original)
+++ portals/jetspeed-2/trunk/components/capability/project.xml Sun Jul 24 10:52:15 2005
@@ -38,7 +38,11 @@
 
   <shortDescription>Capability Components</shortDescription>
  
-  <dependencies>  	
+  <dependencies>
+    <dependency>
+      <id>jetspeed2:jetspeed-rdbms</id>
+      <version>${jetspeed.version}</version>
+    </dependency>    	      	
   	<dependency>
       <id>jetspeed-cm</id>
       <groupId>jetspeed2</groupId>
@@ -59,107 +63,34 @@
       <id>jetspeed2:jetspeed-registry</id>
       <version>${jetspeed.version}</version>
     </dependency>    
-    <!-- Testing only -->
-    <dependency>
-      <id>jetspeed2:jetspeed-rdbms</id>
-      <version>${jetspeed.version}</version>
-    </dependency>    	
-  	 <dependency>
-      <id>commons-lang</id>
-      <version>2.0</version>
-    </dependency>
-    <dependency>
-      <id>commons-logging</id>
-      <version>1.0.3</version>
-    </dependency>
-    <dependency>
-      <id>commons-beanutils</id>
-      <version>1.6.1</version>
-    </dependency>
-    <dependency>
-      <id>commons-configuration</id>
-      <version>1.0-dev</version>
-    </dependency>
-    <dependency>
-      <id>junit</id>
-      <version>3.8.1</version>
-    </dependency>
-    <dependency>
-      <id>log4j</id>
-      <version>1.2.6</version>
-    </dependency>   
-    <dependency>
-      <id>commons-collections</id>
-      <version>3.0</version>
-    </dependency>
-    <dependency>
-      <id>commons-io</id>
-      <version>0.1</version>
-    </dependency>
-    <dependency>
-      <id>xerces</id>
-      <version>2.3.0</version>
-    </dependency>
-    <dependency>
-      <id>xml-apis</id>
-      <version>2.0.2</version>
-    </dependency>
-    <dependency>
-      <id>tyrex</id>
-      <version>1.0.1</version>
-    </dependency>
-    <dependency>
-      <id>jta</id>
-      <jar>jta1.0.1.jar</jar>
-    </dependency>
-    
-    <dependency>
-      <id>commons-pool</id>
-      <version>1.2</version>
-    </dependency>
-    <dependency>
-      <id>commons-dbcp</id>
-      <version>1.2.1</version>
-    </dependency>
-     
-    <!-- This is only a test dependency -->
-    <dependency>
-      <id>hsqldb</id>
-      <version>1.7.1</version>
-    </dependency>
-      
-   
-     <dependency>
-      <!-- portlet-api.jar must be in %MAVEN_HOME%respository/portlet-api/jars -->
-      <id>portlet-api</id>
-      <version>1.0</version>
-    </dependency>
-     <dependency>
-      <id>servletapi</id>
-      <version>2.3</version>
-    </dependency>
   </dependencies>
   <build>
     <sourceDirectory>src/java</sourceDirectory>
 	<unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
-	<!--
-    <unitTest>
-      <resources>
-        <resource>
-          <directory>${basedir}/src/test</directory>
-          <excludes>
-           <exclude>**/*.java</exclude>
-          </excludes>
-        </resource>
-        <resource>
-          <directory>${basedir}/src/java</directory>
-          <excludes>
-           <exclude>**/*.java</exclude>
-           <exclude>**/META-INF/**</exclude>
-          </excludes>
-        </resource>
-      </resources>
-    </unitTest>
+
+        <unitTest>
+            <resources>
+                <resource>
+                    <directory>${basedir}/src/test</directory>
+                    <excludes>
+                        <exclude>**/*.java</exclude>
+                    </excludes>
+                </resource>
+                <resource>
+                    <directory>${basedir}/src/java</directory>
+                    <excludes>
+                        <exclude>**/*.java</exclude>
+                        <exclude>**/META-INF/**</exclude>
+                    </excludes>
+                </resource>
+                <resource>
+                    <directory>${basedir}/../../etc/log4j</directory>
+                </resource>
+                <resource>
+                    <directory>${basedir}/../../etc/db-ojb</directory>
+                </resource>
+            </resources>
+        </unitTest>
     
     
     <resources>
@@ -170,7 +101,6 @@
         </excludes>
       </resource>
     </resources>
-    -->
     
   </build>
 

Modified: portals/jetspeed-2/trunk/components/capability/src/test/org/apache/jetspeed/capabilities/TestCapability.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/capability/src/test/org/apache/jetspeed/capabilities/TestCapability.java?rev=224634&r1=224633&r2=224634&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/capability/src/test/org/apache/jetspeed/capabilities/TestCapability.java
(original)
+++ portals/jetspeed-2/trunk/components/capability/src/test/org/apache/jetspeed/capabilities/TestCapability.java
Sun Jul 24 10:52:15 2005
@@ -16,12 +16,17 @@
 
 package org.apache.jetspeed.capabilities;
 
+import java.util.HashMap;
 import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.jetspeed.capabilities.impl.JetspeedCapabilities;
+import org.apache.jetspeed.testhelpers.OJBHelper;
 
 import junit.framework.Test;
+import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
-import org.apache.jetspeed.components.util.DatasourceEnabledSpringTestCase;
 
 /**
  * Test Capability Service
@@ -29,9 +34,10 @@
  * @author <a href="roger.ruttimann@earthlink.net">Roger Ruttimann</a>
  * @version $Id$
  */
-public class TestCapability extends DatasourceEnabledSpringTestCase
+public class TestCapability extends TestCase
 {
     private Capabilities capabilities = null;
+    private OJBHelper ojbHelper;
         
     /**
      * Start the tests.
@@ -46,8 +52,17 @@
 
     protected void setUp() throws Exception
     {
-        super.setUp();               
-        this.capabilities = (Capabilities) ctx.getBean("capabilities");
+        Map context = new HashMap();
+        ojbHelper = new OJBHelper(context);
+        ojbHelper.setUp();
+
+        
+        JetspeedCapabilities targetCapabilities
+            = new JetspeedCapabilities("META-INF/capabilities-ojb.xml");
+        targetCapabilities.init();
+        this.capabilities = (Capabilities) 
+            ojbHelper.getTxProxiedObject(targetCapabilities, new String[]{Capabilities.class.getName()});
               
+        
     }
     
     public static Test suite()
@@ -61,9 +76,6 @@
      * @throws Exception
      */
     public void testCapability() throws Exception
-    {
-    }
-    public void xtestCapability() throws Exception
     {
         assertNotNull("capabilities component is null", capabilities);
         int lastOrder = 0;



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message