Package org.opensaml.xmlsec.keyinfo.impl
Class StaticKeyInfoGeneratorTest
java.lang.Object
org.opensaml.core.testing.OpenSAMLInitBaseTestCase
org.opensaml.core.testing.XMLObjectBaseTestCase
org.opensaml.xmlsec.keyinfo.impl.StaticKeyInfoGeneratorTest
public class StaticKeyInfoGeneratorTest
extends org.opensaml.core.testing.XMLObjectBaseTestCase
Test the static KeyInfo generator.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate Stringprivate Stringprivate PublicKeyprivate StaticKeyInfoGeneratorprivate KeyInfoFields inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcheckKeyInfo(KeyInfo keyInfo) Check the correctness of the generated KeyInfo.protected voidsetUp()voidSimple test, should return the same instance every time.voidTest with cloning, original KeyInfo has no cached DOM.voidTest with cloning, original KeyInfo has a cached DOM.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
-
generator
-
origKeyInfo
-
expectedKeyName1
-
expectedKeyName2
-
expectedKeyAlgorithm
-
expectedKeyValue
-
-
Constructor Details
-
StaticKeyInfoGeneratorTest
public StaticKeyInfoGeneratorTest()Constructor.
-
-
Method Details
-
setUp
- Throws:
Exception
-
testSimple
Simple test, should return the same instance every time.- Throws:
SecurityException- ...KeyException- ...
-
testWithCloningNoDOMCache
Test with cloning, original KeyInfo has no cached DOM.- Throws:
SecurityException- ...KeyException- ...
-
testWithCloningWithDOMCache
public void testWithCloningWithDOMCache() throws SecurityException, KeyException, MarshallingExceptionTest with cloning, original KeyInfo has a cached DOM.- Throws:
SecurityException- ...KeyException- ...MarshallingException- ...
-
checkKeyInfo
Check the correctness of the generated KeyInfo.- Parameters:
keyInfo- the KeyInfo to check- Throws:
KeyException- if there is an error extracting the Java key from the KeyInfo
-