net.shibboleth.metadata.dom.saml
Class EntityRoleFilterStageTest

java.lang.Object
  extended by net.shibboleth.metadata.dom.BaseDomTest
      extended by net.shibboleth.metadata.dom.saml.EntityRoleFilterStageTest

public class EntityRoleFilterStageTest
extends BaseDomTest

Unit test for EntityRoleFilterStage.


Constructor Summary
EntityRoleFilterStageTest()
           
 
Method Summary
private  List<net.shibboleth.metadata.dom.DomElementItem> buildMetadataCollection()
          Build up a metadata collection containing 3 EntityDescriptors.
 void testDontRemoveEntitylessEntitiesDescriptor()
          Test that EntitiesDescriptors that have had all their EntityDescriptor children remove are not themselves removed when EntityRoleFilterStage.isRemovingEntitylessEntitiesDescriptor() is false.
 void testDontRemoveRolelessEntityDescriptor()
          Test that EntityDescriptors that have had all their roles removed are not themselves removed if EntityRoleFilterStage.isRemovingRolelessEntities() is false.
 void testEntitiesDescriptorFiltering()
          Test that role filtering is performed on descendant elements of metadata collection elements.
 void testRemoveEntitylessEntitiesDescriptor()
          Test that EntitiesDescriptors that have had all their EntityDescriptor children remove are themselves removed.
 void testRoleBlacklist()
          Test that blacklisted roles are removed and all other roles are retained.
 void testRoleWhitelist()
          Test that whitelisted roles are retained and all other roles are removed.
 
Methods inherited from class net.shibboleth.metadata.dom.BaseDomTest
assertXmlIdentical, getParserPool, readTestRelativeXmlData, readXmlData, setUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityRoleFilterStageTest

public EntityRoleFilterStageTest()
Method Detail

testRoleWhitelist

public void testRoleWhitelist()
                       throws Exception
Test that whitelisted roles are retained and all other roles are removed. Also tests that roleless entities are removed.

Throws:
Exception

testRoleBlacklist

public void testRoleBlacklist()
                       throws Exception
Test that blacklisted roles are removed and all other roles are retained. Also tests that roleless entities are removed.

Throws:
Exception

testDontRemoveRolelessEntityDescriptor

public void testDontRemoveRolelessEntityDescriptor()
                                            throws Exception
Test that EntityDescriptors that have had all their roles removed are not themselves removed if EntityRoleFilterStage.isRemovingRolelessEntities() is false.

Throws:
Exception

testEntitiesDescriptorFiltering

public void testEntitiesDescriptorFiltering()
                                     throws Exception
Test that role filtering is performed on descendant elements of metadata collection elements.

Throws:
Exception

testRemoveEntitylessEntitiesDescriptor

public void testRemoveEntitylessEntitiesDescriptor()
                                            throws Exception
Test that EntitiesDescriptors that have had all their EntityDescriptor children remove are themselves removed.

Throws:
Exception

testDontRemoveEntitylessEntitiesDescriptor

public void testDontRemoveEntitylessEntitiesDescriptor()
                                                throws Exception
Test that EntitiesDescriptors that have had all their EntityDescriptor children remove are not themselves removed when EntityRoleFilterStage.isRemovingEntitylessEntitiesDescriptor() is false.

Throws:
Exception

buildMetadataCollection

private List<net.shibboleth.metadata.dom.DomElementItem> buildMetadataCollection()
                                                                          throws Exception
Build up a metadata collection containing 3 EntityDescriptors.

Throws:
Exception


Copyright © 1999-2012. All Rights Reserved.