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 2009/12/15 18:08:11 UTC
svn commit: r890889 -
/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java
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() );
}
}
-
}