directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r189964 [2/2] - in /directory/apacheds/branches/direve-158/core: ./ src/main/java/org/apache/ldap/server/ src/main/java/org/apache/ldap/server/authn/ src/main/java/org/apache/ldap/server/configuration/ src/main/java/org/apache/ldap/server/interceptor/ src/main/java/org/apache/ldap/server/jndi/ src/main/java/org/apache/ldap/server/schema/bootstrap/ src/test/org/apache/ldap/server/authn/ src/test/org/apache/ldap/server/interceptor/ src/test/org/apache/ldap/server/jndi/ src/test/org/apache/ldap/server/prefs/ src/test/org/apache/ldap/server/schema/bootstrap/
Date Fri, 10 Jun 2005 14:22:48 GMT
Modified: directory/apacheds/branches/direve-158/core/src/test/org/apache/ldap/server/prefs/ServerSystemPreferencesTest.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/direve-158/core/src/test/org/apache/ldap/server/prefs/ServerSystemPreferencesTest.java?rev=189964&r1=189963&r2=189964&view=diff
==============================================================================
--- directory/apacheds/branches/direve-158/core/src/test/org/apache/ldap/server/prefs/ServerSystemPreferencesTest.java
(original)
+++ directory/apacheds/branches/direve-158/core/src/test/org/apache/ldap/server/prefs/ServerSystemPreferencesTest.java
Fri Jun 10 07:22:46 2005
@@ -34,10 +34,9 @@
     /**
      * Tests to make sure the system preferences root has entry (test, abc123).
      */
-    public void testRoot() throws BackingStoreException
+    public void testRoot() throws Exception
     {
         ServerSystemPreferences prefs = new ServerSystemPreferences();
-
         assertEquals( "sysPrefRoot", prefs.get( "prefNodeName", "not the value" ) );
     }
 
@@ -50,11 +49,9 @@
     public void testCreate() throws BackingStoreException
     {
         Preferences prefs = new ServerSystemPreferences();
-
         Preferences testNode = prefs.node( "testNode" );
 
         testNode.put( "testNodeKey", "testNodeValue" );
-
         testNode.sync();
     }
 

Modified: directory/apacheds/branches/direve-158/core/src/test/org/apache/ldap/server/schema/bootstrap/BootstrapSchemaLoaderTest.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/direve-158/core/src/test/org/apache/ldap/server/schema/bootstrap/BootstrapSchemaLoaderTest.java?rev=189964&r1=189963&r2=189964&view=diff
==============================================================================
--- directory/apacheds/branches/direve-158/core/src/test/org/apache/ldap/server/schema/bootstrap/BootstrapSchemaLoaderTest.java
(original)
+++ directory/apacheds/branches/direve-158/core/src/test/org/apache/ldap/server/schema/bootstrap/BootstrapSchemaLoaderTest.java
Fri Jun 10 07:22:46 2005
@@ -17,13 +17,17 @@
 package org.apache.ldap.server.schema.bootstrap;
 
 
