Class ChainingKeyInfoCredentialResolverTest

java.lang.Object
org.opensaml.core.testing.OpenSAMLInitBaseTestCase
org.opensaml.core.testing.XMLObjectBaseTestCase
org.opensaml.xmlsec.keyinfo.impl.ChainingKeyInfoCredentialResolverTest

public class ChainingKeyInfoCredentialResolverTest extends org.opensaml.core.testing.XMLObjectBaseTestCase
  • Field Details

  • Constructor Details

    • ChainingKeyInfoCredentialResolverTest

      public ChainingKeyInfoCredentialResolverTest()
  • Method Details

    • buildCredsAndResolvers

      @BeforeClass protected void buildCredsAndResolvers() throws Exception
      Throws:
      Exception
    • testOneEmptyMember

      public void testOneEmptyMember() throws ResolverException
      Test a single chain member, which returns no credentials.
      Throws:
      ResolverException - ...
    • testMultipleEmptyMember

      public void testMultipleEmptyMember() throws ResolverException
      Test multiple chain members, all of which return no credentials.
      Throws:
      ResolverException - ...
    • testOneMember

      public void testOneMember() throws ResolverException
      Test one chain member, returning credentials.
      Throws:
      ResolverException - ...
    • testMultipleMembers

      public void testMultipleMembers() throws ResolverException
      Test multiple chain members, returning credentials.
      Throws:
      ResolverException - ...
    • testOrderingMultipleMembers

      public void testOrderingMultipleMembers() throws ResolverException
      Test that order of returned credentials is the expected ordering, based on the ordering in the resolver chain.
      Throws:
      ResolverException - ...
    • testEmptyResolverChain

      public void testEmptyResolverChain() throws ResolverException
      Test empty resolver chain, i.e. no underlying resolver members.
      Throws:
      ResolverException - ...
    • testRemove

      public void testRemove() throws ResolverException
      Test exception on attempt to call remove() on iterator.
      Throws:
      ResolverException - ...
    • testNoMoreMembers

      public void testNoMoreMembers() throws ResolverException
      Test exception on attempt to call next() on iterator when no more members.
      Throws:
      ResolverException - ...
    • testChainUnmodifiable

      public void testChainUnmodifiable()
    • getResolved

      private List<Credential> getResolved(Iterable<Credential> iter)
      Get a set of the things that matched the set of criteria.
      Parameters:
      iter - credential iterator
      Returns:
      set of all credentials that were resolved
    • checkResolved

      private void checkResolved(List<Credential> resolved, int expectedNum, Credential... expectedCreds)
      Helper method to evaluate the results of getResolved.
      Parameters:
      resolved - set of resolved credentials
      expectedNum - expected number of resolved credentials
      expectedCreds - the vararg list of the credentials expected