directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r601136 - in /directory/apacheds/branches/bigbang: core-integ/src/test/java/org/apache/directory/server/core/ core-integ/src/test/java/org/apache/directory/server/core/jndi/ core-integ/src/test/java/org/apache/directory/server/core/operatio...
Date Tue, 04 Dec 2007 22:59:18 GMT
Author: akarasulu
Date: Tue Dec  4 14:59:18 2007
New Revision: 601136

URL: http://svn.apache.org/viewvc?rev=601136&view=rev
Log:
merged preference tests and converted them along with op attr service tests

Added:
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java
  (contents, props changed)
      - copied, changed from r601129, directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/OperationalAttributeServiceIT.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/prefs/
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/prefs/PreferencesIT.java
  (contents, props changed)
      - copied, changed from r601108, directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/prefs/ServerSystemPreferencesITest.java
Removed:
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/OperationalAttributeServiceIT.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/prefs/
Modified:
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java?rev=601136&r1=601135&r2=601136&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java
Tue Dec  4 14:59:18 2007
@@ -29,6 +29,8 @@
 import org.apache.directory.server.core.integ.annotations.Mode;
 import org.apache.directory.server.core.integ.annotations.Scope;
 import org.apache.directory.server.core.jndi.*;
+import org.apache.directory.server.core.operational.OperationalAttributeServiceIT;
+import org.apache.directory.server.core.prefs.PreferencesIT;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 
@@ -61,6 +63,7 @@
         SearchContextIT.class,
         UniqueMemberIT.class,
         OperationalAttributeServiceIT.class,
+        PreferencesIT.class,
         PartitionConfigurationIT.class  // Leaves the server in a bad state (partition removal
is incomplete)
         } )
 @Scope ( ServiceScope.TESTSUITE )

Copied: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java
(from r601129, directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/OperationalAttributeServiceIT.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java?p2=directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java&p1=directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/OperationalAttributeServiceIT.java&r1=601129&r2=601136&rev=601136&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/OperationalAttributeServiceIT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java
Tue Dec  4 14:59:18 2007
@@ -17,7 +17,7 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.server.core.jndi;
+package org.apache.directory.server.core.operational;
 
 
 import org.apache.directory.server.core.DirectoryService;

Propchange: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Tue Dec  4 14:59:18 2007
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Copied: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/prefs/PreferencesIT.java
(from r601108, directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/prefs/ServerSystemPreferencesITest.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/prefs/PreferencesIT.java?p2=directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/prefs/PreferencesIT.java&p1=directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/prefs/ServerSystemPreferencesITest.java&r1=601108&r2=601136&rev=601136&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/prefs/ServerSystemPreferencesITest.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/prefs/PreferencesIT.java
Tue Dec  4 14:59:18 2007
@@ -20,12 +20,15 @@
 package org.apache.directory.server.core.prefs;
 
 
+import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.integ.CiRunner;
+import static org.junit.Assert.*;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 import java.util.prefs.BackingStoreException;
 import java.util.prefs.Preferences;
 
-import org.apache.directory.server.core.prefs.ServerSystemPreferences;
-import org.apache.directory.server.core.unit.AbstractAdminTestCase;
-
 
 /**
  * Tests the ServerSystemPreferences class.
@@ -33,23 +36,32 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class ServerSystemPreferencesITest extends AbstractAdminTestCase
+@RunWith ( CiRunner.class )
+public class PreferencesIT
 {
-    private ServerSystemPreferences prefs;
+    public static DirectoryService service;
 
 
-    public void setUp() throws Exception
+    @Test
+    public void testSystemRoot()
     {
-        super.setUp();
-        prefs = new ServerSystemPreferences( service );
+        ServerPreferencesFactory factory = new ServerPreferencesFactory( service );
+        Preferences prefs = factory.systemRoot();
+
+        assertNotNull( prefs );
+        assertEquals( "sysPrefRoot", prefs.get( "prefNodeName", "default value" ) );
     }
 
 
     /**
      * Tests to make sure the system preferences root has entry (test, abc123).
+     *
+     * @throws Exception if there are failures with the store
      */
+    @Test
     public void testRoot() throws Exception
     {
+        ServerSystemPreferences prefs = new ServerSystemPreferences( service );
         assertEquals( "sysPrefRoot", prefs.get( "prefNodeName", "not the value" ) );
     }
 
@@ -59,8 +71,10 @@
      *
      * @throws BackingStoreException if there are failures with the store
      */
+    @Test
     public void testCreate() throws BackingStoreException
     {
+        ServerSystemPreferences prefs = new ServerSystemPreferences( service );
         Preferences testNode = prefs.node( "testNode" );
 
         testNode.put( "cn", "testNodeValue" );
@@ -73,8 +87,10 @@
      *
      * @throws BackingStoreException if there are failures with the store
      */
+    @Test
     public void testCreateAndSetBoolean() throws BackingStoreException
     {
+        ServerSystemPreferences prefs = new ServerSystemPreferences( service );
         Preferences testNode = prefs.node( "testNode" );
         testNode.putBoolean( "cn", false );
         testNode.sync();
@@ -106,8 +122,10 @@
      *
      * @throws BackingStoreException if there are failures with the store
      */
+    @Test
     public void testCreateAndSetDouble() throws BackingStoreException
     {
+        ServerSystemPreferences prefs = new ServerSystemPreferences( service );
         Preferences testNode = prefs.node( "testNode" );
         testNode.putDouble( "cn", 3.14 );
         testNode.sync();
@@ -121,8 +139,10 @@
      *
      * @throws BackingStoreException if there are failures with the store
      */
+    @Test
     public void testCreateAndSetFloat() throws BackingStoreException
     {
+        ServerSystemPreferences prefs = new ServerSystemPreferences( service );
         Preferences testNode = prefs.node( "testNode" );
         testNode.putFloat( "cn", ( float ) 9.20 );
         testNode.sync();
@@ -136,8 +156,10 @@
      *
      * @throws BackingStoreException if there are failures with the store
      */
+    @Test
     public void testCreateAndSetInt() throws BackingStoreException
     {
+        ServerSystemPreferences prefs = new ServerSystemPreferences( service );
         Preferences testNode = prefs.node( "testNode" );
         testNode.putInt( "cn", 345 );
         testNode.sync();
@@ -151,8 +173,10 @@
      *
      * @throws BackingStoreException if there are failures with the store
      */
+    @Test
     public void testCreateAndSetLong() throws BackingStoreException
     {
+        ServerSystemPreferences prefs = new ServerSystemPreferences( service );
         Preferences testNode = prefs.node( "testNode" );
         testNode.putLong( "cn", 75449559185447L );
         testNode.sync();
@@ -166,8 +190,10 @@
      *
      * @throws BackingStoreException if there are failures with the store
      */
+    @Test
     public void testCreateAndRemove() throws BackingStoreException
     {
+        ServerSystemPreferences prefs = new ServerSystemPreferences( service );
         Preferences testNode = prefs.node( "testNode" );
 
         testNode.put( "cn", "testNodeValue" );

Propchange: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/prefs/PreferencesIT.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/prefs/PreferencesIT.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Tue Dec  4 14:59:18 2007
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id



Mime
View raw message