portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r643159 [2/2] - in /portals/jetspeed-2/portal/trunk/components: jetspeed-capability/src/test/java/org/apache/jetspeed/capabilities/ jetspeed-cm/src/main/java/org/apache/jetspeed/ jetspeed-cm/src/main/java/org/apache/jetspeed/components/ jet...
Date Mon, 31 Mar 2008 21:30:59 GMT
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/tools/pamanager/TestJetspeedPortletDescriptor.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/tools/pamanager/TestJetspeedPortletDescriptor.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/tools/pamanager/TestJetspeedPortletDescriptor.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/tools/pamanager/TestJetspeedPortletDescriptor.java Mon Mar 31 14:30:38 2008
@@ -20,13 +20,13 @@
 import java.util.Collection;
 
 import junit.framework.Test;
-import junit.framework.TestCase;
 import junit.framework.TestSuite;
 import junit.textui.TestRunner;
 
 import org.apache.jetspeed.om.common.JetspeedServiceReference;
 import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
 import org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite;
+import org.apache.jetspeed.prefs.util.test.AbstractPrefsSupportedTestCase;
 import org.apache.jetspeed.util.descriptor.ExtendedPortletMetadata;
 import org.apache.jetspeed.util.descriptor.PortletApplicationDescriptor;
 
@@ -39,8 +39,7 @@
  * @version $Id$
  */
 public class TestJetspeedPortletDescriptor
-    extends TestCase { 
-    //extends AbstractPrefsSupportedTestCase {
+    extends AbstractPrefsSupportedTestCase {
     
     private static final String PORTLET_01 = "HelloPortlet";
     private static final String PORTLET_02 = "DisplayRequestPortlet";
@@ -73,7 +72,7 @@
     public void testLoadPortletApplicationTree() throws Exception
     {
         System.out.println("Testing loadPortletApplicationTree");
-        PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader("src/test/testdata/deploy/portlet.xml"), "unit-test");
+        PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader(getBaseDir()+"src/test/testdata/deploy/portlet.xml"), "unit-test");
         MutablePortletApplication app = pad.createPortletApplication();            
         assertNotNull("App is null", app);
         assertNotNull("Version is null", app.getVersion());
@@ -83,7 +82,7 @@
                 "PA Identifier invalid: " + app.getApplicationIdentifier(),
                 app.getApplicationIdentifier().equals("TestRegistry"));
        
-        ExtendedPortletMetadata md = new ExtendedPortletMetadata(new FileReader("src/test/testdata/deploy/jetspeed-portlet.xml"), app); 
+        ExtendedPortletMetadata md = new ExtendedPortletMetadata(new FileReader(getBaseDir()+"src/test/testdata/deploy/jetspeed-portlet.xml"), app); 
         md.load();
        
         PortletDefinitionComposite def1 = (PortletDefinitionComposite)app.getPortletDefinitionByName(PORTLET_01);

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/tools/pamanager/TestPortletDescriptor.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/tools/pamanager/TestPortletDescriptor.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/tools/pamanager/TestPortletDescriptor.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/tools/pamanager/TestPortletDescriptor.java Mon Mar 31 14:30:38 2008
@@ -94,7 +94,7 @@
     public void testLoadPortletApplicationTree() throws Exception
     {
         System.out.println("Testing loadPortletApplicationTree");
-        PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader("src/test/testdata/deploy/portlet.xml"), "unit-test");
+        PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader(getBaseDir()+"src/test/testdata/deploy/portlet.xml"), "unit-test");
         MutablePortletApplication app = pad.createPortletApplication();
         assertNotNull("App is null", app);
         assertNotNull("Version is null", app.getVersion());
@@ -303,7 +303,7 @@
           
         }
 
-        PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader("src/test/testdata/deploy/portlet2.xml"), "HW_App");
+        PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader(getBaseDir()+"src/test/testdata/deploy/portlet2.xml"), "HW_App");
         app = pad.createPortletApplication();
 
         app.setName("HW_App");
@@ -347,7 +347,7 @@
 
     public void testInfusingWebXML() throws Exception
     {
-        File warFile = new File("src/test/testdata/deploy/webapp");
+        File warFile = new File(getBaseDir()+"src/test/testdata/deploy/webapp");
         PortletApplicationWar paWar = new PortletApplicationWar(new DirectoryHelper(warFile), "unit-test", "/" );
 
         SAXBuilder builder = new SAXBuilder(false);
@@ -369,7 +369,7 @@
             }
         });
 
-        FileReader srcReader = new FileReader("src/test/testdata/deploy/webapp/WEB-INF/web.xml");
+        FileReader srcReader = new FileReader(getBaseDir()+"src/test/testdata/deploy/webapp/WEB-INF/web.xml");
         FileReader targetReader = null;
         Document  doc = builder.build(srcReader);
 
@@ -383,10 +383,10 @@
             assertNull(jetspeedServlet);
             assertNull(jetspeedServletMapping);
 
-            PortletApplicationWar targetWar = paWar.copyWar("./target/webapp");
+            PortletApplicationWar targetWar = paWar.copyWar(getBaseDir()+"target/webapp");
             targetWar.processWebXML();
 
-            targetReader = new FileReader("./target/webapp/WEB-INF/web.xml");
+            targetReader = new FileReader(getBaseDir()+"target/webapp/WEB-INF/web.xml");
 
             Document targetDoc = builder.build(targetReader);
 
@@ -406,7 +406,7 @@
             {
                 targetReader.close();
             }
