Author: elecharny
Date: Wed Sep 2 15:12:26 2009
New Revision: 810543
URL: http://svn.apache.org/viewvc?rev=810543&view=rev
Log:
Fixed the test
Modified:
directory/apacheds/branches/apacheds-schema/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java
Modified: directory/apacheds/branches/apacheds-schema/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java?rev=810543&r1=810542&r2=810543&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java
Wed Sep 2 15:12:26 2009
@@ -78,8 +78,8 @@
private static Set<LdapDN> USER_NAMES = new HashSet<LdapDN>();
private static Set<LdapDN> GROUP_NAMES = new HashSet<LdapDN>();
- private static final AttributeTypeRegistry ATTR_TYPE_REGISTRY_A = new DummyAttributeTypeRegistry(
false );
- private static final AttributeTypeRegistry ATTR_TYPE_REGISTRY_B = new DummyAttributeTypeRegistry(
true );
+ private static AttributeTypeRegistry atRegistryA;
+ private static AttributeTypeRegistry atRegistryB;
private static OidRegistry OID_REGISTRY;
private static RelatedProtectedItemFilter filterA;
@@ -102,12 +102,15 @@
GROUP_NAME = new LdapDN( "ou=test,ou=groups,ou=system" );
USER_NAME = new LdapDN( "ou=test, ou=users, ou=system" );
+
+ atRegistryA = service.getRegistries().getAttributeTypeRegistry();
+ atRegistryB = service.getRegistries().getAttributeTypeRegistry();
filterA = new RelatedProtectedItemFilter( new RefinementEvaluator( new RefinementLeafEvaluator(
- OID_REGISTRY ) ), new ExpressionEvaluator( OID_REGISTRY, ATTR_TYPE_REGISTRY_A
), OID_REGISTRY, ATTR_TYPE_REGISTRY_A );
+ OID_REGISTRY ) ), new ExpressionEvaluator( OID_REGISTRY, atRegistryA ), OID_REGISTRY,
atRegistryA );
filterB = new RelatedProtectedItemFilter( new RefinementEvaluator( new RefinementLeafEvaluator(
- OID_REGISTRY ) ), new ExpressionEvaluator( OID_REGISTRY, ATTR_TYPE_REGISTRY_B
), OID_REGISTRY, ATTR_TYPE_REGISTRY_B );
+ OID_REGISTRY ) ), new ExpressionEvaluator( OID_REGISTRY, atRegistryB ), OID_REGISTRY,
atRegistryB );
USER_NAMES.add( USER_NAME );
GROUP_NAMES.add( GROUP_NAME );
|