portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlest...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/spi/services/prefs TestPreferences.java
Date Thu, 12 Feb 2004 16:32:08 GMT
dlestrat    2004/02/12 08:32:08

  Modified:    portal/src/test/org/apache/jetspeed/spi/services/prefs
                        TestPreferences.java
  Log:
  Added test clean up method.
  
  Revision  Changes    Path
  1.5       +15 -0     jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/spi/services/prefs/TestPreferences.java
  
  Index: TestPreferences.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/spi/services/prefs/TestPreferences.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestPreferences.java	4 Feb 2004 21:35:24 -0000	1.4
  +++ TestPreferences.java	12 Feb 2004 16:32:08 -0000	1.5
  @@ -112,6 +112,7 @@
       public void setUp() throws Exception
       {
           super.setUp();
  +        destroyRootNodes();
           destroyPropertySetDefTestObject();
       }
   
  @@ -389,6 +390,20 @@
           catch (PropertyException pex)
           {
           }
  +    }
  +
  +    /**
  +     * <p>Destroy possible existing root nodes.</p>
  +     */
  +    protected void destroyRootNodes() throws Exception
  +    {
  +        // Remove user, group and role root nodes.
  +        Preferences groupRootPrefs = Preferences.userRoot().node("/group");
  +        groupRootPrefs.removeNode();
  +        Preferences roleRootPrefs = Preferences.userRoot().node("/role");
  +        roleRootPrefs.removeNode();
  +        Preferences userRootPrefs = Preferences.userRoot().node("/user");
  +        userRootPrefs.removeNode();
       }
   
   }
  
  
  

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