directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r895711 - /directory/apacheds/branches/apacheds-schema/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
Date Mon, 04 Jan 2010 17:20:51 GMT
Author: seelmann
Date: Mon Jan  4 17:20:50 2010
New Revision: 895711

URL: http://svn.apache.org/viewvc?rev=895711&view=rev
Log:
Added a test change r895686

Modified:
    directory/apacheds/branches/apacheds-schema/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java

Modified: directory/apacheds/branches/apacheds-schema/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java?rev=895711&r1=895710&r2=895711&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
(original)
+++ directory/apacheds/branches/apacheds-schema/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
Mon Jan  4 17:20:50 2010
@@ -759,6 +759,33 @@
     
     
     @Test
+    public void testRenameEscaped() throws Exception
+    {
+        LdapDN dn = new LdapDN( "cn=Pivate Ryan,ou=Engineering,o=Good Times Co." );
+        dn.normalize( schemaManager.getNormalizerMapping() );
+        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, dn );
+        entry.add( "objectClass", "top", "person", "organizationalPerson" );
+        entry.add( "ou", "Engineering" );
+        entry.add( "cn",  "Private Ryan");
+        entry.add( "entryCSN", new CsnFactory( 1 ).newInstance().toString() );
+        entry.add( "entryUUID", SchemaUtils.uuidToBytes( UUID.randomUUID() ) );
+        
+        store.add( entry );
+        
+        Rdn rdn = new Rdn("sn=Ja\\+es");
+        
+        store.rename( dn, rdn, true );
+        
+        LdapDN dn2 = new LdapDN( "sn=Ja\\+es,ou=Engineering,o=Good Times Co." );
+        dn2.normalize( schemaManager.getNormalizerMapping() );
+        Long id = store.getEntryId( dn2.getNormName() );
+        assertNotNull( id );
+        ServerEntry entry2 = store.lookup( id );
+        assertEquals("Ja+es", entry2.get( "sn" ).getString());
+    }
+    
+    
+    @Test
     public void testMove() throws Exception
     {
         LdapDN childDn = new LdapDN( "cn=Pivate Ryan,ou=Engineering,o=Good Times Co." );



Mime
View raw message