directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r985756 - /directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerLoadTest.java
Date Sun, 15 Aug 2010 21:00:59 GMT
Author: kayyagari
Date: Sun Aug 15 21:00:59 2010
New Revision: 985756

URL: http://svn.apache.org/viewvc?rev=985756&view=rev
Log:
o added a test case to test the loading of a single disabled schema
  (ignored it atm)

Modified:
    directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerLoadTest.java

Modified: directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerLoadTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerLoadTest.java?rev=985756&r1=985755&r2=985756&view=diff
==============================================================================
--- directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerLoadTest.java
(original)
+++ directory/shared/trunk/ldap-schema-manager-tests/src/test/java/org/apache/directory/shared/ldap/schema/loader/ldif/SchemaManagerLoadTest.java
Sun Aug 15 21:00:59 2010
@@ -41,6 +41,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schema.registries.Schema;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 
 
@@ -780,4 +781,21 @@ public class SchemaManagerLoadTest
         assertEquals( 0, schemaManager.getRegistries().getLoadedSchemas().size() );
         assertNull( schemaManager.getRegistries().getLoadedSchema( "dummy" ) );
     }
+    
+
+    @Ignore( "loadDisabled() method need to be fixed" )
+    @Test
+    public void testLoadDisabled() throws Exception
+    {
+        LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
+        SchemaManager schemaManager = new DefaultSchemaManager( loader );
+
+        assertTrue( schemaManager.loadDisabled( "nis" ) );
+
+        assertFalse( schemaManager.getErrors().isEmpty() );
+        
+        AttributeType at = schemaManager.getAttributeType( "uidNumber" );
+        // if nis schema was loaded then the at will not be null
+        assertNotNull( at );
+    }
 }



Mime
View raw message