You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2012/10/08 00:53:06 UTC
svn commit: r1395415 -
/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ListIT.java
Author: elecharny
Date: Sun Oct 7 22:53:06 2012
New Revision: 1395415
URL: http://svn.apache.org/viewvc?rev=1395415&view=rev
Log:
Removed some spurious System.out.println
Modified:
directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ListIT.java
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ListIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ListIT.java?rev=1395415&r1=1395414&r2=1395415&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ListIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/ListIT.java Sun Oct 7 22:53:06 2012
@@ -25,6 +25,7 @@ import static org.apache.directory.serve
import static org.apache.directory.server.core.integ.IntegrationUtils.getUserAddLdif;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
import java.util.HashSet;
@@ -107,19 +108,25 @@ public class ListIT extends AbstractLdap
HashSet<String> set = new HashSet<String>();
NamingEnumeration<NameClassPair> list = sysRoot.list( "" );
+ int nbRead = 0;
+
while ( list.hasMore() )
{
NameClassPair ncp = list.next();
set.add( ncp.getName() );
-
- System.out.println( ncp.getName() );
+ nbRead++;
}
assertTrue( set.contains( "uid=admin,ou=system" ) );
assertTrue( set.contains( "ou=users,ou=system" ) );
assertTrue( set.contains( "ou=groups,ou=system" ) );
+ assertTrue( set.contains( "prefNodeName=sysPrefRoot,ou=system" ) );
+ assertTrue( set.contains( "ou=configuration,ou=system" ) );
+
+ assertEquals( 5, nbRead );
- System.out.println( "--------------------" );
+ // Again with a SUBTREE scope
+ nbRead = 0;
SearchControls sc = new SearchControls();
sc.setSearchScope( SearchControls.SUBTREE_SCOPE );
@@ -127,10 +134,11 @@ public class ListIT extends AbstractLdap
while ( ne.hasMoreElements() )
{
- SearchResult sr = ne.nextElement();
-
- System.out.println( sr.getName() );
+ ne.nextElement();
+ nbRead++;
}
+
+ assertEquals( 10, nbRead );
}