-import junit.framework.TestCase;
-import org.apache.ldap.common.schema.AttributeType;
-
-import javax.naming.NamingException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
+
+import javax.naming.NamingException;
+
+import junit.framework.TestCase;
+
+import org.apache.ldap.common.schema.AttributeType;
 
 
 /**
@@ -54,19 +58,19 @@
     public void testLoadAll() throws NamingException
     {
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        String[] schemaClasses = {
-            "org.apache.ldap.server.schema.bootstrap.AutofsSchema",
-            "org.apache.ldap.server.schema.bootstrap.CoreSchema",
-            "org.apache.ldap.server.schema.bootstrap.CosineSchema",
-            "org.apache.ldap.server.schema.bootstrap.CorbaSchema",
-            "org.apache.ldap.server.schema.bootstrap.ApacheSchema",
-            "org.apache.ldap.server.schema.bootstrap.InetorgpersonSchema",
-            "org.apache.ldap.server.schema.bootstrap.JavaSchema",
-            "org.apache.ldap.server.schema.bootstrap.Krb5kdcSchema",
-            "org.apache.ldap.server.schema.bootstrap.NisSchema",
-            "org.apache.ldap.server.schema.bootstrap.SystemSchema"
-        };
-        loader.load( schemaClasses, registries );
+        Set schemas = new HashSet();
+        schemas.add( new AutofsSchema() );
+        schemas.add( new CoreSchema() );
+        schemas.add( new CosineSchema() );
+        schemas.add( new CorbaSchema() );
+        schemas.add( new ApacheSchema() );
+        schemas.add( new InetorgpersonSchema() );
+        schemas.add( new JavaSchema() );
+        schemas.add( new Krb5kdcSchema() );
+        schemas.add( new NisSchema() );
+        schemas.add( new SystemSchema() );
+
+        loader.load( schemas, registries );
         AttributeType type;
 
         // from autofs.schema
@@ -153,11 +157,12 @@
     public void testEveDepsSchemaLoad() throws NamingException
     {
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        String[] schemaClasses = {
-            "org.apache.ldap.server.schema.bootstrap.ApacheSchema",
-            "org.apache.ldap.server.schema.bootstrap.SystemSchema"
-        };
-        loader.load( schemaClasses, registries );
+        
+        Set schemas = new HashSet();
+        schemas.add( new ApacheSchema() );
+        schemas.add( new SystemSchema() );
+        
+        loader.load( schemas, registries );
         AttributeType type;
         type = registries.getAttributeTypeRegistry().lookup( "apacheNdn" );
         assertNotNull( type );
@@ -193,11 +198,12 @@
     public void testCoreDepsSchemaLoad() throws NamingException
     {
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        String[] schemaClasses = {
-            "org.apache.ldap.server.schema.bootstrap.CoreSchema",
-            "org.apache.ldap.server.schema.bootstrap.SystemSchema"
-        };
-        loader.load( schemaClasses, registries );
+
+        Set schemas = new HashSet();
+        schemas.add( new CoreSchema() );
+        schemas.add( new SystemSchema() );
+        
+        loader.load( schemas, registries );
         AttributeType type;
         type = registries.getAttributeTypeRegistry().lookup( "knowledgeInformation" );
         assertNotNull( type );
@@ -233,12 +239,13 @@
     public void testJavaDepsSchemaLoad() throws NamingException
     {
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        String[] schemaClasses = {
-            "org.apache.ldap.server.schema.bootstrap.CoreSchema",
-            "org.apache.ldap.server.schema.bootstrap.JavaSchema",
-            "org.apache.ldap.server.schema.bootstrap.SystemSchema"
-        };
-        loader.load( schemaClasses, registries );
+
+        Set schemas = new HashSet();
+        schemas.add( new CoreSchema() );
+        schemas.add( new JavaSchema() );
+        schemas.add( new SystemSchema() );
+        
+        loader.load( schemas, registries );
         AttributeType type;
         type = registries.getAttributeTypeRegistry().lookup( "javaFactory" );
         assertNotNull( type );
@@ -254,13 +261,14 @@
     public void testEveAndJavaDepsSchemaLoad() throws NamingException
     {
         BootstrapSchemaLoader loader = new BootstrapSchemaLoader();
-        String[] schemaClasses = {
-            "org.apache.ldap.server.schema.bootstrap.ApacheSchema",
-            "org.apache.ldap.server.schema.bootstrap.CoreSchema",
-            "org.apache.ldap.server.schema.bootstrap.JavaSchema",
-            "org.apache.ldap.server.schema.bootstrap.SystemSchema"
-        };
-        loader.load( schemaClasses, registries );
+
+        Set schemas = new HashSet();
+        schemas.add( new ApacheSchema() );
+        schemas.add( new CoreSchema() );
+        schemas.add( new JavaSchema() );
+        schemas.add( new SystemSchema() );
+
+        loader.load( schemas, registries );
         AttributeType type;
         type = registries.getAttributeTypeRegistry().lookup( "apacheAlias" );
         assertNotNull( type );



Mime
View raw message