directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r980194 [2/2] - in /directory/apacheds/branches/apacheds-dnfactory-experiment/core/src: main/java/org/apache/directory/server/core/ main/java/org/apache/directory/server/core/authz/ main/java/org/apache/directory/server/core/collective/ mai...
Date Wed, 28 Jul 2010 20:09:18 GMT
Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java?rev=980194&r1=980193&r2=980194&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
(original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
Wed Jul 28 20:09:16 2010
@@ -31,6 +31,7 @@ import java.util.Map;
 
 import org.apache.directory.junit.tools.Concurrent;
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
+import org.apache.directory.server.core.DNFactory;
 import org.apache.directory.shared.ldap.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.entry.DefaultEntryAttribute;
 import org.apache.directory.shared.ldap.entry.Entry;
@@ -101,7 +102,7 @@ public class SchemaCheckerTest
     @Test
     public void testPreventStructuralClassRemovalOnModifyReplace() throws Exception
     {
-        DN name = new DN( "uid=akarasulu,ou=users,dc=example,dc=com" );
+        DN name = DNFactory.create( "uid=akarasulu,ou=users,dc=example,dc=com" );
         ModificationOperation mod = ModificationOperation.REPLACE_ATTRIBUTE;
         Entry modifyAttributes = new DefaultEntry( schemaManager );
         AttributeType atCN = schemaManager.lookupAttributeTypeRegistry( "cn" );
@@ -160,7 +161,7 @@ public class SchemaCheckerTest
      *
     public void testPreventStructuralClassRemovalOnModifyRemove() throws Exception
     {
-        DN name = new DN( "uid=akarasulu,ou=users,dc=example,dc=com" );
+        DN name = DNFactory.create( "uid=akarasulu,ou=users,dc=example,dc=com" );
         int mod = DirContext.REMOVE_ATTRIBUTE;
         Attributes modifyAttributes = new AttributesImpl( true );
         Attribute entryObjectClasses = new AttributeImpl( "objectClass" );
@@ -226,7 +227,7 @@ public class SchemaCheckerTest
     public void testPreventRdnChangeOnModifyRemove() throws Exception
     {
         ModificationOperation mod = ModificationOperation.REMOVE_ATTRIBUTE;
-        DN name = new DN( "ou=user,dc=example,dc=com" );
+        DN name = DNFactory.create( "ou=user,dc=example,dc=com" );
         Entry attributes = new DefaultEntry( schemaManager, name );
         attributes.put( "cn", "does not matter" );
 
@@ -248,7 +249,7 @@ public class SchemaCheckerTest
         }
 
         // test success using more than one attribute for the Rdn but not modifying rdn attribute
-        name = new DN( "ou=users+cn=system users,dc=example,dc=com" );
+        name = DNFactory.create( "ou=users+cn=system users,dc=example,dc=com" );
         attributes = new DefaultEntry( schemaManager, name );
         attributes.put( "sn", "does not matter" );
         SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, attributes, schemaManager
);
@@ -296,7 +297,7 @@ public class SchemaCheckerTest
     public void testPreventRdnChangeOnModifyReplace() throws Exception
     {
         ModificationOperation mod = ModificationOperation.REPLACE_ATTRIBUTE;
-        DN name = new DN( "ou=user,dc=example,dc=com" );
+        DN name = DNFactory.create( "ou=user,dc=example,dc=com" );
         Entry attributes = new DefaultEntry( schemaManager, name );
         attributes.put( "cn", "does not matter" );
 
@@ -317,7 +318,7 @@ public class SchemaCheckerTest
         }
 
         // test success using more than one attribute for the Rdn but not modifying rdn attribute
-        name = new DN( "ou=users+cn=system users,dc=example,dc=com" );
+        name = DNFactory.create( "ou=users+cn=system users,dc=example,dc=com" );
         attributes = new DefaultEntry( schemaManager, name );
         attributes.put( "sn", "does not matter" );
         SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, attributes, schemaManager
);
@@ -372,7 +373,7 @@ public class SchemaCheckerTest
         AttributeType CN_AT = schemaManager.lookupAttributeTypeRegistry( "cn" );
 
         // this should pass
-        DN name = new DN( "uid=akarasulu,ou=users,dc=example,dc=com" );
+        DN name = DNFactory.create( "uid=akarasulu,ou=users,dc=example,dc=com" );
         ModificationOperation mod = ModificationOperation.REPLACE_ATTRIBUTE;
         SchemaChecker.preventStructuralClassRemovalOnModifyReplace( schemaManager, name,
mod,
             new DefaultEntryAttribute( "cn", CN_AT ) );
@@ -420,7 +421,7 @@ public class SchemaCheckerTest
     @Test
     public void testPreventStructuralClassRemovalOnModifyRemoveAttribute() throws Exception
     {
-        DN name = new DN( "uid=akarasulu,ou=users,dc=example,dc=com" );
+        DN name = DNFactory.create( "uid=akarasulu,ou=users,dc=example,dc=com" );
         ModificationOperation mod = ModificationOperation.REMOVE_ATTRIBUTE;
         AttributeType ocAt = schemaManager.lookupAttributeTypeRegistry( "objectClass" );
 
@@ -478,7 +479,7 @@ public class SchemaCheckerTest
     {
         Map<String, OidNormalizer> oidNormalizers = schemaManager.getAttributeTypeRegistry().getNormalizerMapping();
         ModificationOperation mod = ModificationOperation.REMOVE_ATTRIBUTE;
-        DN name = new DN( "ou=user,dc=example,dc=com", schemaManager );
+        DN name = DNFactory.create( "ou=user,dc=example,dc=com", schemaManager );
         AttributeType cnAt = schemaManager.lookupAttributeTypeRegistry( "cn" );
         AttributeType ouAt = schemaManager.lookupAttributeTypeRegistry( "ou" );
         AttributeType snAt = schemaManager.lookupAttributeTypeRegistry( "sn" );
@@ -500,7 +501,7 @@ public class SchemaCheckerTest
         }
 
         // test success using more than one attribute for the Rdn but not modifying rdn attribute
-        name = new DN( "ou=users+cn=system users,dc=example,dc=com" );
+        name = DNFactory.create( "ou=users+cn=system users,dc=example,dc=com" );
         name.normalize( oidNormalizers );
         SchemaChecker.preventRdnChangeOnModifyRemove( name, mod, new DefaultEntryAttribute(
"sn", snAt,
             "does not matter" ), schemaManager );
@@ -542,7 +543,7 @@ public class SchemaCheckerTest
     //    public void testPreventRdnChangeOnModifyReplaceAttribute() throws Exception
     //    {
     //        int mod = DirContext.REPLACE_ATTRIBUTE;
-    //        DN name = new DN( "ou=user,dc=example,dc=com" );
+    //        DN name = DNFactory.create( "ou=user,dc=example,dc=com" );
     //
     //        // postive test which should pass
     //        SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, new AttributeImpl(
"cn", "does not matter" ), registries.getOidRegistry() );
@@ -559,7 +560,7 @@ public class SchemaCheckerTest
     //        }
     //
     //        // test success using more than one attribute for the Rdn but not modifying
