directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r649611 - in /directory/sandbox/akarasulu/bigbang/apacheds: xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceCursorTest.java xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java
Date Fri, 18 Apr 2008 17:02:24 GMT
Author: akarasulu
Date: Fri Apr 18 10:02:07 2008
New Revision: 649611

URL: http://svn.apache.org/viewvc?rev=649611&view=rev
Log:
fixing PresenceCursor tests and adding organizationName attribute to test DIT

Modified:
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceCursorTest.java
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java

Modified: directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceCursorTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceCursorTest.java?rev=649611&r1=649610&r2=649611&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceCursorTest.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceCursorTest.java
Fri Apr 18 10:02:07 2008
@@ -135,7 +135,13 @@
         assertTrue( cursor.next() );
         assertEquals( 6, ( long ) cursor.get().getId() );
         assertTrue( cursor.next() );
-        assertEquals( 7, ( long ) cursor.get().getId() );
+        assertEquals( 8, ( long ) cursor.get().getId() );
+        assertTrue( cursor.next() );
+        assertEquals( 9, ( long ) cursor.get().getId() );
+        assertTrue( cursor.next() );
+        assertEquals( 10, ( long ) cursor.get().getId() );
+        assertTrue( cursor.next() );
+        assertEquals( 11, ( long ) cursor.get().getId() );
         assertFalse( cursor.next() );
 
         node = new PresenceNode( SchemaConstants.OU_AT_OID );
@@ -155,6 +161,12 @@
         assertEquals( 6, ( long ) cursor.get().getId() );
         assertTrue( cursor.next() );
         assertEquals( 7, ( long ) cursor.get().getId() );
+        assertTrue( cursor.next() );
+        assertEquals( 8, ( long ) cursor.get().getId() );
+        assertTrue( cursor.next() );
+        assertEquals( 9, ( long ) cursor.get().getId() );
+        assertTrue( cursor.next() );
+        assertEquals( 11, ( long ) cursor.get().getId() );
         assertFalse( cursor.next() );
     }
 
@@ -168,11 +180,11 @@
 
         cursor.beforeFirst();
         assertTrue( cursor.next() );
-        assertEquals( 5, ( long ) cursor.get().getId() );
+        assertEquals( 8, ( long ) cursor.get().getId() );
         assertTrue( cursor.next() );
         assertEquals( 6, ( long ) cursor.get().getId() );
         assertTrue( cursor.next() );
-        assertEquals( 7, ( long ) cursor.get().getId() );
+        assertEquals( 5, ( long ) cursor.get().getId() );
         assertFalse( cursor.next() );
 
         node = new PresenceNode( SchemaConstants.O_AT_OID );

Modified: directory/sandbox/akarasulu/bigbang/apacheds/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java?rev=649611&r1=649610&r2=649611&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java
Fri Apr 18 10:02:07 2008
@@ -66,12 +66,14 @@
         
         DefaultServerEntry contextEntry = new DefaultServerEntry( registries, new LdapDN(
"o=Good Times Co." ) );
         contextEntry.add( "objectClass", "organization" );
+        contextEntry.add( "o", "Good Times Co." );
         store.setContextEntry( contextEntry );
         
         AttributeTypeRegistry attributeRegistry = registries.getAttributeTypeRegistry();
         
         store.init( registries.getOidRegistry(), attributeRegistry );
-        
+
+        // Entry #2
         LdapDN dn = new LdapDN( "ou=Sales,o=Good Times Co." );
         dn.normalize( attributeRegistry.getNormalizerMapping() );
         DefaultServerEntry entry = new DefaultServerEntry( registries, dn );
@@ -79,6 +81,7 @@
         entry.add( "ou", "Sales" );
         store.add( dn, ServerEntryUtils.toAttributesImpl( entry ) );
 
+        // Entry #3
         dn = new LdapDN( "ou=Board of Directors,o=Good Times Co." );
         dn.normalize( attributeRegistry.getNormalizerMapping() );
         entry = new DefaultServerEntry( registries, dn );