-            File warFile2 = new File("./target/webapp");
+            File warFile2 = new File(getBaseDir()+"target/webapp");
             if (warFile2.exists())
             {
                 DirectoryHelper dirHelper = new DirectoryHelper(warFile2);

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/tools/pamanager/TestPortletDescriptorSecurityRoles.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/tools/pamanager/TestPortletDescriptorSecurityRoles.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/tools/pamanager/TestPortletDescriptorSecurityRoles.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/tools/pamanager/TestPortletDescriptorSecurityRoles.java Mon Mar 31 14:30:38 2008
@@ -78,7 +78,7 @@
     public void testSecurityRoles() throws Exception
     {
         System.out.println("Testing securityRoles");
-        File warFile = new File("src/test/testdata/deploy/webapp");
+        File warFile = new File(getBaseDir()+"src/test/testdata/deploy/webapp");
         PortletApplicationWar paWar = new PortletApplicationWar(new DirectoryHelper(warFile), "unit-test", "/" );
 
         MutablePortletApplication app = paWar.createPortletApp();

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/userinfo/TestUserInfoManager.java Mon Mar 31 14:30:38 2008
@@ -65,8 +65,8 @@
     {
         super.setUp();
 
-        single = (UserInfoManager) ctx.getBean("org.apache.jetspeed.userinfo.UserInfoManager");
-        portletRegistry = (PortletRegistry) ctx.getBean("portletRegistry");
+        single = (UserInfoManager) scm.getComponent("org.apache.jetspeed.userinfo.UserInfoManager");
+        portletRegistry = (PortletRegistry) scm.getComponent("portletRegistry");
     }
 
     /**
@@ -97,7 +97,7 @@
 
     private void innerTestSetUserInfoMap(UserInfoManager uim) throws Exception
     {
-        PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader("src/test/testdata/deploy/portlet.xml"), "unit-test");
+        PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader(getBaseDir()+"src/test/testdata/deploy/portlet.xml"), "unit-test");
         portletApp = pad.createPortletApplication();
         assertNotNull("App is null", portletApp);
 
@@ -131,7 +131,7 @@
         assertNull("should not contain user.home-info.online.email", userInfo.get("user.home-info.online.email"));
 
         // With linked attributes
-        ExtendedPortletMetadata extMetaData = new ExtendedPortletMetadata(new FileReader("src/test/testdata/deploy/jetspeed-portlet.xml"), portletApp);
+        ExtendedPortletMetadata extMetaData = new ExtendedPortletMetadata(new FileReader(getBaseDir()+"src/test/testdata/deploy/jetspeed-portlet.xml"), portletApp);
         extMetaData.load();
 
         // persist the app

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/main/java/org/apache/jetspeed/prefs/impl/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Mar 31 14:30:38 2008
@@ -1,2 +1,2 @@
-target
+target
 surefire*.properties

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/main/java/org/apache/jetspeed/prefs/util/test/AbstractPrefsSupportedTestCase.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/main/java/org/apache/jetspeed/prefs/util/test/AbstractPrefsSupportedTestCase.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/main/java/org/apache/jetspeed/prefs/util/test/AbstractPrefsSupportedTestCase.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/main/java/org/apache/jetspeed/prefs/util/test/AbstractPrefsSupportedTestCase.java Mon Mar 31 14:30:38 2008
@@ -46,6 +46,6 @@
     protected void setUp() throws Exception
     {
         super.setUp();
-        prefsProvider = (PreferencesProvider) ctx.getBean("prefsProvider");
+        prefsProvider = (PreferencesProvider) scm.getComponent("prefsProvider");
     }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/test/java/org/apache/jetspeed/prefs/TestNodePreferences.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/test/java/org/apache/jetspeed/prefs/TestNodePreferences.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/test/java/org/apache/jetspeed/prefs/TestNodePreferences.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/test/java/org/apache/jetspeed/prefs/TestNodePreferences.java Mon Mar 31 14:30:38 2008
@@ -36,15 +36,7 @@
     public void setUp() throws Exception
     {
         super.setUp();      
-        provider = (PreferencesProvider) ctx.getBean("prefsProvider");        
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    public void tearDown() throws Exception
-    {
-        super.tearDown();
+        provider = (PreferencesProvider) scm.getComponent("prefsProvider");        
     }
 
     /**

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/test/java/org/apache/jetspeed/prefs/TestPreferences.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/test/java/org/apache/jetspeed/prefs/TestPreferences.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/test/java/org/apache/jetspeed/prefs/TestPreferences.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/test/java/org/apache/jetspeed/prefs/TestPreferences.java Mon Mar 31 14:30:38 2008
@@ -47,14 +47,6 @@
     }
 
     /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    public void tearDown() throws Exception
-    {
-        super.tearDown();
-    }
-
-    /**
      * @return The test suite.
      */
     public static Test suite()

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/test/java/org/apache/jetspeed/prefs/TestPreferencesNoPropManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/test/java/org/apache/jetspeed/prefs/TestPreferencesNoPropManager.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/test/java/org/apache/jetspeed/prefs/TestPreferencesNoPropManager.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/test/java/org/apache/jetspeed/prefs/TestPreferencesNoPropManager.java Mon Mar 31 14:30:38 2008
@@ -50,14 +50,6 @@
 
     }
 
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    public void tearDown() throws Exception
-    {
-        super.tearDown();
-    }
-
     protected void clearChildren(Preferences node) throws Exception
     {
         String[] names = node.childrenNames();

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/test/java/org/apache/jetspeed/prefs/TestPreferencesProvider.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/test/java/org/apache/jetspeed/prefs/TestPreferencesProvider.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/test/java/org/apache/jetspeed/prefs/TestPreferencesProvider.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-prefs/src/test/java/org/apache/jetspeed/prefs/TestPreferencesProvider.java Mon Mar 31 14:30:38 2008
@@ -43,19 +43,11 @@
     public void setUp() throws Exception
     {
         super.setUp();
-        provider = (PreferencesProvider) ctx.getBean("prefsProvider");
+        provider = (PreferencesProvider) scm.getComponent("prefsProvider");
 
         // Make sure we are starting with a clean slate
         clearChildren(Preferences.userRoot());
         clearChildren(Preferences.systemRoot());
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    public void tearDown() throws Exception
-    {
-        super.tearDown();
     }
 
     /**

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/pom.xml?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/pom.xml Mon Mar 31 14:30:38 2008
@@ -113,7 +113,7 @@
                                 <resources>
                                     <resource>
                                         <path>assembly</path>
-                                        <include>profiler.xml,transaction.xml,security-*.xml</include>
+                                        <include>profiler.xml,transaction.xml,prefs.xml,cache.xml,security-*.xml</include>
                                     </resource>
                                     <resource>
                                         <path>db-ojb</path>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/src/test/java/org/apache/jetspeed/profiler/TestProfiler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/src/test/java/org/apache/jetspeed/profiler/TestProfiler.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/src/test/java/org/apache/jetspeed/profiler/TestProfiler.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-profiler/src/test/java/org/apache/jetspeed/profiler/TestProfiler.java Mon Mar 31 14:30:38 2008
@@ -27,7 +27,6 @@
 import javax.security.auth.Subject;
 
 import junit.framework.Test;
-import junit.framework.TestSuite;
 
 import org.apache.jetspeed.components.util.DatasourceEnabledSpringTestCase;
 import org.apache.jetspeed.mockobjects.request.MockRequestContext;
@@ -66,16 +65,6 @@
         TEST_PROPS.put("profilingRule.impl", "org.apache.jetspeed.profiler.rules.impl.AbstractProfilingRule");
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception
-    {
-        super.tearDown();
-    }
-
     /**
      * Start the tests.
      * 
@@ -92,18 +81,17 @@
     protected void setUp() throws Exception
     {
         super.setUp();
-        this.profiler = (Profiler) ctx.getBean("profiler");
-        JetspeedProfilerImpl profilerImpl = (JetspeedProfilerImpl) ctx.getBean("profilerImpl");
+        this.profiler = (Profiler) scm.getComponent("profiler");
+        JetspeedProfilerImpl profilerImpl = (JetspeedProfilerImpl)scm.getComponent("profilerImpl");
         assertNotNull("profiler not found ", profiler);
-        ProfileResolvers resolvers = (ProfileResolvers) ctx.getBean("ProfileResolvers");
+        ProfileResolvers resolvers = (ProfileResolvers)scm.getComponent("ProfileResolvers");
         assertNotNull("resolvers not found ", resolvers);
         profilerImpl.setDefaultRule(JetspeedProfilerImpl.DEFAULT_RULE);
     }
 
     public static Test suite()
     {
-        // All methods starting with "test" will be executed in the test suite.
-        return new TestSuite(TestProfiler.class);
+        return createFixturedTestSuite(TestProfiler.class, "firstTestSetup", "lastTestTeardown");
     }
 
     private static final String DEFAULT_RULE = "j1";
@@ -133,17 +121,19 @@
     };
 
     
-    /**
-     * First test defined is used to setup the data(base)
-     * <b>DO NOT ADD TESTS ABOVE THIS ONE</b>
-     * 
-     */
-    public void testSetup() throws Exception
+    public void firstTestSetup() throws Exception
     {
-        System.out.println("testSetup");
-        JetspeedSerializer serializer = (JetspeedSerializer)ctx.getBean("serializer");
+        System.out.println("firstTestSetup");
+        JetspeedSerializer serializer = (JetspeedSerializer)scm.getComponent("serializer");
+        serializer.deleteData();
+        serializer.importData(getBaseDir()+"target/test-classes/j2-seed.xml");
+    }
+    
+    public void lastTestTeardown() throws Exception
+    {
+        System.out.println("lastTestTeardown");
+        JetspeedSerializer serializer = (JetspeedSerializer)scm.getComponent("serializer");
         serializer.deleteData();
-        serializer.importData("target/test-classes/j2-seed.xml");
     }
     
     public void testUserRoleFallback() 
@@ -532,7 +522,7 @@
 
     protected String[] getConfigurations()
     {
-        return new String[] { "profiler.xml", "transaction.xml", "serializer.xml", "security-providers.xml",
+        return new String[] { "profiler.xml", "transaction.xml", "serializer.xml", "security-providers.xml", "prefs.xml", "cache.xml",
                 "security-managers.xml", "security-spi.xml", "security-spi-atn.xml", "security-spi-atz.xml", "security-atz.xml" };
     }
 
@@ -720,17 +710,5 @@
         }
         assertTrue("didnt find expected number of standard rules, expected = " + EXPECTED_STANDARD, standardCount == 1);
         assertTrue("didnt find expected number of fallback rules, expected = " + EXPECTED_FALLBACK, fallbackCount == 1);
-    }
-    
-
-    /**
-     * Last test defined is used to cleanup the data(base)
-     * <b>DO NOT ADD TESTS BELOW THIS ONE</b>
-     */
-    public void testTeardown() throws Exception
-    {
-        System.out.println("testTeardown");
-        JetspeedSerializer serializer = (JetspeedSerializer)ctx.getBean("serializer");
-        serializer.deleteData();
     }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/jndi/JetspeedTestJNDIComponent.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/jndi/JetspeedTestJNDIComponent.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/jndi/JetspeedTestJNDIComponent.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/jndi/JetspeedTestJNDIComponent.java Mon Mar 31 14:30:38 2008
@@ -38,10 +38,10 @@
     public void setup() throws Exception
     {
         jndi = new TyrexJNDIComponent();
-        String url = System.getProperty("org.apache.jetspeed.test.database.url");
-        String driver = System.getProperty("org.apache.jetspeed.test.database.driver");
-        String user = System.getProperty("org.apache.jetspeed.test.database.user");
-        String password = System.getProperty("org.apache.jetspeed.test.database.password");
+        String url = System.getProperty("org.apache.jetspeed.database.url");
+        String driver = System.getProperty("org.apache.jetspeed.database.driver");
+        String user = System.getProperty("org.apache.jetspeed.database.user");
+        String password = System.getProperty("org.apache.jetspeed.database.password");
         datasourceComponent = new BoundDBCPDatasourceComponent(user, password, driver, url, 20, 5000,
                 GenericObjectPool.WHEN_EXHAUSTED_GROW, true, JNDI_DS_NAME, jndi);
         datasourceComponent.start();
@@ -49,6 +49,7 @@
     
     public void tearDown() throws Exception
     {
+        datasourceComponent.stop();
         jndi.unbindFromCurrentThread();
     }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/jndi/SpringJNDIStarter.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/jndi/SpringJNDIStarter.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/jndi/SpringJNDIStarter.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/jndi/SpringJNDIStarter.java Mon Mar 31 14:30:38 2008
@@ -88,7 +88,7 @@
     public void setUp() throws Exception
     {
     	setupJNDI();
-         scm = new SpringComponentManager(bootConfig, appConfig,  appRoot );
+         scm = new SpringComponentManager(null, bootConfig, appConfig,  appRoot, true );
         }
 
     public void tearDown() throws Exception

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/util/DatasourceEnabledSpringTestCase.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/util/DatasourceEnabledSpringTestCase.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/util/DatasourceEnabledSpringTestCase.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/util/DatasourceEnabledSpringTestCase.java Mon Mar 31 14:30:38 2008
@@ -49,8 +49,8 @@
      */
     protected void tearDown() throws Exception
     {
-        jndiDS.tearDown();
         super.tearDown();
+        jndiDS.tearDown();
     }
 
     protected String[] getBootConfigurations()

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/util/DatasourceTestCase.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/util/DatasourceTestCase.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/util/DatasourceTestCase.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-rdbms/src/main/java/org/apache/jetspeed/components/util/DatasourceTestCase.java Mon Mar 31 14:30:38 2008
@@ -59,10 +59,10 @@
     {
         super.setUp();
         jndi = new TyrexJNDIComponent();
-        String url = System.getProperty("org.apache.jetspeed.test.database.url");
-        String driver = System.getProperty("org.apache.jetspeed.test.database.driver");
-        String user = System.getProperty("org.apache.jetspeed.test.database.user");
-        String password = System.getProperty("org.apache.jetspeed.test.database.password");
+        String url = System.getProperty("org.apache.jetspeed.database.url");
+        String driver = System.getProperty("org.apache.jetspeed.database.driver");
+        String user = System.getProperty("org.apache.jetspeed.database.user");
+        String password = System.getProperty("org.apache.jetspeed.database.password");
         datasourceComponent = new BoundDBCPDatasourceComponent(user, password, driver, url, 20, 5000,
                 GenericObjectPool.WHEN_EXHAUSTED_GROW, true, "jetspeed", jndi);
         datasourceComponent.start();

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/util/RegistrySupportedTestCase.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/util/RegistrySupportedTestCase.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/util/RegistrySupportedTestCase.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/util/RegistrySupportedTestCase.java Mon Mar 31 14:30:38 2008
@@ -29,7 +29,6 @@
 
 import org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent;
 import org.apache.jetspeed.components.portletregistry.PortletRegistry;
-import org.apache.jetspeed.engine.JetspeedEngineConstants;
 import org.apache.jetspeed.prefs.util.test.AbstractPrefsSupportedTestCase;
 
 /**
@@ -48,8 +47,8 @@
     protected void setUp() throws Exception
     {       
         super.setUp();
-        portletRegistry = (PortletRegistry) ctx.getBean("portletRegistry");
-        entityAccess = (PortletEntityAccessComponent) ctx.getBean("portletEntityAccess");
+        portletRegistry = (PortletRegistry) scm.getComponent("portletRegistry");
+        entityAccess = (PortletEntityAccessComponent) scm.getComponent("portletEntityAccess");
     }   
     
     protected String[] getConfigurations()

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletentity/TestPortletEntityDAO.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletentity/TestPortletEntityDAO.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletentity/TestPortletEntityDAO.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletentity/TestPortletEntityDAO.java Mon Mar 31 14:30:38 2008
@@ -64,8 +64,8 @@
     protected void setUp() throws Exception
     {
         super.setUp();
-        this.registry = (PortletRegistry) ctx.getBean("portletRegistry");
-        this.entityAccess = (PersistenceBrokerPortletEntityAccess) ctx.getBean("portletEntityAccessImpl");
+        this.registry = (PortletRegistry) scm.getComponent("portletRegistry");
+        this.entityAccess = (PersistenceBrokerPortletEntityAccess) scm.getComponent("portletEntityAccessImpl");
 
         teardownTestData();
         setupTestData();
@@ -74,6 +74,7 @@
     protected void tearDown() throws Exception
     {
         teardownTestData();
+        super.tearDown();
     }
 
     public void test1() throws Exception

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/AbstractRegistryTest.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/AbstractRegistryTest.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/AbstractRegistryTest.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/AbstractRegistryTest.java Mon Mar 31 14:30:38 2008
@@ -70,22 +70,9 @@
     protected void setUp() throws Exception
     {
         super.setUp();
-        this.registry = (PortletRegistry) ctx.getBean("portletRegistry");
+        this.registry = (PortletRegistry) scm.getComponent("portletRegistry");
 
         testPasses++;
-    }
-
-    /**
-     * <p>
-     * tearDown
-     * </p>
-     * 
-     * @see junit.framework.TestCase#tearDown()
-     * @throws Exception
-     */
-    protected void tearDown() throws Exception
-    {
-        //super.tearDown();
     }
 
     protected void validateDublinCore(GenericMetadata metadata)

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java Mon Mar 31 14:30:38 2008
@@ -84,7 +84,7 @@
     protected void setUp() throws Exception
     {
         super.setUp();
-        this.portletRegistry = (PortletRegistry) ctx.getBean("portletRegistry");
+        this.portletRegistry = (PortletRegistry) scm.getComponent("portletRegistry");
 
         buildTestData();
 
@@ -100,6 +100,7 @@
         {
             portletRegistry.removeApplication((PortletApplicationDefinition) itr.next());
         }
+        super.tearDown();
     }
 
     public void test1() throws Exception

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestRegistryCache.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestRegistryCache.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestRegistryCache.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/TestRegistryCache.java Mon Mar 31 14:30:38 2008
@@ -60,7 +60,7 @@
     protected void setUp() throws Exception
     {
         super.setUp();
-        this.portletRegistry = (PortletRegistry) ctx.getBean("portletRegistry");
+        this.portletRegistry = (PortletRegistry) scm.getComponent("portletRegistry");
 
         buildTestData();
 
@@ -172,6 +172,7 @@
         {
             portletRegistry.removeApplication((PortletApplicationDefinition) itr.next());
         }
+        super.tearDown();
     }
     
     protected String[] getConfigurations()

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectAll.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectAll.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectAll.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectAll.java Mon Mar 31 14:30:38 2008
@@ -70,18 +70,6 @@
 
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception
-    {
-        //  super.tearDown();
-    }
-
- 
-
     /**
      * <p>
      * buildTestData

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart1a.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart1a.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart1a.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart1a.java Mon Mar 31 14:30:38 2008
@@ -67,18 +67,6 @@
 
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception
-    {
-        //  super.tearDown();
-    }
-
- 
-
     /**
      * <p>
      * buildTestData

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart1b.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart1b.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart1b.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart1b.java Mon Mar 31 14:30:38 2008
@@ -32,26 +32,6 @@
  */
 public class TestRegistryDirectPart1b extends AbstractRegistryTest
 {
-    /*
-     * (non-Javadoc)
-     * 
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception
-    {
-        super.setUp();                
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception
-    {
-       //  super.tearDown();
-    }
-
     public static Test suite()
     {
         // All methods starting with "test" will be executed in the test suite.

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart2a.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart2a.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart2a.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/test/java/org/apache/jetspeed/components/portletregistry/direct/TestRegistryDirectPart2a.java Mon Mar 31 14:30:38 2008
@@ -35,17 +35,6 @@
  */
 public class TestRegistryDirectPart2a extends AbstractRegistryTest
 {
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception
-    {
-        super.setUp();
-    }
-
     /*
      * (non-Javadoc)
      * 

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-rewriter/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-rewriter/pom.xml?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-rewriter/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-rewriter/pom.xml Mon Mar 31 14:30:38 2008
@@ -76,6 +76,11 @@
         
         <!-- Test Dependencies -->
         <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>jetspeed-cm</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>commons-httpclient</groupId>
             <artifactId>commons-httpclient</artifactId>
             <scope>test</scope>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-rewriter/src/test/java/org/apache/jetspeed/rewriter/TestNekoRewriter.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-rewriter/src/test/java/org/apache/jetspeed/rewriter/TestNekoRewriter.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-rewriter/src/test/java/org/apache/jetspeed/rewriter/TestNekoRewriter.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-rewriter/src/test/java/org/apache/jetspeed/rewriter/TestNekoRewriter.java Mon Mar 31 14:30:38 2008
@@ -25,9 +25,9 @@
 import org.apache.jetspeed.rewriter.html.neko.NekoParserAdaptor;
 import org.apache.jetspeed.rewriter.rules.Ruleset;
 import org.apache.jetspeed.rewriter.xml.SaxParserAdaptor;
+import org.apache.jetspeed.test.JetspeedTestCase;
 
 import junit.framework.Test;
-import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
 
@@ -37,7 +37,7 @@
  * @author <a href="mailto:dyoung@phase2systems.com">David L Young</a>
  * @version $Id:$
  */
-public class TestNekoRewriter extends TestCase
+public class TestNekoRewriter extends JetspeedTestCase
 {
 
     /**
@@ -165,7 +165,7 @@
         Class[] rewriterClasses = new Class[]{ RulesetRewriterImpl.class, RulesetRewriterImpl.class};
         
         Class[] adaptorClasses = new Class[]{ NekoParserAdaptor.class, SaxParserAdaptor.class};
-        return new JetspeedRewriterController("src/test/webapp/WEB-INF/conf/rewriter-rules-mapping.xml", Arrays.asList(rewriterClasses), Arrays.asList(adaptorClasses));
+        return new JetspeedRewriterController(getBaseDir()+"src/test/webapp/WEB-INF/conf/rewriter-rules-mapping.xml", Arrays.asList(rewriterClasses), Arrays.asList(adaptorClasses));
     }
 
     /*
@@ -188,7 +188,7 @@
      */
     private FileReader getTestReader(String filename) throws IOException
     {
-        return new FileReader("src/test/rewriter/" + filename);
+        return new FileReader(getBaseDir()+"src/test/rewriter/" + filename);
     }
 
     /**
@@ -199,8 +199,8 @@
      */
     private FileWriter getTestWriter(String filename) throws IOException
     {
-        new File("target/test/rewriter").mkdirs();
-        return new FileWriter("target/test/rewriter/" + filename);
+        new File(getBaseDir()+"target/test/rewriter").mkdirs();
+        return new FileWriter(getBaseDir()+"target/test/rewriter/" + filename);
     }
     
     

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-rewriter/src/test/java/org/apache/jetspeed/rewriter/TestRewriterController.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-rewriter/src/test/java/org/apache/jetspeed/rewriter/TestRewriterController.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-rewriter/src/test/java/org/apache/jetspeed/rewriter/TestRewriterController.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-rewriter/src/test/java/org/apache/jetspeed/rewriter/TestRewriterController.java Mon Mar 31 14:30:38 2008
@@ -28,7 +28,6 @@
 import java.util.Iterator;
 
 import junit.framework.Test;
-import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
 import org.apache.commons.httpclient.HttpClient;
@@ -39,6 +38,7 @@
 import org.apache.jetspeed.rewriter.rules.Ruleset;
 import org.apache.jetspeed.rewriter.rules.Tag;
 import org.apache.jetspeed.rewriter.xml.SaxParserAdaptor;
+import org.apache.jetspeed.test.JetspeedTestCase;
 
 /**
  * TestRewriterRules
@@ -47,7 +47,7 @@
  * @version $Id: TestRewriterController.java,v 1.3 2004/10/13 15:53:22 weaver
  *          Exp $
  */
-public class TestRewriterController extends TestCase
+public class TestRewriterController extends JetspeedTestCase
 {
 
     /**
@@ -91,7 +91,7 @@
 
         Rewriter basic = component.createRewriter();
         assertNotNull("basic rewriter is null", basic);
-        FileReader reader = new FileReader("src/test/rewriter/test-rewriter-rules.xml");
+        FileReader reader = new FileReader(getBaseDir()+"src/test/rewriter/test-rewriter-rules.xml");
         Ruleset ruleset = component.loadRuleset(reader);
         assertNotNull("ruleset is null", ruleset);
         RulesetRewriter rewriter = component.createRewriter(ruleset);
@@ -105,7 +105,7 @@
         assertNotNull("template component is null", component);
 
         assertNotNull("rewriter component is null", component);
-        FileReader reader = new FileReader("src/test/rewriter/test-rewriter-rules.xml");
+        FileReader reader = new FileReader(getBaseDir()+"src/test/rewriter/test-rewriter-rules.xml");
         Ruleset ruleset = component.loadRuleset(reader);
         assertNotNull("ruleset is null", ruleset);
         assertEquals("ruleset id", "test-set-101", ruleset.getId());
@@ -201,7 +201,7 @@
 
         assertNotNull("rewriter component is null", component);
 
-        FileReader reader = new FileReader("src/test/rewriter/test-remove-rules.xml");
+        FileReader reader = new FileReader(getBaseDir()+"src/test/rewriter/test-remove-rules.xml");
 
         Ruleset ruleset = component.loadRuleset(reader);
         reader.close();
@@ -210,7 +210,7 @@
         assertNotNull("ruleset rewriter is null", rewriter);
         assertNotNull("ruleset is null", rewriter.getRuleset());
 
-        FileReader htmlReader = new FileReader("src/test/rewriter/test-001.html");
+        FileReader htmlReader = new FileReader(getBaseDir()+"src/test/rewriter/test-001.html");
         FileWriter htmlWriter = getTestWriter("test-001-output.html");
 
         ParserAdaptor adaptor = component.createParserAdaptor("text/html");
@@ -220,7 +220,7 @@
         htmlReader.close();
 
         // validate result
-        FileReader testReader = new FileReader("target/test/rewriter/test-001-output.html");
+        FileReader testReader = new FileReader(getBaseDir()+"target/test/rewriter/test-001-output.html");
         UnitTestRewriter testRewriter = new UnitTestRewriter();
         testRewriter.parse(component.createParserAdaptor("text/html"), testReader);
         assertTrue("1st rewritten anchor: " + testRewriter.getAnchorValue("1"), testRewriter.getAnchorValue("1")
@@ -248,8 +248,8 @@
      */
     private FileWriter getTestWriter(String filename) throws IOException
     {
-        new File("target/test/rewriter").mkdirs();
-        return new FileWriter("target/test/rewriter/" + filename);
+        new File(getBaseDir()+"target/test/rewriter").mkdirs();
+        return new FileWriter(getBaseDir()+"target/test/rewriter/" + filename);
     }
 
 
@@ -263,7 +263,7 @@
         
         Class[] adaptorClasses = new Class[]
         { SwingParserAdaptor.class, SaxParserAdaptor.class};
-        return new JetspeedRewriterController("src/test/webapp/WEB-INF/conf/rewriter-rules-mapping.xml", Arrays
+        return new JetspeedRewriterController(getBaseDir()+"src/test/webapp/WEB-INF/conf/rewriter-rules-mapping.xml", Arrays
                 .asList(rewriterClasses), Arrays.asList(adaptorClasses));
     }
     
@@ -274,7 +274,7 @@
 
         assertNotNull("rewriter component is null", component);
 
-        Reader reader = new FileReader("src/test/rewriter/default-rewriter-rules.xml");
+        Reader reader = new FileReader(getBaseDir()+"src/test/rewriter/default-rewriter-rules.xml");
 
         Ruleset ruleset = component.loadRuleset(reader);
         reader.close();

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-search/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-search/pom.xml?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-search/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-search/pom.xml Mon Mar 31 14:30:38 2008
@@ -62,6 +62,14 @@
             <groupId>lucene</groupId>
             <artifactId>lucene-core</artifactId>
         </dependency>
+        
+        <!-- Test Dependencies -->
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>jetspeed-cm</artifactId>
+            <scope>test</scope>
+        </dependency>
+        
     </dependencies>
 
 </project>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-search/src/test/java/org/apache/jetspeed/search/TestSearch.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-search/src/test/java/org/apache/jetspeed/search/TestSearch.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-search/src/test/java/org/apache/jetspeed/search/TestSearch.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-search/src/test/java/org/apache/jetspeed/search/TestSearch.java Mon Mar 31 14:30:38 2008
@@ -27,19 +27,19 @@
 import org.apache.jetspeed.search.SearchResults;
 import org.apache.jetspeed.search.handlers.HandlerFactoryImpl;
 import org.apache.jetspeed.search.lucene.SearchEngineImpl;
+import org.apache.jetspeed.test.JetspeedTestCase;
 
 import junit.framework.Test;
-import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
 /**
  * @author jford
  *
  */
-public class TestSearch extends TestCase
+public class TestSearch extends JetspeedTestCase
 {
     
-    private final static String INDEX_DIRECTORY = "./target/search_index";
+    private final static String INDEX_DIRECTORY = "target/search_index";
 
     private File indexRoot;
     SearchEngine searchEngine;
@@ -56,7 +56,7 @@
             e.printStackTrace();
         }
         
-        indexRoot = new File(INDEX_DIRECTORY);
+        indexRoot = new File(getBaseDir()+INDEX_DIRECTORY);
     }
     
     /**
@@ -105,6 +105,7 @@
         }
         
         indexRoot.delete();
+        super.tearDown();
     }
     
     public void testRemoveWebPage() throws Exception

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/util/test/AbstractSecurityTestcase.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/util/test/AbstractSecurityTestcase.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/util/test/AbstractSecurityTestcase.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/util/test/AbstractSecurityTestcase.java Mon Mar 31 14:30:38 2008
@@ -91,30 +91,30 @@
         super.setUp();
 
         // SPI Security handlers.
-        securityAccess = (SecurityAccess) ctx.getBean("org.apache.jetspeed.security.spi.SecurityAccess");
-        ch =  (CredentialHandler) ctx.getBean("org.apache.jetspeed.security.spi.CredentialHandler");
-        ush = (UserSecurityHandler) ctx.getBean("org.apache.jetspeed.security.spi.UserSecurityHandler");
-        rsh = (RoleSecurityHandler) ctx.getBean("org.apache.jetspeed.security.spi.RoleSecurityHandler");
-        gsh = (GroupSecurityHandler) ctx.getBean("org.apache.jetspeed.security.spi.GroupSecurityHandler");
-        smh = (SecurityMappingHandler) ctx.getBean("org.apache.jetspeed.security.spi.SecurityMappingHandler");
+        securityAccess = (SecurityAccess) scm.getComponent("org.apache.jetspeed.security.spi.SecurityAccess");
+        ch =  (CredentialHandler) scm.getComponent("org.apache.jetspeed.security.spi.CredentialHandler");
+        ush = (UserSecurityHandler) scm.getComponent("org.apache.jetspeed.security.spi.UserSecurityHandler");
+        rsh = (RoleSecurityHandler) scm.getComponent("org.apache.jetspeed.security.spi.RoleSecurityHandler");
+        gsh = (GroupSecurityHandler) scm.getComponent("org.apache.jetspeed.security.spi.GroupSecurityHandler");
+        smh = (SecurityMappingHandler) scm.getComponent("org.apache.jetspeed.security.spi.SecurityMappingHandler");
         
         // Security Providers.        
-        AuthenticationProvider atnProvider = (AuthenticationProvider) ctx.getBean("org.apache.jetspeed.security.AuthenticationProvider");
+        AuthenticationProvider atnProvider = (AuthenticationProvider) scm.getComponent("org.apache.jetspeed.security.AuthenticationProvider");
         List atnProviders = new ArrayList();
         atnProviders.add(atnProvider);
         
        
-        AuthenticationProviderProxy atnProviderProxy = (AuthenticationProviderProxy) ctx.getBean("org.apache.jetspeed.security.AuthenticationProviderProxy");
+        AuthenticationProviderProxy atnProviderProxy = (AuthenticationProviderProxy) scm.getComponent("org.apache.jetspeed.security.AuthenticationProviderProxy");
         securityProvider = new SecurityProviderImpl(atnProviderProxy, rsh, gsh, smh);
         
-        securityProvider = (SecurityProvider) ctx.getBean("org.apache.jetspeed.security.SecurityProvider");
+        securityProvider = (SecurityProvider) scm.getComponent("org.apache.jetspeed.security.SecurityProvider");
         
-        ums = (UserManager) ctx.getBean("org.apache.jetspeed.security.UserManager");
-        gms = (GroupManager) ctx.getBean("org.apache.jetspeed.security.GroupManager");
-        rms = (RoleManager) ctx.getBean("org.apache.jetspeed.security.RoleManager");
+        ums = (UserManager) scm.getComponent("org.apache.jetspeed.security.UserManager");
+        gms = (GroupManager) scm.getComponent("org.apache.jetspeed.security.GroupManager");
+        rms = (RoleManager) scm.getComponent("org.apache.jetspeed.security.RoleManager");
                 
         // Authorization.
-        pms = (PermissionManager) ctx.getBean("org.apache.jetspeed.security.PermissionManager");
+        pms = (PermissionManager) scm.getComponent("org.apache.jetspeed.security.PermissionManager");
         
         new JetspeedActions(new String[] {"secure"}, new String[] {});
     }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/TestRdbmsPolicy.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/TestRdbmsPolicy.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/TestRdbmsPolicy.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/TestRdbmsPolicy.java Mon Mar 31 14:30:38 2008
@@ -207,7 +207,7 @@
     public void testPermissionWithSubjectInAccessControlContextAndDefaultPolicy()
     {
         System.out.println("\n\n\t\t[TestRdbmsPolicy] Test with default Policy enabled.");
-        AuthorizationProvider atzProvider = (AuthorizationProvider) ctx.getBean("org.apache.jetspeed.security.AuthorizationProvider");
+        AuthorizationProvider atzProvider = (AuthorizationProvider) scm.getComponent("org.apache.jetspeed.security.AuthorizationProvider");
         atzProvider.useDefaultPolicy(true);
         testPermissionWithSubjectInAccessControlContext();
     }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/TestUserManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/TestUserManager.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/TestUserManager.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/TestUserManager.java Mon Mar 31 14:30:38 2008
@@ -22,7 +22,6 @@
 import java.util.List;
 import java.util.ArrayList;
 import java.util.prefs.Preferences;
-import java.security.Principal;
 
 import javax.security.auth.Subject;
 import javax.security.auth.login.LoginContext;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/TestCredentialHandler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/TestCredentialHandler.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/TestCredentialHandler.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/TestCredentialHandler.java Mon Mar 31 14:30:38 2008
@@ -45,14 +45,6 @@
     }
 
     /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    public void tearDown() throws Exception
-    {
-        super.tearDown();
-    }
-
-    /**
      * <p>
      * Constructs the suite.
      * </p>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/TestGroupSecurityHandler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/TestGroupSecurityHandler.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/TestGroupSecurityHandler.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/TestGroupSecurityHandler.java Mon Mar 31 14:30:38 2008
@@ -32,25 +32,6 @@
  */
 public class TestGroupSecurityHandler extends AbstractSecurityTestcase
 {
-
-   
-
-    /**
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception
-    {
-        super.setUp();
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    public void tearDown() throws Exception
-    {
-        super.tearDown();
-    }
-
     /**
      * <p>
      * Constructs the suite.

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/TestPasswordCredentialProvider.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/TestPasswordCredentialProvider.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/TestPasswordCredentialProvider.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/TestPasswordCredentialProvider.java Mon Mar 31 14:30:38 2008
@@ -48,14 +48,6 @@
     }
 
     /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    public void tearDown() throws Exception
-    {
-        super.tearDown();
-    }
-
-    /**
      * <p>
      * Constructs the suite.
      * </p>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/TestRoleSecurityHandler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/TestRoleSecurityHandler.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/TestRoleSecurityHandler.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/TestRoleSecurityHandler.java Mon Mar 31 14:30:38 2008
@@ -36,24 +36,6 @@
  */
 public class TestRoleSecurityHandler extends AbstractSecurityTestcase
 {
-
-
-    /**
-     * @see junit.framework.TestCase#setUp()
-     */
-    protected void setUp() throws Exception
-    {
-        super.setUp();
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    public void tearDown() throws Exception
-    {
-        super.tearDown();
-    }
-
     /**
      * <p>
      * Constructs the suite.

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/AbstractLdapTest.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/AbstractLdapTest.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/AbstractLdapTest.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/AbstractLdapTest.java Mon Mar 31 14:30:38 2008
@@ -120,7 +120,7 @@
     protected void setUp() throws Exception
     {
         super.setUp();
-        LdapBindingConfig ldapConfig = (LdapBindingConfig)ctx.getBean(LdapBindingConfig.class.getName());
+        LdapBindingConfig ldapConfig = (LdapBindingConfig)scm.getComponent(LdapBindingConfig.class.getName());
         InitLdapSchema ldapSchema = new InitLdapSchema(ldapConfig);
         try
         {
@@ -156,14 +156,6 @@
         LdapDataHelper.setRoleSecurityHandler(roleHandler);
         
         secHandler = new LdapSecurityMappingHandler(ldapPrincipalDao, ldapGroupDao, ldapRoleDao);
-    }
-
-    /**
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception
-    {
-        super.tearDown();
     }
 
     protected String[] getConfigurations()

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapCredentialHandler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapCredentialHandler.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapCredentialHandler.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapCredentialHandler.java Mon Mar 31 14:30:38 2008
@@ -47,8 +47,8 @@
      */
     protected void tearDown() throws Exception
     {
-        super.tearDown();
         LdapDataHelper.removeUserData(uid1);
+        super.tearDown();
     }
 
     /**

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapGroupSecurityHandler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapGroupSecurityHandler.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapGroupSecurityHandler.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapGroupSecurityHandler.java Mon Mar 31 14:30:38 2008
@@ -42,8 +42,8 @@
      */
     protected void tearDown() throws Exception
     {
-        super.tearDown();
         LdapDataHelper.removeGroupData(gpUid1);
+        super.tearDown();
     }
 
     /**

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapRoleSecurityHandler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapRoleSecurityHandler.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapRoleSecurityHandler.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapRoleSecurityHandler.java Mon Mar 31 14:30:38 2008
@@ -42,8 +42,8 @@
      */
     protected void tearDown() throws Exception
     {
-        super.tearDown();
         LdapDataHelper.removeRoleData(roleUid1);
+        super.tearDown();
     }
 
     /**

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapSecurityMappingHandler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapSecurityMappingHandler.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapSecurityMappingHandler.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapSecurityMappingHandler.java Mon Mar 31 14:30:38 2008
@@ -78,13 +78,13 @@
      */
     protected void tearDown() throws Exception
     {
-        super.tearDown();
         LdapDataHelper.removeGroupData(gpUid1);
         LdapDataHelper.removeGroupData(gpUid2);
         LdapDataHelper.removeUserData(uid1);
         LdapDataHelper.removeUserData(uid2);
         LdapDataHelper.removeRoleData(roleUid1);
         LdapDataHelper.removeRoleData(roleUid2);
+        super.tearDown();
     }
 
     /**

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapUserCredentialDao.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapUserCredentialDao.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapUserCredentialDao.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapUserCredentialDao.java Mon Mar 31 14:30:38 2008
@@ -63,8 +63,8 @@
      */
     protected void tearDown() throws Exception
     {
-        super.tearDown();
         LdapDataHelper.removeUserData(uid1);
+        super.tearDown();
     }
 
     /**

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapUserSecurityDao.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapUserSecurityDao.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapUserSecurityDao.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapUserSecurityDao.java Mon Mar 31 14:30:38 2008
@@ -43,8 +43,8 @@
      */
     protected void tearDown() throws Exception
     {
-        super.tearDown();
         LdapDataHelper.removeUserData(uid1);
+        super.tearDown();
     }
 
     /**

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapUserSecurityHandler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapUserSecurityHandler.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapUserSecurityHandler.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/spi/ldap/TestLdapUserSecurityHandler.java Mon Mar 31 14:30:38 2008
@@ -49,8 +49,8 @@
      */
     protected void tearDown() throws Exception
     {
-        super.tearDown();
         LdapDataHelper.removeUserData(uid1);
+        super.tearDown();
     }
 
     /**

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-sso/src/test/java/org/apache/jetspeed/sso/TestSSOComponent.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-sso/src/test/java/org/apache/jetspeed/sso/TestSSOComponent.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-sso/src/test/java/org/apache/jetspeed/sso/TestSSOComponent.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-sso/src/test/java/org/apache/jetspeed/sso/TestSSOComponent.java Mon Mar 31 14:30:38 2008
@@ -77,7 +77,7 @@
 
         try
         {
-            ssoBroker = (SSOProvider) ctx.getBean("ssoProvider");
+            ssoBroker = (SSOProvider) scm.getComponent("ssoProvider");
         }
         catch (Exception ex)
         {
@@ -92,7 +92,7 @@
     public void tearDown() throws Exception
     {
         clean();
-        // super.tearDown();
+        super.tearDown();
     }
 
     public static Test suite()

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/audit/TestAuditActivity.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/audit/TestAuditActivity.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/audit/TestAuditActivity.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/audit/TestAuditActivity.java Mon Mar 31 14:30:38 2008
@@ -45,7 +45,6 @@
      */
     protected void tearDown() throws Exception
     {
-        ctx.close();
         super.tearDown();
     }
 
@@ -66,7 +65,7 @@
     {
         super.setUp();
         
-        this.audit = (AuditActivity) ctx.getBean("org.apache.jetspeed.audit.AuditActivity");
+        this.audit = (AuditActivity) scm.getComponent("org.apache.jetspeed.audit.AuditActivity");
         assertNotNull("audit activity service not found ", this.audit);
     }
     

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/statistics/TestStatistics.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/statistics/TestStatistics.java?rev=643159&r1=643158&r2=643159&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/statistics/TestStatistics.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/test/java/org/apache/jetspeed/statistics/TestStatistics.java Mon Mar 31 14:30:38 2008
@@ -52,17 +52,6 @@
 
     private PortalStatistics statistics = null;
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see junit.framework.TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception
-    {
-        ctx.close();
-        super.tearDown();
-    }
-
     /**
      * Start the tests.
      * 
@@ -80,7 +69,7 @@
     {
         super.setUp();
         
-        this.statistics = (PortalStatistics) ctx.getBean("PortalStatistics");
+        this.statistics = (PortalStatistics) scm.getComponent("PortalStatistics");
         assertNotNull("statistics not found ", statistics);
     }
 



---------------------------------------------------------------------
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