directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1235340 [2/2] - in /directory/apacheds/trunk/interceptors/authz/src: main/java/org/apache/directory/server/core/authz/ main/java/org/apache/directory/server/core/authz/support/ test/java/org/apache/directory/server/core/authz/support/
Date Tue, 24 Jan 2012 16:37:30 GMT
Modified: directory/apacheds/trunk/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilterTest.java?rev=1235340&r1=1235339&r2=1235340&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilterTest.java
(original)
+++ directory/apacheds/trunk/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilterTest.java
Tue Jan 24 16:37:29 2012
@@ -53,11 +53,16 @@ import org.junit.runner.RunWith;
 public class MostSpecificUserClassFilterTest
 {
     private static final Set<Dn> EMPTY_NAME_SET = Collections.unmodifiableSet( new
HashSet<Dn>() );
-    private static final Set<MicroOperation> EMPTY_MICRO_OPERATION_SET = Collections.unmodifiableSet(
new HashSet<MicroOperation>() );
-    private static final Collection<UserClass> EMPTY_USER_CLASS_COLLECTION = Collections.unmodifiableCollection(
new ArrayList<UserClass>() );
-    private static final Set<SubtreeSpecification> EMPTY_SUBTREE_SPECIFICATION_COLLECTION
= Collections.unmodifiableSet( new HashSet<SubtreeSpecification>() );
-    private static final Collection<ProtectedItem> EMPTY_PROTECTED_ITEM_COLLECTION
= Collections.unmodifiableCollection( new ArrayList<ProtectedItem>() );
-    private static final Collection<ACITuple> EMPTY_ACI_TUPLE_COLLECTION = Collections.unmodifiableCollection(
new ArrayList<ACITuple>() );
+    private static final Set<MicroOperation> EMPTY_MICRO_OPERATION_SET = Collections
+        .unmodifiableSet( new HashSet<MicroOperation>() );
+    private static final Collection<UserClass> EMPTY_USER_CLASS_COLLECTION = Collections
+        .unmodifiableCollection( new ArrayList<UserClass>() );
+    private static final Set<SubtreeSpecification> EMPTY_SUBTREE_SPECIFICATION_COLLECTION
= Collections
+        .unmodifiableSet( new HashSet<SubtreeSpecification>() );
+    private static final Collection<ProtectedItem> EMPTY_PROTECTED_ITEM_COLLECTION
= Collections
+        .unmodifiableCollection( new ArrayList<ProtectedItem>() );
+    private static final Collection<ACITuple> EMPTY_ACI_TUPLE_COLLECTION = Collections
+        .unmodifiableCollection( new ArrayList<ACITuple>() );
 
     private static final List<ACITuple> TUPLES_A = new ArrayList<ACITuple>();
     private static final List<ACITuple> TUPLES_B = new ArrayList<ACITuple>();
@@ -79,11 +84,16 @@ public class MostSpecificUserClassFilter
         subtree.add( new UserClass.Subtree( EMPTY_SUBTREE_SPECIFICATION_COLLECTION ) );
         allUsers.add( UserClass.ALL_USERS );
 
-        ACITuple nameTuple = new ACITuple( name, AuthenticationLevel.NONE, EMPTY_PROTECTED_ITEM_COLLECTION,
EMPTY_MICRO_OPERATION_SET, true, 0 );
-        ACITuple thisEntryTuple = new ACITuple( thisEntry, AuthenticationLevel.NONE, EMPTY_PROTECTED_ITEM_COLLECTION,
EMPTY_MICRO_OPERATION_SET, true, 0 );
-        ACITuple userGroupTuple = new ACITuple( userGroup, AuthenticationLevel.NONE, EMPTY_PROTECTED_ITEM_COLLECTION,
EMPTY_MICRO_OPERATION_SET, true, 0 );
-        ACITuple subtreeTuple = new ACITuple( subtree, AuthenticationLevel.NONE, EMPTY_PROTECTED_ITEM_COLLECTION,
EMPTY_MICRO_OPERATION_SET, true, 0 );
-        ACITuple allUsersTuple = new ACITuple( allUsers, AuthenticationLevel.NONE, EMPTY_PROTECTED_ITEM_COLLECTION,
EMPTY_MICRO_OPERATION_SET, true, 0 );
+        ACITuple nameTuple = new ACITuple( name, AuthenticationLevel.NONE, EMPTY_PROTECTED_ITEM_COLLECTION,
+            EMPTY_MICRO_OPERATION_SET, true, 0 );
+        ACITuple thisEntryTuple = new ACITuple( thisEntry, AuthenticationLevel.NONE, EMPTY_PROTECTED_ITEM_COLLECTION,
+            EMPTY_MICRO_OPERATION_SET, true, 0 );
+        ACITuple userGroupTuple = new ACITuple( userGroup, AuthenticationLevel.NONE, EMPTY_PROTECTED_ITEM_COLLECTION,
+            EMPTY_MICRO_OPERATION_SET, true, 0 );
+        ACITuple subtreeTuple = new ACITuple( subtree, AuthenticationLevel.NONE, EMPTY_PROTECTED_ITEM_COLLECTION,
+            EMPTY_MICRO_OPERATION_SET, true, 0 );
+        ACITuple allUsersTuple = new ACITuple( allUsers, AuthenticationLevel.NONE, EMPTY_PROTECTED_ITEM_COLLECTION,
+            EMPTY_MICRO_OPERATION_SET, true, 0 );
 
         TUPLES_A.add( nameTuple );
         TUPLES_A.add( thisEntryTuple );
@@ -119,7 +129,8 @@ public class MostSpecificUserClassFilter
         assertEquals( 0, filter.filter( aciContext, OperationScope.ATTRIBUTE_TYPE_AND_VALUE,
null ).size() );
 
         Collection<ACITuple> tuples = new ArrayList<ACITuple>();
-        tuples.add( new ACITuple( EMPTY_USER_CLASS_COLLECTION, AuthenticationLevel.NONE,
EMPTY_PROTECTED_ITEM_COLLECTION, EMPTY_MICRO_OPERATION_SET, false, 0 ) );
+        tuples.add( new ACITuple( EMPTY_USER_CLASS_COLLECTION, AuthenticationLevel.NONE,
+            EMPTY_PROTECTED_ITEM_COLLECTION, EMPTY_MICRO_OPERATION_SET, false, 0 ) );
 
         aciContext = new AciContext( null, null );
         aciContext.setAciTuples( tuples );
@@ -202,7 +213,7 @@ public class MostSpecificUserClassFilter
         AciContext aciContext = new AciContext( null, null );
         aciContext.setAciTuples( tuples );
 
-        tuples = (List<ACITuple>)filter.filter( aciContext, OperationScope.ENTRY, null
);
+        tuples = ( List<ACITuple> ) filter.filter( aciContext, OperationScope.ENTRY,
null );
 
         assertEquals( 2, tuples.size() );
         assertSame( TUPLES_E.get( 0 ), tuples.get( 0 ) );

Modified: directory/apacheds/trunk/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java?rev=1235340&r1=1235339&r2=1235340&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java
(original)
+++ directory/apacheds/trunk/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java
Tue Jan 24 16:37:29 2012
@@ -71,9 +71,12 @@ import com.mycila.junit.concurrent.Concu
 @Concurrency()
 public class RelatedProtectedItemFilterTest
 {
-    private static final Collection<UserClass> EMPTY_USER_CLASS_COLLECTION = Collections.unmodifiableCollection(
new ArrayList<UserClass>() );
-    private static final Collection<ACITuple> EMPTY_ACI_TUPLE_COLLECTION = Collections.unmodifiableCollection(
new ArrayList<ACITuple>() );
-    private static final Set<MicroOperation> EMPTY_MICRO_OPERATION_SET = Collections.unmodifiableSet(
new HashSet<MicroOperation>() );
+    private static final Collection<UserClass> EMPTY_USER_CLASS_COLLECTION = Collections
+        .unmodifiableCollection( new ArrayList<UserClass>() );
+    private static final Collection<ACITuple> EMPTY_ACI_TUPLE_COLLECTION = Collections
+        .unmodifiableCollection( new ArrayList<ACITuple>() );
+    private static final Set<MicroOperation> EMPTY_MICRO_OPERATION_SET = Collections
+        .unmodifiableSet( new HashSet<MicroOperation>() );
 
     private static Dn GROUP_NAME;
     private static Dn USER_NAME;
@@ -84,25 +87,25 @@ public class RelatedProtectedItemFilterT
 
     private static RelatedProtectedItemFilter filterA;
     private static RelatedProtectedItemFilter filterB;
-    
+
     /** The CN attribute Type */
     private static AttributeType CN_AT;
-    
+
     /** The OU attribute Type */
     private static AttributeType OU_AT;
-    
+
     /** The SN attribute Type */
     private static AttributeType SN_AT;
 
-    
-    @BeforeClass 
+
+    @BeforeClass
     public static void setup() throws Exception
     {
         schemaManager = new DefaultSchemaManager();
 
         GROUP_NAME = new Dn( schemaManager, "ou=test,ou=groups,ou=system" );
         USER_NAME = new Dn( schemaManager, "ou=test, ou=users, ou=system" );
-        
+
         filterA = new RelatedProtectedItemFilter( new RefinementEvaluator( new RefinementLeafEvaluator(
             schemaManager ) ), new ExpressionEvaluator( schemaManager ), schemaManager );
 
@@ -116,8 +119,8 @@ public class RelatedProtectedItemFilterT
         SN_AT = schemaManager.lookupAttributeTypeRegistry( "sn" );
     }
 
-    
-    @Test 
+
+    @Test
     public void testZeroTuple() throws Exception
     {
         AciContext aciContext = new AciContext( null, null );
@@ -127,7 +130,7 @@ public class RelatedProtectedItemFilterT
     }
 
 
-    @Test 
+    @Test
     public void testEntry() throws Exception
     {
         Collection<ACITuple> tuples = getTuples( ProtectedItem.ENTRY );
@@ -141,7 +144,7 @@ public class RelatedProtectedItemFilterT
     }
 
 
-    @Test 
+    @Test
     public void testAllUserAttributeTypes() throws Exception
     {
         Collection<ACITuple> tuples = getTuples( ProtectedItem.ALL_USER_ATTRIBUTE_TYPES
);
@@ -165,7 +168,7 @@ public class RelatedProtectedItemFilterT
     }
 
 
-    @Test 
+    @Test
     public void testAllUserAttributeTypesAndValues() throws Exception
     {
         Collection<ACITuple> tuples = getTuples( ProtectedItem.ALL_USER_ATTRIBUTE_TYPES_AND_VALUES
);
@@ -189,7 +192,7 @@ public class RelatedProtectedItemFilterT
     }
 
 
-    @Test 
+    @Test
     public void testAllAttributeValues() throws Exception
     {
         Set<AttributeType> attrTypes = new HashSet<AttributeType>();
@@ -222,7 +225,7 @@ public class RelatedProtectedItemFilterT
     }
 
 
-    @Test 
+    @Test
     public void testAttributeType() throws Exception
     {
         Set<AttributeType> attrTypes = new HashSet<AttributeType>();
@@ -255,7 +258,7 @@ public class RelatedProtectedItemFilterT
     }
 
 
-    @Test 
+    @Test
     public void testAttributeValue() throws Exception
     {
         Set<Attribute> attributes = new HashSet<Attribute>();
@@ -303,7 +306,7 @@ public class RelatedProtectedItemFilterT
         aciContext.setUserDn( USER_NAME );
         aciContext.setAttributeType( SN_AT );
         aciContext.setAttrValue( new StringValue( "valueA" ) );
-        
+
         assertEquals( 0, filterA.filter( aciContext, OperationScope.ATTRIBUTE_TYPE_AND_VALUE,
null ).size() );
     }
 
@@ -314,7 +317,7 @@ public class RelatedProtectedItemFilterT
     }
 
 
-    @Test 
+    @Test
     public void testMaxImmSub() throws Exception
     {
         Collection<ACITuple> tuples = getTuples( new MaxImmSubItem( 2 ) );
@@ -324,12 +327,12 @@ public class RelatedProtectedItemFilterT
         aciContext.setAciTuples( tuples );
         aciContext.setUserDn( USER_NAME );
         aciContext.setAttributeType( CN_AT );
-        
+
         assertEquals( 1, filterA.filter( aciContext, OperationScope.ENTRY, null ).size()
);
     }
 
 
-    @Test 
+    @Test
     public void testMaxValueCount() throws Exception
     {
         Set<MaxValueCountElem> mvcItems = new HashSet<MaxValueCountElem>();
@@ -341,7 +344,7 @@ public class RelatedProtectedItemFilterT
         aciContext.setAciTuples( tuples );
         aciContext.setUserDn( USER_NAME );
         aciContext.setAttributeType( CN_AT );
-        
+
         assertEquals( 0, filterA.filter( aciContext, OperationScope.ENTRY, null ).size()
);
         tuples = getTuples( new MaxValueCountItem( mvcItems ) );
 
@@ -349,7 +352,7 @@ public class RelatedProtectedItemFilterT
         aciContext.setAciTuples( tuples );
         aciContext.setUserDn( USER_NAME );
         aciContext.setAttributeType( CN_AT );
-        
+
         assertEquals( 0, filterA.filter( aciContext, OperationScope.ATTRIBUTE_TYPE, null
).size() );
 
         tuples = getTuples( new MaxValueCountItem( mvcItems ) );
@@ -358,14 +361,14 @@ public class RelatedProtectedItemFilterT
         aciContext.setAciTuples( tuples );
         aciContext.setUserDn( USER_NAME );
         aciContext.setAttributeType( CN_AT );
-        
+
         assertEquals( 1, filterA.filter( aciContext, OperationScope.ATTRIBUTE_TYPE_AND_VALUE,
null ).size() );
 
         aciContext = new AciContext( null, null );
         aciContext.setAciTuples( tuples );
         aciContext.setUserDn( USER_NAME );
         aciContext.setAttributeType( SN_AT );
-        
+
         assertEquals( 0, filterA.filter( aciContext, OperationScope.ATTRIBUTE_TYPE_AND_VALUE,
null ).size() );
     }
 
@@ -389,8 +392,7 @@ public class RelatedProtectedItemFilterT
     }
     */
 