@@ -86,6 +89,7 @@
         entry.add( "ou", "Board of Directors" );
         store.add( dn, ServerEntryUtils.toAttributesImpl( entry ) );
         
+        // Entry #4
         dn = new LdapDN( "ou=Engineering,o=Good Times Co." );
         dn.normalize( attributeRegistry.getNormalizerMapping() );
         entry = new DefaultServerEntry( registries, dn );
@@ -93,23 +97,27 @@
         entry.add( "ou", "Engineering" );
         store.add( dn, ServerEntryUtils.toAttributesImpl( entry ) );
         
+        // Entry #5
         dn = new LdapDN( "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
         dn.normalize( attributeRegistry.getNormalizerMapping() );
         entry = new DefaultServerEntry( registries, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Sales" );
-        entry.add( "cn",  "JOhnny WAlkeR");
+        entry.add( "cn", "JOhnny WAlkeR");
+        entry.add( "sn", "WAlkeR");
         store.add( dn, ServerEntryUtils.toAttributesImpl( entry ) );
         
+        // Entry #6
         dn = new LdapDN( "cn=JIM BEAN,ou=Sales,o=Good Times Co." );
         dn.normalize( attributeRegistry.getNormalizerMapping() );
         entry = new DefaultServerEntry( registries, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Sales" );
         entry.add( "cn",  "JIM BEAN");
+        entry.add( "surName", "BEAN");
         store.add( dn, ServerEntryUtils.toAttributesImpl( entry ) );
-        
-        
+
+        // Entry #7
         dn = new LdapDN( "ou=Apache,ou=Board of Directors,o=Good Times Co." );
         dn.normalize( attributeRegistry.getNormalizerMapping() );
         entry = new DefaultServerEntry( registries, dn );
@@ -117,15 +125,19 @@
         entry.add( "ou", "Apache" );
         store.add( dn, ServerEntryUtils.toAttributesImpl( entry ) );
         
+        // Entry #8
         dn = new LdapDN( "cn=Jack Daniels,ou=Engineering,o=Good Times Co." );
         dn.normalize( attributeRegistry.getNormalizerMapping() );
         entry = new DefaultServerEntry( registries, dn );
         entry.add( "objectClass", "top", "person", "organizationalPerson" );
         entry.add( "ou", "Engineering" );
         entry.add( "cn",  "Jack Daniels");
+        entry.add( "SN",  "Daniels");
         store.add( dn, ServerEntryUtils.toAttributesImpl( entry ) );
 
-        // aliases
+        // aliases -------------
+
+        // Entry #9
         dn = new LdapDN( "commonName=Jim Bean,ou=Apache,ou=Board of Directors,o=Good Times
Co." );
         dn.normalize( attributeRegistry.getNormalizerMapping() );
         entry = new DefaultServerEntry( registries, dn );
@@ -135,6 +147,7 @@
         entry.add( "aliasedObjectName", "cn=Jim Bean,ou=Sales,o=Good Times Co." );
         store.add( dn, ServerEntryUtils.toAttributesImpl( entry ) );
 
+        // Entry #10
         dn = new LdapDN( "commonName=Jim Bean,ou=Board of Directors,o=Good Times Co." );
         dn.normalize( attributeRegistry.getNormalizerMapping() );
         entry = new DefaultServerEntry( registries, dn );
@@ -143,6 +156,7 @@
         entry.add( "aliasedObjectName", "cn=Jim Bean,ou=Sales,o=Good Times Co." );
         store.add( dn, ServerEntryUtils.toAttributesImpl( entry ) );
 
+        // Entry #11
         dn = new LdapDN( "2.5.4.3=Johnny Walker,ou=Engineering,o=Good Times Co." );
         dn.normalize( attributeRegistry.getNormalizerMapping() );
         entry = new DefaultServerEntry( registries, dn );



Mime
View raw message