portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/deployment TestSimpleDeployment.java
Date Thu, 29 Jul 2004 15:44:48 GMT
weaver      2004/07/29 08:44:47

  Modified:    portal/src/test/org/apache/jetspeed/tools/pamanager
                        TestPortletDescriptorSecurityRoles.java
                        TestPortletDescriptor.java
                        TestJetspeedPortletDescriptor.java
               portal/src/test/org/apache/jetspeed/deployment
                        TestSimpleDeployment.java
  Added:       portal/src/test/org/apache/jetspeed
                        AbstractPrefsSupportedTestCase.java
  Log:
  Fixed an issue with certain SDK versions failing to do to attempts to use java.util.prefs.FileSystemPrefs
  (on Linux were the user does not have write access to the SDK install dir).  Just use our
prefs impl instead.
  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/AbstractPrefsSupportedTestCase.java
  
  Index: AbstractPrefsSupportedTestCase.java
  ===================================================================
  /*
   * Copyright 2000-2001,2004 The Apache Software Foundation.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   * 
   *      http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  package org.apache.jetspeed;
  
  import org.apache.jetspeed.components.util.RegistrySupportedTestCase;
  import org.apache.jetspeed.prefs.impl.PreferencesProviderImpl;
  import org.apache.jetspeed.prefs.impl.PropertyManagerImpl;
  
  /**
   * <p>
   * AbstractPrefsSupportedTestCase
   * </p>
   * <p>
   *
   * </p>
   * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
   * @version $Id: AbstractPrefsSupportedTestCase.java,v 1.1 2004/07/29 15:44:47 weaver Exp
$
   *
   */
  public class AbstractPrefsSupportedTestCase extends RegistrySupportedTestCase
  {
  
      /**
       * 
       */
      public AbstractPrefsSupportedTestCase()
      {
          super();    
      }
  
      /**
       * @param arg0
       */
      public AbstractPrefsSupportedTestCase( String arg0 )
      {
          super(arg0);
      }
  
      protected void setUp() throws Exception
      {
          super.setUp();
          PropertyManagerImpl pms = new PropertyManagerImpl(persistenceStore);
          PreferencesProviderImpl provider = new PreferencesProviderImpl(persistenceStore,
"org.apache.jetspeed.prefs.impl.PreferencesFactoryImpl", false);
      }
  
  }
  
  
  
  1.9       +2 -2      jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/tools/pamanager/TestPortletDescriptorSecurityRoles.java
  
  Index: TestPortletDescriptorSecurityRoles.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/tools/pamanager/TestPortletDescriptorSecurityRoles.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestPortletDescriptorSecurityRoles.java	9 Jul 2004 18:30:45 -0000	1.8
  +++ TestPortletDescriptorSecurityRoles.java	29 Jul 2004 15:44:47 -0000	1.9
  @@ -21,7 +21,7 @@
   import junit.framework.TestSuite;
   import junit.textui.TestRunner;
   
  -import org.apache.jetspeed.components.util.RegistrySupportedTestCase;
  +import org.apache.jetspeed.AbstractPrefsSupportedTestCase;
   import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
   import org.apache.jetspeed.om.common.servlet.MutableWebApplication;
   import org.apache.jetspeed.om.servlet.impl.SecurityRoleImpl;
  @@ -42,7 +42,7 @@
    * @version $Id: TestPortletDescriptorSecurityRoles.java,v 1.4 2004/05/27
    *                19:57:24 weaver Exp $
    */
  -public class TestPortletDescriptorSecurityRoles extends RegistrySupportedTestCase
  +public class TestPortletDescriptorSecurityRoles extends AbstractPrefsSupportedTestCase
   {
   
       /**
  
  
  
  1.25      +3 -3      jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/tools/pamanager/TestPortletDescriptor.java
  
  Index: TestPortletDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/tools/pamanager/TestPortletDescriptor.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- TestPortletDescriptor.java	9 Jul 2004 18:30:45 -0000	1.24
  +++ TestPortletDescriptor.java	29 Jul 2004 15:44:47 -0000	1.25
  @@ -27,8 +27,8 @@
   import junit.framework.TestSuite;
   import junit.textui.TestRunner;
   
  +import org.apache.jetspeed.AbstractPrefsSupportedTestCase;
   import org.apache.jetspeed.components.persistence.store.PersistenceStore;
  -import org.apache.jetspeed.components.util.RegistrySupportedTestCase;
   import org.apache.jetspeed.om.common.MutableLanguage;
   import org.apache.jetspeed.om.common.ParameterComposite;
   import org.apache.jetspeed.om.common.UserAttribute;
  @@ -63,7 +63,7 @@
    *
    * @version $Id$
    */
  -public class TestPortletDescriptor extends RegistrySupportedTestCase
  +public class TestPortletDescriptor extends AbstractPrefsSupportedTestCase
   {
       /**
        * Defines the testcase name for JUnit.
  
  
  
  1.7       +3 -12     jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/tools/pamanager/TestJetspeedPortletDescriptor.java
  
  Index: TestJetspeedPortletDescriptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/tools/pamanager/TestJetspeedPortletDescriptor.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestJetspeedPortletDescriptor.java	29 Jul 2004 15:18:04 -0000	1.6
  +++ TestJetspeedPortletDescriptor.java	29 Jul 2004 15:44:47 -0000	1.7
  @@ -22,12 +22,10 @@
   import junit.framework.TestSuite;
   import junit.textui.TestRunner;
   
  -import org.apache.jetspeed.components.util.RegistrySupportedTestCase;
  +import org.apache.jetspeed.AbstractPrefsSupportedTestCase;
   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.impl.PreferencesProviderImpl;
  -import org.apache.jetspeed.prefs.impl.PropertyManagerImpl;
   import org.apache.jetspeed.util.descriptor.ExtendedPortletMetadata;
   import org.apache.jetspeed.util.descriptor.PortletApplicationDescriptor;
   
  @@ -40,7 +38,7 @@
    * @version $Id$
    */
   public class TestJetspeedPortletDescriptor
  -    extends RegistrySupportedTestCase {
  +    extends AbstractPrefsSupportedTestCase {
       
       private static final String PORTLET_01 = "HelloWorld Portlet";
       private static final String PORTLET_02 = "Display the Portlet Request Information";
  @@ -132,13 +130,6 @@
           
           assertEquals( ((JetspeedServiceReference)services[0]).getName(), "PortletRegistryComponent");
           assertEquals( ((JetspeedServiceReference)services[1]).getName(), "PortletEntityAccessComponent");
  -    }
  -    
  -    protected void setUp() throws Exception
  -    {
  -        super.setUp();
  -        PropertyManagerImpl pms = new PropertyManagerImpl(persistenceStore);
  -        PreferencesProviderImpl provider = new PreferencesProviderImpl(persistenceStore,
"org.apache.jetspeed.prefs.impl.PreferencesFactoryImpl", false);
       }
   
   }
  
  
  
  1.14      +4 -9      jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/deployment/TestSimpleDeployment.java
  
  Index: TestSimpleDeployment.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/deployment/TestSimpleDeployment.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- TestSimpleDeployment.java	9 Jul 2004 18:30:19 -0000	1.13
  +++ TestSimpleDeployment.java	29 Jul 2004 15:44:47 -0000	1.14
  @@ -15,7 +15,6 @@
   import java.util.ArrayList;
   import java.util.Iterator;
   import java.util.List;
  -import java.util.prefs.Preferences;
   
   import javax.portlet.Portlet;
   
  @@ -23,8 +22,8 @@
   import junit.framework.Test;
   import junit.framework.TestSuite;
   
  +import org.apache.jetspeed.AbstractPrefsSupportedTestCase;
   import org.apache.jetspeed.components.portletentity.PortletEntityNotStoredException;
  -import org.apache.jetspeed.components.util.RegistrySupportedTestCase;
   import org.apache.jetspeed.container.window.PortletWindowAccessor;
   import org.apache.jetspeed.container.window.impl.PortletWindowAccessorImpl;
   import org.apache.jetspeed.deployment.impl.DeployDecoratorEventListener;
  @@ -54,7 +53,7 @@
    * @version $Id$
    *  
    */
  -public class TestSimpleDeployment extends RegistrySupportedTestCase
  +public class TestSimpleDeployment extends AbstractPrefsSupportedTestCase
   {
       protected static final String TEST_PORTLET_APP_NAME = "HW_App";
       protected String webAppsDir;
  @@ -384,11 +383,7 @@
               testDb = new File("./test/db/hsql/Registry").getCanonicalPath();          

               
               copyDeployables();
  -            windowAccess = new PortletWindowAccessorImpl(entityAccess);   
  -            
  -            PropertyManagerImpl pms = new PropertyManagerImpl(persistenceStore);
  -            PreferencesProviderImpl provider = new PreferencesProviderImpl(persistenceStore,
"org.apache.jetspeed.prefs.impl.PreferencesFactoryImpl", false);
  -            
  +            windowAccess = new PortletWindowAccessorImpl(entityAccess);  
   
           }
           catch (Exception e)
  
  
  

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


Mime
View raw message