-
-    @Test 
+    @Test
     public void testRestrictedBy() throws Exception
     {
         Set<RestrictedByElem> rbItems = new HashSet<RestrictedByElem>();
@@ -402,7 +404,7 @@ public class RelatedProtectedItemFilterT
         aciContext.setAciTuples( tuples );
         aciContext.setUserDn( USER_NAME );
         aciContext.setAttributeType( CN_AT );
-        
+
         assertEquals( 0, filterA.filter( aciContext, OperationScope.ENTRY, null ).size()
);
         tuples = getTuples( new RestrictedByItem( rbItems ) );
 
@@ -410,7 +412,7 @@ public class RelatedProtectedItemFilterT
         aciContext.setAciTuples( tuples );
         aciContext.setUserDn( USER_NAME );
         aciContext.setAttributeType( CN_AT );
-        
+
         assertEquals( 0, filterA.filter( aciContext, OperationScope.ATTRIBUTE_TYPE, null
).size() );
 
         tuples = getTuples( new RestrictedByItem( rbItems ) );
@@ -419,19 +421,19 @@ public class RelatedProtectedItemFilterT
         aciContext.setAciTuples( tuples );
         aciContext.setUserDn( USER_NAME );
         aciContext.setAttributeType( CN_AT );
-        
+
         assertEquals( 1, filterA.filter( aciContext, OperationScope.ATTRIBUTE_TYPE_AND_VALUE,
null ).size() );
 
         aciContext = new AciContext( null, null );
         aciContext.setAciTuples( tuples );
         aciContext.setUserDn( USER_NAME );
         aciContext.setAttributeType( SN_AT );
-        
+
         assertEquals( 0, filterA.filter( aciContext, OperationScope.ATTRIBUTE_TYPE_AND_VALUE,
null ).size() );
     }
 
 
