directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r890889 - /directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java
Date Tue, 15 Dec 2009 17:08:11 GMT
Author: elecharny
Date: Tue Dec 15 17:08:10 2009
New Revision: 890889

URL: http://svn.apache.org/viewvc?rev=890889&view=rev
Log:
Test for DIRSERVER-1442 fixed

Modified:
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java?rev=890889&r1=890888&r2=890889&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java
Tue Dec 15 17:08:10 2009
@@ -20,16 +20,11 @@
 package org.apache.directory.server.core.jndi;
 
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
-import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
-import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import org.junit.Test;
-import org.junit.runner.RunWith;
 
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
@@ -38,6 +33,13 @@
 import javax.naming.directory.DirContext;
 import javax.naming.ldap.LdapContext;
 
+import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.integ.CiRunner;
+import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
+import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 
 /**
  * Contributed by Luke Taylor to fix DIRSERVER-169.
@@ -198,13 +200,16 @@
         
         try
         {
-           Object obj = sysRoot.getAttributes( "cn" );
-           assertNotNull( obj );
+           Attributes result = sysRoot.getAttributes( "cn=John\\+Doe" );
+           assertNotNull( result );
+           
+           Attribute cn = result.get( "cn" );
+           assertNotNull( cn );
+           assertEquals( 1, cn.size() );
         }
         catch( Exception e )
         {
             fail( e.getMessage() );
         }
     }
-
 }



Mime
View raw message