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/tools/pamanager TestPortletDescriptor.java TestJetspeedPortletDescriptor.java
Date Fri, 29 Oct 2004 14:34:18 GMT
weaver      2004/10/29 07:34:18

  Modified:    portal/src/test/org/apache/jetspeed/tools/pamanager
                        TestPortletDescriptor.java
                        TestJetspeedPortletDescriptor.java
  Log:
  using new support testcases.
  removed persistence store see: http://nagoya.apache.org/jira/browse/JS2-144
  
  Revision  Changes    Path
  1.27      +14 -26    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.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- TestPortletDescriptor.java	16 Aug 2004 18:33:30 -0000	1.26
  +++ TestPortletDescriptor.java	29 Oct 2004 14:34:17 -0000	1.27
  @@ -27,9 +27,8 @@
   import junit.framework.TestSuite;
   import junit.textui.TestRunner;
   
  -import org.apache.jetspeed.AbstractPrefsSupportedTestCase;
   import org.apache.jetspeed.cache.PortletCache;
  -import org.apache.jetspeed.components.persistence.store.PersistenceStore;
  +import org.apache.jetspeed.components.util.RegistrySupportedTestCase;
   import org.apache.jetspeed.factory.JetspeedPortletFactory;
   import org.apache.jetspeed.factory.JetspeedPortletFactoryProxy;
   import org.apache.jetspeed.om.common.MutableLanguage;
  @@ -66,19 +65,9 @@
    *
    * @version $Id$
    */
  -public class TestPortletDescriptor extends AbstractPrefsSupportedTestCase
  +public class TestPortletDescriptor extends RegistrySupportedTestCase
   {
       /**
  -     * Defines the testcase name for JUnit.
  -     *
  -     * @param name the testcase's name.
  -     */
  -    public TestPortletDescriptor(String name)
  -    {
  -        super(name);
  -    }
  -
  -    /**
        * Start the tests.
        *
        * @param args the arguments. Not used
  @@ -313,14 +302,13 @@
   
       public void testWritingToDB() throws Exception
       {
  -        PersistenceStore store = portletRegistry.getPersistenceStore();
  -        store.getTransaction().begin();
  +        
  +        
           MutablePortletApplication app = portletRegistry.getPortletApplication("HW_App");
           if (app != null)
           {
               portletRegistry.removeApplication(app);
  -            store.getTransaction().commit();
  -            store.getTransaction().begin();
  +          
           }
   
           PortletApplicationDescriptor pad = new PortletApplicationDescriptor(new FileReader("./test/testdata/deploy/portlet2.xml"),
"HW_App");
  @@ -328,14 +316,14 @@
   
           app.setName("HW_App");
   
  -        store.getTransaction().begin();
  + 
           portletRegistry.registerPortletApplication(app);
  -        store.getTransaction().commit();
  +  
           // store.invalidateAll();
   
  -        store.getTransaction().begin();
  +   
           PortletDefinition pd = portletRegistry.getPortletDefinitionByUniqueName("HW_App::PreferencePortlet");
  -        store.getTransaction().commit();
  +
           assertNotNull(pd);
   
           assertNotNull(pd.getPreferenceSet());
  @@ -354,14 +342,14 @@
   
           assertTrue(count > 0);
   
  -        store.getTransaction().begin();
  +    
           pd = portletRegistry.getPortletDefinitionByUniqueName("HW_App::PickANumberPortlet");
  -        store.getTransaction().commit();
  +        
           assertNotNull(pd);
   
  -        store.getTransaction().begin();
  +        
           portletRegistry.removeApplication(app);
  -        store.getTransaction().commit();
  +        
   
       }
   
  
  
  
  1.9       +2 -20     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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestJetspeedPortletDescriptor.java	16 Aug 2004 18:33:30 -0000	1.8
  +++ TestJetspeedPortletDescriptor.java	29 Oct 2004 14:34:18 -0000	1.9
  @@ -22,13 +22,13 @@
   import junit.framework.TestSuite;
   import junit.textui.TestRunner;
   
  -import org.apache.jetspeed.AbstractPrefsSupportedTestCase;
   import org.apache.jetspeed.cache.PortletCache;
   import org.apache.jetspeed.factory.JetspeedPortletFactory;
   import org.apache.jetspeed.factory.JetspeedPortletFactoryProxy;
   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;
   
  @@ -47,24 +47,6 @@
       private static final String PORTLET_02 = "Display the Portlet Request Information";
       private static final String PORTLET_03 = "Pick a number game";
       private static final String PORTLET_04 = "Attribute Scope Demo";
  -    
  -    /**
  -     * Defines the testcase name for JUnit.
  -     *
  -     * @param name the testcase's name.
  -     */
  -    public TestJetspeedPortletDescriptor(String name)
  -    {
  -        super(name);
  -    }
  -
  -    /**
  -     * @param arg0
  -     * @param log4jFile
  -     */
  -    public TestJetspeedPortletDescriptor(String arg0, String log4jFile) {
  -        super(arg0);
  -    }
       
       /**
        * Start the tests.
  
  
  

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