-    @Test 
+    @Test
     public void testSelfValue() throws Exception
     {
         Set<AttributeType> attrTypes = new HashSet<AttributeType>();
@@ -447,7 +449,7 @@ public class RelatedProtectedItemFilterT
         aciContext.setUserDn( USER_NAME );
         aciContext.setAttributeType( CN_AT );
         aciContext.setEntry( entry );
-        
+
         assertEquals( 0, filterA.filter( aciContext, OperationScope.ENTRY, null ).size()
);
 
         tuples = getTuples( new SelfValueItem( attrTypes ) );
@@ -457,7 +459,7 @@ public class RelatedProtectedItemFilterT
         aciContext.setUserDn( USER_NAME );
         aciContext.setAttributeType( CN_AT );
         aciContext.setEntry( entry );
-        
+
         assertEquals( 1, filterA.filter( aciContext, OperationScope.ATTRIBUTE_TYPE_AND_VALUE,
null ).size() );
 
         entry.removeAttributes( "cn" );
@@ -467,17 +469,17 @@ public class RelatedProtectedItemFilterT
         aciContext.setUserDn( USER_NAME );
         aciContext.setAttributeType( CN_AT );
         aciContext.setEntry( entry );
-        
+
         assertEquals( 0, filterA.filter( aciContext, OperationScope.ATTRIBUTE_TYPE_AND_VALUE,
null ).size() );
 
         tuples = getTuples( new SelfValueItem( attrTypes ) );
-        
+
         aciContext = new AciContext( null, null );
         aciContext.setAciTuples( tuples );
         aciContext.setUserDn( USER_NAME );
         aciContext.setAttributeType( SN_AT );
         aciContext.setEntry( entry );
-        
+
         assertEquals( 0, filterA.filter( aciContext, OperationScope.ATTRIBUTE_TYPE_AND_VALUE,
null ).size() );
     }
 
