directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r603766 - /directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/ModifyRdnTest.java
Date Wed, 12 Dec 2007 23:00:07 GMT
Author: seelmann
Date: Wed Dec 12 15:00:06 2007
New Revision: 603766

URL: http://svn.apache.org/viewvc?rev=603766&view=rev
Log:
Uncommented test for DIRSERVER-1096

Modified:
    directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/ModifyRdnTest.java

Modified: directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/ModifyRdnTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/ModifyRdnTest.java?rev=603766&r1=603765&r2=603766&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/ModifyRdnTest.java
(original)
+++ directory/apacheds/branches/bigbang/server-unit/src/test/java/org/apache/directory/server/ModifyRdnTest.java
Wed Dec 12 15:00:06 2007
@@ -443,13 +443,13 @@
 
     /**
      * Test for DIRSERVER-1096.
-     * Modify the RDN of an entry with an encoded new RDN. 
-     * Ensure that the attribute itself contains the unencoded value.
+     * Modify the RDN of an entry with an escaped new RDN. 
+     * Ensure that the attribute itself contains the not-escaped value.
      *
      * @throws Exception
      */
-    /*
-    @Test public void testModifyRdnWithEncodedNewRdn() throws Exception
+    @Test
+    public void testModifyRdnWithEncodedNewRdn() throws Exception
     {
         // Create a person, cn value is rdn
         String cnVal = "Tori Amos";
@@ -458,11 +458,13 @@
         Attributes attributes = this.getPersonAttributes( snVal, cnVal );
         ctx.createSubcontext( oldRdn, attributes );
 
-        // modify Rdn from cn=Tori Amos to cn=Ä\+
+        // modify Rdn from cn=Tori Amos to cn=<A Umlaut>\+
         String newCnVal = new String( new byte[]
-             { ( byte ) 0xC3, ( byte ) 0x84, '\\', '+' }, "UTF-8" );
+            { ( byte ) 0xC3, ( byte ) 0x84, '+' }, "UTF-8" );
+        String newCnEscapedVal = new String( new byte[]
+            { ( byte ) 0xC3, ( byte ) 0x84, '\\', '+' }, "UTF-8" );
         ctx.addToEnvironment( "java.naming.ldap.deleteRDN", "true" );
-        String newRdn = "cn=" + newCnVal;
+        String newRdn = "cn=" + newCnEscapedVal;
         ctx.rename( oldRdn, newRdn );
 
         // Check, whether old Entry does not exists
@@ -475,7 +477,7 @@
         {
             // expected behaviour
         }
-        
+
         // Check, whether new Entry exists
         DirContext newCtx = ( DirContext ) ctx.lookup( newRdn );
         assertNotNull( newCtx );
@@ -488,7 +490,6 @@
         // Remove entry (use new rdn)
         ctx.unbind( newRdn );
     }
-    */
 
 }
 



Mime
View raw message