directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r501181 - /directory/apacheds/branches/1.0/core-unit/src/test/java/org/apache/directory/server/core/schema/SchemaServiceITest.java
Date Mon, 29 Jan 2007 20:53:14 GMT
Author: elecharny
Date: Mon Jan 29 12:53:13 2007
New Revision: 501181

URL: http://svn.apache.org/viewvc?view=rev&rev=501181
Log:
Added a new integration test for SubSchemaSubEntry searches

Modified:
    directory/apacheds/branches/1.0/core-unit/src/test/java/org/apache/directory/server/core/schema/SchemaServiceITest.java

Modified: directory/apacheds/branches/1.0/core-unit/src/test/java/org/apache/directory/server/core/schema/SchemaServiceITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/1.0/core-unit/src/test/java/org/apache/directory/server/core/schema/SchemaServiceITest.java?view=diff&rev=501181&r1=501180&r2=501181
==============================================================================
--- directory/apacheds/branches/1.0/core-unit/src/test/java/org/apache/directory/server/core/schema/SchemaServiceITest.java
(original)
+++ directory/apacheds/branches/1.0/core-unit/src/test/java/org/apache/directory/server/core/schema/SchemaServiceITest.java
Mon Jan 29 12:53:13 2007
@@ -179,4 +179,22 @@
         assertTrue( ocs.contains( "organizationalPerson" ) );
         assertTrue( ocs.contains( "inetOrgPerson" ) );
     }
+
+    public void testSearchForSubSchemaSubEntry() throws NamingException
+    {
+        SearchControls controls = new SearchControls();
+        controls.setSearchScope( SearchControls.OBJECT_SCOPE );
+        controls.setReturningAttributes( new String[]{ "+" } );
+        
+        Map subSchemaEntry = new HashMap();
+        NamingEnumeration results = sysRoot.search( "cn=schema", "(objectClass=*)", controls
);
+
+        while ( results.hasMore() )
+        {
+            SearchResult result = ( SearchResult ) results.next();
+            subSchemaEntry.put( result.getName(), result.getAttributes() );
+        }
+
+        assertEquals( 1, subSchemaEntry.size() );
+    }
 }



Mime
View raw message