directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r357560 - /directory/apacheds/branches/DN-refactoring/core/src/test/java/org/apache/ldap/server/subtree/SubtreeEvaluatorTest.java
Date Sun, 18 Dec 2005 23:33:50 GMT
Author: elecharny
Date: Sun Dec 18 15:33:43 2005
New Revision: 357560

URL: http://svn.apache.org/viewcvs?rev=357560&view=rev
Log:
Replaced LdapName by LdapDN

Modified:
    directory/apacheds/branches/DN-refactoring/core/src/test/java/org/apache/ldap/server/subtree/SubtreeEvaluatorTest.java

Modified: directory/apacheds/branches/DN-refactoring/core/src/test/java/org/apache/ldap/server/subtree/SubtreeEvaluatorTest.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/DN-refactoring/core/src/test/java/org/apache/ldap/server/subtree/SubtreeEvaluatorTest.java?rev=357560&r1=357559&r2=357560&view=diff
==============================================================================
--- directory/apacheds/branches/DN-refactoring/core/src/test/java/org/apache/ldap/server/subtree/SubtreeEvaluatorTest.java
(original)
+++ directory/apacheds/branches/DN-refactoring/core/src/test/java/org/apache/ldap/server/subtree/SubtreeEvaluatorTest.java
Sun Dec 18 15:33:43 2005
@@ -23,7 +23,7 @@
 import org.apache.ldap.server.schema.bootstrap.*;
 import org.apache.ldap.common.subtree.SubtreeSpecificationModifier;
 import org.apache.ldap.common.subtree.SubtreeSpecification;
-import org.apache.ldap.common.name.LdapName;
+import org.apache.ldap.common.name.LdapDN;
 import org.apache.ldap.common.filter.FilterParserImpl;
 import org.apache.ldap.common.filter.FilterParser;
 import org.apache.ldap.common.filter.ExprNode;
@@ -83,16 +83,16 @@
     {
         SubtreeSpecificationModifier modifier = new SubtreeSpecificationModifier();
         SubtreeSpecification ss = modifier.getSubtreeSpecification();
-        Name apDn = new LdapName( "ou=system" );
-        Name entryDn = new LdapName( "ou=users,ou=system" );
+        Name apDn = new LdapDN( "ou=system" );
+        Name entryDn = new LdapDN( "ou=users,ou=system" );
         Attribute objectClasses = new BasicAttribute( "objectClass" );
 
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=system" );
+        entryDn = new LdapDN( "ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=abc" );
+        entryDn = new LdapDN( "ou=abc" );
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
     }
 
@@ -100,18 +100,18 @@
     public void testWithBase() throws Exception
     {
         SubtreeSpecificationModifier modifier = new SubtreeSpecificationModifier();
-        modifier.setBase( new LdapName( "ou=users" ) );
+        modifier.setBase( new LdapDN( "ou=users" ) );
         SubtreeSpecification ss = modifier.getSubtreeSpecification();
-        Name apDn = new LdapName( "ou=system" );
-        Name entryDn = new LdapName( "ou=users,ou=system" );
+        Name apDn = new LdapDN( "ou=system" );
+        Name entryDn = new LdapDN( "ou=users,ou=system" );
         Attribute objectClasses = new BasicAttribute( "objectClass" );
 
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "uid=akarasulu,ou=users,ou=system" );
+        entryDn = new LdapDN( "uid=akarasulu,ou=users,ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=system" );
+        entryDn = new LdapDN( "ou=system" );
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
     }
 
@@ -121,27 +121,27 @@
         SubtreeSpecificationModifier modifier = new SubtreeSpecificationModifier();
         modifier.setMinBaseDistance( 1 );
         modifier.setMaxBaseDistance( 3 );
-        modifier.setBase( new LdapName( "ou=users" ) );
+        modifier.setBase( new LdapDN( "ou=users" ) );
         SubtreeSpecification ss = modifier.getSubtreeSpecification();