@@ -488,7 +490,8 @@ public class RelatedProtectedItemFilterT
         protectedItems.add( protectedItem );
 
         Collection<ACITuple> tuples = new ArrayList<ACITuple>();
-        tuples.add( new ACITuple( EMPTY_USER_CLASS_COLLECTION, AuthenticationLevel.NONE,
protectedItems, EMPTY_MICRO_OPERATION_SET, true, 0 ) );
+        tuples.add( new ACITuple( EMPTY_USER_CLASS_COLLECTION, AuthenticationLevel.NONE,
protectedItems,
+            EMPTY_MICRO_OPERATION_SET, true, 0 ) );
 
         return tuples;
     }

Modified: directory/apacheds/trunk/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java?rev=1235340&r1=1235339&r2=1235340&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java
(original)
+++ directory/apacheds/trunk/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java
Tue Jan 24 16:37:29 2012
@@ -55,10 +55,13 @@ import com.mycila.junit.concurrent.Concu
 @Concurrency()
 public class RelatedUserClassFilterTest
 {
-    private static final Collection<ACITuple> EMPTY_ACI_TUPLE_COLLECTION = Collections.unmodifiableCollection(
new ArrayList<ACITuple>() );
-    private static final Collection<ProtectedItem> EMPTY_PROTECTED_ITEM_COLLECTION
= Collections.unmodifiableCollection( new ArrayList<ProtectedItem>() );
+    private static final Collection<ACITuple> EMPTY_ACI_TUPLE_COLLECTION = Collections
+        .unmodifiableCollection( new ArrayList<ACITuple>() );
+    private static final Collection<ProtectedItem> EMPTY_PROTECTED_ITEM_COLLECTION
= Collections
+        .unmodifiableCollection( new ArrayList<ProtectedItem>() );
 
-    private static final Set<MicroOperation> EMPTY_MICRO_OPERATION_SET = Collections.unmodifiableSet(
new HashSet<MicroOperation>() );
+    private static final Set<MicroOperation> EMPTY_MICRO_OPERATION_SET = Collections
+        .unmodifiableSet( new HashSet<MicroOperation>() );
 
     private static Dn GROUP_NAME;
     private static Dn USER_NAME;
@@ -70,13 +73,14 @@ public class RelatedUserClassFilterTest
     private static RelatedUserClassFilter filter;
     private static SchemaManager schemaManager;
 
+
     @BeforeClass
     public static void init() throws Exception
     {
         schemaManager = new DefaultSchemaManager();
         SUBTREE_EVALUATOR = new SubtreeEvaluator( new DefaultSchemaManager( null ) );
         filter = new RelatedUserClassFilter( SUBTREE_EVALUATOR );
-        
+
         try
         {
             GROUP_NAME = new Dn( schemaManager, "ou=test,ou=groups,ou=system" );
@@ -135,8 +139,8 @@ public class RelatedUserClassFilterTest
 
         assertEquals( 0, filter.filter( aciContext, OperationScope.ENTRY, null ).size() );
     }
-    
-    
+
+
     @Test
     public void testParentOfEntry() throws Exception
     {
@@ -269,7 +273,7 @@ public class RelatedUserClassFilterTest
         classes.add( userClass );
 
         Collection<ACITuple> tuples = new ArrayList<ACITuple>();
-        tuples.add( new ACITuple( classes, AuthenticationLevel.NONE, EMPTY_PROTECTED_ITEM_COLLECTION,

+        tuples.add( new ACITuple( classes, AuthenticationLevel.NONE, EMPTY_PROTECTED_ITEM_COLLECTION,
             EMPTY_MICRO_OPERATION_SET, true, 0 ) );
 
         return tuples;
@@ -279,7 +283,7 @@ public class RelatedUserClassFilterTest
     private static Collection<ACITuple> getTuples( AuthenticationLevel level, boolean
grant )
     {
         Collection<UserClass> classes = new ArrayList<UserClass>();
-        
+
         if ( grant )
         {
             classes.add( UserClass.ALL_USERS );
@@ -287,7 +291,7 @@ public class RelatedUserClassFilterTest
         else
         {
             Set<Dn> names = new HashSet<Dn>();
-            
+
             try
             {
                 names.add( new Dn( schemaManager, "cn=dummy" ) );
@@ -301,7 +305,8 @@ public class RelatedUserClassFilterTest
         }
 
         Collection<ACITuple> tuples = new ArrayList<ACITuple>();
-        tuples.add( new ACITuple( classes, level, EMPTY_PROTECTED_ITEM_COLLECTION, EMPTY_MICRO_OPERATION_SET,
grant, 0 ) );
+        tuples
+            .add( new ACITuple( classes, level, EMPTY_PROTECTED_ITEM_COLLECTION, EMPTY_MICRO_OPERATION_SET,
grant, 0 ) );
 
         return tuples;
     }

Modified: directory/apacheds/trunk/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java?rev=1235340&r1=1235339&r2=1235340&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java
(original)
+++ directory/apacheds/trunk/interceptors/authz/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java
Tue Jan 24 16:37:29 2012
@@ -60,9 +60,12 @@ import com.mycila.junit.concurrent.Concu
 @Concurrency()
 public class RestrictedByFilterTest
 {
-    private static final Collection<UserClass> UC_EMPTY_COLLECTION = Collections.unmodifiableCollection(
new ArrayList<UserClass>() );
-    private static final Collection<ACITuple> AT_EMPTY_COLLECTION = Collections.unmodifiableCollection(
new ArrayList<ACITuple>() );
-    private static final Collection<ProtectedItem> PI_EMPTY_COLLECTION = Collections.unmodifiableCollection(
new ArrayList<ProtectedItem>() );
+    private static final Collection<UserClass> UC_EMPTY_COLLECTION = Collections
+        .unmodifiableCollection( new ArrayList<UserClass>() );
+    private static final Collection<ACITuple> AT_EMPTY_COLLECTION = Collections
+        .unmodifiableCollection( new ArrayList<ACITuple>() );
+    private static final Collection<ProtectedItem> PI_EMPTY_COLLECTION = Collections
+        .unmodifiableCollection( new ArrayList<ProtectedItem>() );
     private static final Set<MicroOperation> MO_EMPTY_SET = Collections.unmodifiableSet(
new HashSet<MicroOperation>() );
 
     private static final Collection<ProtectedItem> PROTECTED_ITEMS = new ArrayList<ProtectedItem>();
@@ -70,15 +73,15 @@ public class RestrictedByFilterTest
 
     /** A reference to the schemaManager */
     private static SchemaManager schemaManager;
-    
+
     /** The CN attribute Type */
     private static AttributeType CN_AT;
 
     /** The SN attribute Type */
     private static AttributeType SN_AT;
 
-    
-    @BeforeClass 
+
+    @BeforeClass
     public static void setup() throws Exception
     {
         schemaManager = new DefaultSchemaManager();
@@ -97,12 +100,13 @@ public class RestrictedByFilterTest
     }
 
 
-    @Test 
+    @Test
     public void testWrongScope() throws Exception
     {
         RestrictedByFilter filter = new RestrictedByFilter();
         Collection<ACITuple> tuples = new ArrayList<ACITuple>();
-        tuples.add( new ACITuple( UC_EMPTY_COLLECTION, AuthenticationLevel.NONE, PI_EMPTY_COLLECTION,
MO_EMPTY_SET, true, 0 ) );
+        tuples.add( new ACITuple( UC_EMPTY_COLLECTION, AuthenticationLevel.NONE, PI_EMPTY_COLLECTION,
MO_EMPTY_SET,
+            true, 0 ) );
 
         tuples = Collections.unmodifiableCollection( tuples );
 
@@ -118,7 +122,7 @@ public class RestrictedByFilterTest
     }
 
 
-    @Test 
+    @Test
     public void testZeroTuple() throws Exception
     {
         RestrictedByFilter filter = new RestrictedByFilter();
@@ -130,12 +134,13 @@ public class RestrictedByFilterTest
     }
 
 
-    @Test 
+    @Test
     public void testDenialTuple() throws Exception
     {
         RestrictedByFilter filter = new RestrictedByFilter();
         Collection<ACITuple> tuples = new ArrayList<ACITuple>();
-        tuples.add( new ACITuple( UC_EMPTY_COLLECTION, AuthenticationLevel.NONE, PROTECTED_ITEMS,
MO_EMPTY_SET, false, 0 ) );
+        tuples.add( new ACITuple( UC_EMPTY_COLLECTION, AuthenticationLevel.NONE, PROTECTED_ITEMS,
MO_EMPTY_SET, false,
+            0 ) );
 
         tuples = Collections.unmodifiableCollection( tuples );
 
@@ -148,12 +153,13 @@ public class RestrictedByFilterTest
     }
 
 
-    @Test 
+    @Test
     public void testGrantTuple() throws Exception
     {
         RestrictedByFilter filter = new RestrictedByFilter();
         Collection<ACITuple> tuples = new ArrayList<ACITuple>();
-        tuples.add( new ACITuple( UC_EMPTY_COLLECTION, AuthenticationLevel.NONE, PROTECTED_ITEMS,
MO_EMPTY_SET, true, 0 ) );
+        tuples
+            .add( new ACITuple( UC_EMPTY_COLLECTION, AuthenticationLevel.NONE, PROTECTED_ITEMS,
MO_EMPTY_SET, true, 0 ) );
 
         AciContext aciContext = new AciContext( null, null );
         aciContext.setAciTuples( tuples );



Mime
View raw message