Class InlineEncryptedKeyResolverTest


  • public class InlineEncryptedKeyResolverTest
    extends org.opensaml.core.xml.XMLObjectBaseTestCase
    Test the inline encrypted key resolver.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.opensaml.xmlsec.encryption.support.InlineEncryptedKeyResolver resolver
      The resolver instance to be tested.
      • Fields inherited from class org.opensaml.core.xml.XMLObjectBaseTestCase

        builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private List<org.opensaml.xmlsec.encryption.EncryptedKey> generateList​(org.opensaml.xmlsec.encryption.EncryptedData encData, org.opensaml.xmlsec.encryption.support.EncryptedKeyResolver ekResolver)
      Resolve EncryptedKeys and put them in an ordered list.
      void testMultiEKNoRecipients()
      No recipients specified to resolver.
      void testMultiEKOneRecipientWithMatch()
      One recipient specified to resolver, one matching and one recipient-less inline EncryptedKey in instance.
      void testMultiEKOneRecipientWithMatches()
      Multi recipient specified to resolver, several matching inline EncryptedKey in instance.
      void testSingleEKNoRecipients()
      No recipients specified to resolver, one inline EncryptedKey in instance.
      void testSingleEKOneRecipientNoMatch()
      One recipient specified to resolver, zero matching inline EncryptedKey in instance.
      void testSingleEKOneRecipientWithMatch()
      One recipient specified to resolver, one matching inline EncryptedKey in instance.
      • Methods inherited from class org.opensaml.core.xml.XMLObjectBaseTestCase

        assertXMLEquals, assertXMLEquals, buildXMLObject, getBuilder, getMarshaller, getMarshaller, getUnmarshaller, getUnmarshaller, getUnmarshaller, initXMLObjectSupport, parseXMLDocument, printXML, printXML, unmarshallElement, unmarshallElement
      • Methods inherited from class org.opensaml.core.OpenSAMLInitBaseTestCase

        initOpenSAML
    • Field Detail

      • resolver

        private org.opensaml.xmlsec.encryption.support.InlineEncryptedKeyResolver resolver
        The resolver instance to be tested.
    • Constructor Detail

      • InlineEncryptedKeyResolverTest

        public InlineEncryptedKeyResolverTest()
    • Method Detail

      • testSingleEKNoRecipients

        public void testSingleEKNoRecipients()
        No recipients specified to resolver, one inline EncryptedKey in instance.
      • testSingleEKOneRecipientWithMatch

        public void testSingleEKOneRecipientWithMatch()
        One recipient specified to resolver, one matching inline EncryptedKey in instance.
      • testSingleEKOneRecipientNoMatch

        public void testSingleEKOneRecipientNoMatch()
        One recipient specified to resolver, zero matching inline EncryptedKey in instance.
      • testMultiEKNoRecipients

        public void testMultiEKNoRecipients()
        No recipients specified to resolver.
      • testMultiEKOneRecipientWithMatch

        public void testMultiEKOneRecipientWithMatch()
        One recipient specified to resolver, one matching and one recipient-less inline EncryptedKey in instance.
      • testMultiEKOneRecipientWithMatches

        public void testMultiEKOneRecipientWithMatches()
        Multi recipient specified to resolver, several matching inline EncryptedKey in instance.
      • generateList

        private List<org.opensaml.xmlsec.encryption.EncryptedKey> generateList​(org.opensaml.xmlsec.encryption.EncryptedData encData,
                                                                               org.opensaml.xmlsec.encryption.support.EncryptedKeyResolver ekResolver)
        Resolve EncryptedKeys and put them in an ordered list.
        Parameters:
        encData - the EncryptedData context
        ekResolver - the resolver to test
        Returns:
        list of resolved EncryptedKeys