rdn attribute
-    //        name = new DN( "ou=users+cn=system users,dc=example,dc=com" );
+    //        name = DNFactory.create( "ou=users+cn=system users,dc=example,dc=com" );
     //        SchemaChecker.preventRdnChangeOnModifyReplace( name, mod, new AttributeImpl(
"sn", "does not matter" ), registries.getOidRegistry() );
     //
     //        // test for failure when modifying Rdn attribute in multi attribute Rdn

Modified: directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java?rev=980194&r1=980193&r2=980194&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java
(original)
+++ directory/apacheds/branches/apacheds-dnfactory-experiment/core/src/test/java/org/apache/directory/server/core/subtree/SubtreeEvaluatorTest.java
Wed Jul 28 20:09:16 2010
@@ -30,6 +30,7 @@ import java.util.Set;
 
 import org.apache.directory.junit.tools.Concurrent;
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
+import org.apache.directory.server.core.DNFactory;
 import org.apache.directory.server.core.normalization.FilterNormalizingVisitor;
 import org.apache.directory.shared.ldap.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.entry.Entry;
@@ -118,16 +119,16 @@ public class SubtreeEvaluatorTest
     {
         SubtreeSpecificationModifier modifier = new SubtreeSpecificationModifier();
         SubtreeSpecification ss = modifier.getSubtreeSpecification();
-        DN apDn = new DN( "ou=system" );
-        DN entryDn = new DN( "ou=users,ou=system" );
+        DN apDn = DNFactory.create( "ou=system" );
+        DN entryDn = DNFactory.create( "ou=users,ou=system" );
         Entry entry = new DefaultEntry( schemaManager, entryDn, "objectClass" );
 
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=system" );
+        entryDn = DNFactory.create( "ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=abc" );
+        entryDn = DNFactory.create( "ou=abc" );
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
     }
 