-        Name apDn = new LdapName( "ou=system" );
-        Name entryDn = new LdapName( "ou=users,ou=system" );
+        Name apDn = new LdapDN( "ou=system" );
+        Name entryDn = new LdapDN( "ou=users,ou=system" );
         Attribute objectClasses = new BasicAttribute( "objectClass" );
 
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "uid=akarasulu,ou=users,ou=system" );
+        entryDn = new LdapDN( "uid=akarasulu,ou=users,ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=system" );
+        entryDn = new LdapDN( "ou=system" );
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
+        entryDn = new LdapDN( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = new LdapDN( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = new LdapDN( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
     }
 
@@ -150,32 +150,32 @@
     {
         SubtreeSpecificationModifier modifier = new SubtreeSpecificationModifier();
         Set chopAfter = new HashSet();
-        chopAfter.add( new LdapName( "uid=Tori Amos" ) );
-        chopAfter.add( new LdapName( "ou=twolevels,uid=akarasulu" ) );
+        chopAfter.add( new LdapDN( "uid=Tori Amos" ) );
+        chopAfter.add( new LdapDN( "ou=twolevels,uid=akarasulu" ) );
         modifier.setChopAfterExclusions( chopAfter );
         modifier.setMinBaseDistance( 1 );
         modifier.setMaxBaseDistance( 3 );
-        modifier.setBase( new LdapName( "ou=users" ) );
+        modifier.setBase( new LdapDN( "ou=users" ) );
         SubtreeSpecification ss = modifier.getSubtreeSpecification();
-        Name apDn = new LdapName( "ou=system" );
-        Name entryDn = new LdapName( "ou=users,ou=system" );
+        Name apDn = new LdapDN( "ou=system" );
+        Name entryDn = new LdapDN( "ou=users,ou=system" );
         Attribute objectClasses = new BasicAttribute( "objectClass" );
 
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "uid=akarasulu,ou=users,ou=system" );
+        entryDn = new LdapDN( "uid=akarasulu,ou=users,ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=system" );
+        entryDn = new LdapDN( "ou=system" );
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
+        entryDn = new LdapDN( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = new LdapDN( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = new LdapDN( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
     }
 
@@ -184,32 +184,32 @@
     {
         SubtreeSpecificationModifier modifier = new SubtreeSpecificationModifier();
         Set chopBefore = new HashSet();
-        chopBefore.add( new LdapName( "uid=Tori Amos" ) );
-        chopBefore.add( new LdapName( "ou=threelevels,ou=twolevels,uid=akarasulu" ) );
+        chopBefore.add( new LdapDN( "uid=Tori Amos" ) );
+        chopBefore.add( new LdapDN( "ou=threelevels,ou=twolevels,uid=akarasulu" ) );
         modifier.setChopBeforeExclusions( chopBefore );
         modifier.setMinBaseDistance( 1 );
         modifier.setMaxBaseDistance( 3 );
-        modifier.setBase( new LdapName( "ou=users" ) );
+        modifier.setBase( new LdapDN( "ou=users" ) );
         SubtreeSpecification ss = modifier.getSubtreeSpecification();
-        Name apDn = new LdapName( "ou=system" );
-        Name entryDn = new LdapName( "ou=users,ou=system" );
+        Name apDn = new LdapDN( "ou=system" );
+        Name entryDn = new LdapDN( "ou=users,ou=system" );
         Attribute objectClasses = new BasicAttribute( "objectClass" );
 
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "uid=akarasulu,ou=users,ou=system" );
+        entryDn = new LdapDN( "uid=akarasulu,ou=users,ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=system" );
+        entryDn = new LdapDN( "ou=system" );
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
+        entryDn = new LdapDN( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = new LdapDN( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = new LdapDN( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
     }
 
@@ -223,27 +223,27 @@
         modifier.setRefinement( refinement );
         modifier.setMinBaseDistance( 1 );
         modifier.setMaxBaseDistance( 3 );
-        modifier.setBase( new LdapName( "ou=users" ) );
+        modifier.setBase( new LdapDN( "ou=users" ) );
         SubtreeSpecification ss = modifier.getSubtreeSpecification();
-        Name apDn = new LdapName( "ou=system" );
-        Name entryDn = new LdapName( "ou=users,ou=system" );
+        Name apDn = new LdapDN( "ou=system" );
+        Name entryDn = new LdapDN( "ou=users,ou=system" );
         Attribute objectClasses = new BasicAttribute( "objectClass", "person" );
 
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "uid=akarasulu,ou=users,ou=system" );
+        entryDn = new LdapDN( "uid=akarasulu,ou=users,ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=system" );
+        entryDn = new LdapDN( "ou=system" );
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
+        entryDn = new LdapDN( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = new LdapDN( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = new LdapDN( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
         // now change the refinement so the entry is rejected
@@ -251,19 +251,19 @@
 
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "uid=akarasulu,ou=users,ou=system" );
+        entryDn = new LdapDN( "uid=akarasulu,ou=users,ou=system" );
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=system" );
+        entryDn = new LdapDN( "ou=system" );
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
+        entryDn = new LdapDN( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = new LdapDN( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
-        entryDn = new LdapName( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = new LdapDN( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, objectClasses ) );
 
     }



Mime
View raw message