Author: elecharny
Date: Thu Jul 27 16:53:10 2006
New Revision: 426330
URL: http://svn.apache.org/viewvc?rev=426330&view=rev
Log:
Added a test for DIR_SERVER-643. It seems that this is not a bug
in ApacheDS. Anyway, a new test is never a bad thing :)
Modified:
directory/branches/apacheds/optimization/server-unit/src/test/java/org/apache/directory/server/ModifyAddTest.java
Modified: directory/branches/apacheds/optimization/server-unit/src/test/java/org/apache/directory/server/ModifyAddTest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/optimization/server-unit/src/test/java/org/apache/directory/server/ModifyAddTest.java?rev=426330&r1=426329&r2=426330&view=diff
==============================================================================
--- directory/branches/apacheds/optimization/server-unit/src/test/java/org/apache/directory/server/ModifyAddTest.java
(original)
+++ directory/branches/apacheds/optimization/server-unit/src/test/java/org/apache/directory/server/ModifyAddTest.java
Thu Jul 27 16:53:10 2006
@@ -262,6 +262,31 @@
}
/**
+ * Check for DIR_SERVER_643
+ *
+ * @throws NamingException
+ */
+ public void testTwoDescriptionDirServer643() throws NamingException
+ {
+ // Change description attribute
+ Attributes attrs = new BasicAttributes( true );
+ Attribute attr = new BasicAttribute( "description", "a British singer-songwriter
with an expressive four-octave voice" );
+ attr.add( "one of the most influential female artists of the twentieth century" );
+ attrs.put( attr );
+
+ ctx.modifyAttributes( RDN, DirContext.ADD_ATTRIBUTE, attrs );
+
+ // Verify, that attribute is still there, and is the only one
+ attrs = ctx.getAttributes( RDN );
+ attr = attrs.get( "description" );
+ assertNotNull( attr );
+ assertEquals( 3, attr.size() );
+ assertTrue( attr.contains( "a British singer-songwriter with an expressive four-octave
voice" ) );
+ assertTrue( attr.contains( "one of the most influential female artists of the twentieth
century" ) );
+ assertTrue( attr.contains( PERSON_DESCRIPTION ) );
+ }
+
+ /**
* Try to add a duplicate attribute value to an entry, where this attribute
* is already present (objectclass in this case). Expected behaviour is that
* the modify operation causes an error (error code 20, "Attribute or value
|