@@ -136,18 +137,18 @@ public class SubtreeEvaluatorTest
     public void testWithBase() throws Exception
     {
         SubtreeSpecificationModifier modifier = new SubtreeSpecificationModifier();
-        modifier.setBase( new DN( "ou=users" ) );
+        modifier.setBase( DNFactory.create( "ou=users" ) );
         SubtreeSpecification ss = modifier.getSubtreeSpecification();
-        DN apDn = new DN( "ou=system" );
-        DN entryDn = new DN( "ou=users,ou=system" );
+        DN apDn = DNFactory.create( "ou=system" );
+        DN entryDn = DNFactory.create( "ou=users,ou=system" );
         Entry entry = new DefaultEntry( schemaManager, entryDn, "objectClass" );
 
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "uid=akarasulu,ou=users,ou=system" );
+        entryDn = DNFactory.create( "uid=akarasulu,ou=users,ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=system" );
+        entryDn = DNFactory.create( "ou=system" );
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
     }
 
@@ -158,27 +159,27 @@ public class SubtreeEvaluatorTest
         SubtreeSpecificationModifier modifier = new SubtreeSpecificationModifier();
         modifier.setMinBaseDistance( 1 );
         modifier.setMaxBaseDistance( 3 );
-        modifier.setBase( new DN( "ou=users" ) );
+        modifier.setBase( DNFactory.create( "ou=users" ) );
         SubtreeSpecification ss = modifier.getSubtreeSpecification();
