Class InlineEncryptedKeyResolverTest
java.lang.Object
org.opensaml.core.testing.OpenSAMLInitBaseTestCase
org.opensaml.core.testing.XMLObjectBaseTestCase
org.opensaml.xmlsec.encryption.support.tests.InlineEncryptedKeyResolverTest
public class InlineEncryptedKeyResolverTest
extends org.opensaml.core.testing.XMLObjectBaseTestCase
Test the inline encrypted key resolver.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate InlineEncryptedKeyResolverThe resolver instance to be tested.Fields inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate List<EncryptedKey>generateList(EncryptedData encData, EncryptedKeyResolver ekResolver, Set<String> recipients) Resolve EncryptedKeys and put them in an ordered list.voidNo recipients specified to resolver.voidOne recipient specified to resolver, one matching and one recipient-less inline EncryptedKey in instance.voidMulti recipient specified to resolver, several matching inline EncryptedKey in instance.voidMulti recipient specified to resolver via ctor and method args.voidNo recipients specified to resolver, one inline EncryptedKey in instance.voidOne recipient specified to resolver, zero matching inline EncryptedKey in instance.voidOne recipient specified to resolver, one matching inline EncryptedKey in instance.Methods inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
assertXMLEquals, assertXMLEquals, buildXMLObject, getBuilder, getMarshaller, getMarshaller, getUnmarshaller, getUnmarshaller, getUnmarshaller, initXMLObjectSupport, parseXMLDocument, printXML, printXML, unmarshallElement, unmarshallElementMethods inherited from class org.opensaml.core.testing.OpenSAMLInitBaseTestCase
initOpenSAML
-
Field Details
-
resolver
The resolver instance to be tested.
-
-
Constructor Details
-
InlineEncryptedKeyResolverTest
public InlineEncryptedKeyResolverTest()
-
-
Method Details
-
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. -
testMultiRecipientsCtorAndArgs
public void testMultiRecipientsCtorAndArgs()Multi recipient specified to resolver via ctor and method args. -
generateList
@Nonnull private List<EncryptedKey> generateList(@Nonnull EncryptedData encData, @Nonnull EncryptedKeyResolver ekResolver, @Nullable Set<String> recipients) Resolve EncryptedKeys and put them in an ordered list.- Parameters:
encData- the EncryptedData contextekResolver- the resolver to testrecipients- the valid recipients for resolution- Returns:
- list of resolved EncryptedKeys
-