directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r939958 - /directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java
Date Sat, 01 May 2010 09:17:10 GMT
Author: seelmann
Date: Sat May  1 09:17:10 2010
New Revision: 939958

URL: http://svn.apache.org/viewvc?rev=939958&view=rev
Log:
Removed System.out, added assertion for person OC, formatting

Modified:
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java?rev=939958&r1=939957&r2=939958&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java
Sat May  1 09:17:10 2010
@@ -333,23 +333,29 @@ public class SchemaSearchIT extends Abst
     public void testSubSchemaSubEntrySearch() throws Exception
     {
         DirContext ctx = getWiredContext( ldapServer );
-        
+
         SearchControls searchControls = new SearchControls();
         searchControls.setSearchScope( SearchControls.OBJECT_SCOPE );
-        searchControls.setReturningAttributes( new String[]{ "objectClasses" } );
+        searchControls.setReturningAttributes( new String[]
+            { "objectClasses" } );
         NamingEnumeration<SearchResult> results = ctx.search( "cn=schema", "(ObjectClass=*)",
searchControls );
 
         assertTrue( results.hasMore() );
         SearchResult result = results.next();
         Attributes entry = result.getAttributes();
 
-        Attribute objectClasses = entry.get( "objectClasses" ); 
+        Attribute objectClasses = entry.get( "objectClasses" );
         NamingEnumeration<?> ocs = objectClasses.getAll();
 
         while ( ocs.hasMore() )
         {
-            String oc = (String)ocs.nextElement();
-            System.out.println( oc );
+            String oc = ( String ) ocs.nextElement();
+            if ( oc.contains( "2.5.6.6" ) )
+            {
+                assertEquals(
+                    "( 2.5.6.6 NAME 'person' DESC 'RFC2256: a person' SUP top STRUCTURAL
MUST ( sn $ cn ) MAY ( userPassword $ telephoneNumber $ seeAlso $ description ) X-SCHEMA 'core'
)",
+                    oc );
+            }
         }
 
         results.close();



Mime
View raw message