-        DN apDn = new DN( "ou=system" );
-        DN entryDn = new DN( "ou=users,ou=system" );
+        DN apDn = DNFactory.create( "ou=system" );
+        DN entryDn = DNFactory.create( "ou=users,ou=system" );
         Entry entry = new DefaultEntry( schemaManager, entryDn, "objectClass" );
 
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "uid=akarasulu,ou=users,ou=system" );
+        entryDn = DNFactory.create( "uid=akarasulu,ou=users,ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=system" );
+        entryDn = DNFactory.create( "ou=system" );
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
+        entryDn = DNFactory.create( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = DNFactory.create( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = DNFactory.create( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
     }
 
@@ -188,32 +189,32 @@ public class SubtreeEvaluatorTest
     {
         SubtreeSpecificationModifier modifier = new SubtreeSpecificationModifier();
         Set<DN> chopAfter = new HashSet<DN>();
-        chopAfter.add( new DN( "uid=Tori Amos" ) );
-        chopAfter.add( new DN( "ou=twolevels,uid=akarasulu" ) );
+        chopAfter.add( DNFactory.create( "uid=Tori Amos" ) );
+        chopAfter.add( DNFactory.create( "ou=twolevels,uid=akarasulu" ) );
         modifier.setChopAfterExclusions( chopAfter );
         modifier.setMinBaseDistance( 1 );
         modifier.setMaxBaseDistance( 3 );
-        modifier.setBase( new DN( "ou=users" ) );
+        modifier.setBase( DNFactory.create( "ou=users" ) );
         SubtreeSpecification ss = modifier.getSubtreeSpecification();
-        DN apDn = new DN( "ou=system" );
-        DN entryDn = new DN( "ou=users,ou=system" );
+        DN apDn = DNFactory.create( "ou=system" );
+        DN entryDn = DNFactory.create( "ou=users,ou=system" );
         Entry entry = new DefaultEntry( schemaManager, entryDn, "objectClass" );
 
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "uid=akarasulu,ou=users,ou=system" );
+        entryDn = DNFactory.create( "uid=akarasulu,ou=users,ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=system" );
+        entryDn = DNFactory.create( "ou=system" );
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
+        entryDn = DNFactory.create( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = DNFactory.create( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = DNFactory.create( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
     }
 
@@ -223,32 +224,32 @@ public class SubtreeEvaluatorTest
     {
         SubtreeSpecificationModifier modifier = new SubtreeSpecificationModifier();
         Set<DN> chopBefore = new HashSet<DN>();
-        chopBefore.add( new DN( "uid=Tori Amos" ) );
-        chopBefore.add( new DN( "ou=threelevels,ou=twolevels,uid=akarasulu" ) );
+        chopBefore.add( DNFactory.create( "uid=Tori Amos" ) );
+        chopBefore.add( DNFactory.create( "ou=threelevels,ou=twolevels,uid=akarasulu" ) );
         modifier.setChopBeforeExclusions( chopBefore );
         modifier.setMinBaseDistance( 1 );
         modifier.setMaxBaseDistance( 3 );
-        modifier.setBase( new DN( "ou=users" ) );
+        modifier.setBase( DNFactory.create( "ou=users" ) );
         SubtreeSpecification ss = modifier.getSubtreeSpecification();
-        DN apDn = new DN( "ou=system" );
-        DN entryDn = new DN( "ou=users,ou=system" );
+        DN apDn = DNFactory.create( "ou=system" );
+        DN entryDn = DNFactory.create( "ou=users,ou=system" );
         Entry entry = new DefaultEntry( schemaManager, entryDn, "objectClass" );
 
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "uid=akarasulu,ou=users,ou=system" );
+        entryDn = DNFactory.create( "uid=akarasulu,ou=users,ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=system" );
+        entryDn = DNFactory.create( "ou=system" );
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
+        entryDn = DNFactory.create( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = DNFactory.create( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = DNFactory.create( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
     }
 
@@ -263,28 +264,28 @@ public class SubtreeEvaluatorTest
         modifier.setRefinement( refinement );
         modifier.setMinBaseDistance( 1 );
         modifier.setMaxBaseDistance( 3 );
-        modifier.setBase( new DN( "ou=users" ) );
+        modifier.setBase( DNFactory.create( "ou=users" ) );
         SubtreeSpecification ss = modifier.getSubtreeSpecification();
-        DN apDn = new DN( "ou=system" );
-        DN entryDn = new DN( "ou=users,ou=system" );
+        DN apDn = DNFactory.create( "ou=system" );
+        DN entryDn = DNFactory.create( "ou=users,ou=system" );
         Entry entry = new DefaultEntry( schemaManager, entryDn );
         entry.put( "objectClass", "person" );
 
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "uid=akarasulu,ou=users,ou=system" );
+        entryDn = DNFactory.create( "uid=akarasulu,ou=users,ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=system" );
+        entryDn = DNFactory.create( "ou=system" );
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
+        entryDn = DNFactory.create( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = DNFactory.create( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = DNFactory.create( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
         // now change the refinement so the entry is rejected
@@ -293,19 +294,19 @@ public class SubtreeEvaluatorTest
 
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "uid=akarasulu,ou=users,ou=system" );
+        entryDn = DNFactory.create( "uid=akarasulu,ou=users,ou=system" );
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=system" );
+        entryDn = DNFactory.create( "ou=system" );
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
+        entryDn = DNFactory.create( "ou=twolevels,uid=akarasulu,ou=users,ou=system" );
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = DNFactory.create( "ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
+        entryDn = DNFactory.create( "ou=fourlevels,ou=threelevels,ou=twolevels,uid=akarasulu,ou=users,ou=system"
);
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
     }
@@ -321,10 +322,10 @@ public class SubtreeEvaluatorTest
         modifier.setRefinement( filter );
         modifier.setMinBaseDistance( 1 );
         modifier.setMaxBaseDistance( 3 );
-        modifier.setBase( new DN( "ou=users" ) );
+        modifier.setBase( DNFactory.create( "ou=users" ) );
         SubtreeSpecification ss = modifier.getSubtreeSpecification();
-        DN apDn = new DN( "ou=system" );
-        DN entryDn = new DN( "ou=users,ou=system" );
+        DN apDn = DNFactory.create( "ou=system" );
+        DN entryDn = DNFactory.create( "ou=users,ou=system" );
 
         Entry entry = new DefaultEntry( schemaManager, entryDn );;
         entry.put( "objectClass", "person" );
@@ -332,7 +333,7 @@ public class SubtreeEvaluatorTest
 
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "cn=Ersin,ou=users,ou=system" );
+        entryDn = DNFactory.create( "cn=Ersin,ou=users,ou=system" );
         assertTrue( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
         // now change the filter so the entry is rejected
@@ -342,7 +343,7 @@ public class SubtreeEvaluatorTest
 
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
 
-        entryDn = new DN( "cn=Alex,ou=users,ou=system" );
+        entryDn = DNFactory.create( "cn=Alex,ou=users,ou=system" );
         assertFalse( evaluator.evaluate( ss, apDn, entryDn, entry ) );
     }
 }



Mime
View raw message