Package org.opensaml.xmlsec.keyinfo.impl
Class StaticKeyInfoGeneratorTest
- java.lang.Object
-
- org.opensaml.core.OpenSAMLInitBaseTestCase
-
- org.opensaml.core.xml.XMLObjectBaseTestCase
-
- org.opensaml.xmlsec.keyinfo.impl.StaticKeyInfoGeneratorTest
-
public class StaticKeyInfoGeneratorTest extends org.opensaml.core.xml.XMLObjectBaseTestCaseTest the static KeyInfo generator.
-
-
Field Summary
Fields Modifier and Type Field Description private StringexpectedKeyAlgorithmprivate StringexpectedKeyName1private StringexpectedKeyName2private PublicKeyexpectedKeyValueprivate org.opensaml.xmlsec.keyinfo.impl.StaticKeyInfoGeneratorgeneratorprivate org.opensaml.xmlsec.signature.KeyInfoorigKeyInfo
-
Constructor Summary
Constructors Constructor Description StaticKeyInfoGeneratorTest()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcheckKeyInfo(org.opensaml.xmlsec.signature.KeyInfo keyInfo)Check the correctness of the generated KeyInfo.protected voidsetUp()voidtestSimple()Simple test, should return the same instance every time.voidtestWithCloningNoDOMCache()Test with cloning, original KeyInfo has no cached DOM.voidtestWithCloningWithDOMCache()Test with cloning, original KeyInfo has a cached DOM.-
Methods inherited from class org.opensaml.core.xml.XMLObjectBaseTestCase
assertXMLEquals, assertXMLEquals, buildXMLObject, getBuilder, getMarshaller, getMarshaller, getUnmarshaller, getUnmarshaller, getUnmarshaller, initXMLObjectSupport, parseXMLDocument, printXML, printXML, unmarshallElement, unmarshallElement
-
-
-
-
Field Detail
-
generator
private org.opensaml.xmlsec.keyinfo.impl.StaticKeyInfoGenerator generator
-
origKeyInfo
private org.opensaml.xmlsec.signature.KeyInfo origKeyInfo
-
expectedKeyName1
private String expectedKeyName1
-
expectedKeyName2
private String expectedKeyName2
-
expectedKeyAlgorithm
private String expectedKeyAlgorithm
-
expectedKeyValue
private PublicKey expectedKeyValue
-
-
Method Detail
-
setUp
@BeforeMethod protected void setUp() throws Exception
- Throws:
Exception
-
testSimple
public void testSimple() throws org.opensaml.security.SecurityException, KeyExceptionSimple test, should return the same instance every time.- Throws:
org.opensaml.security.SecurityException- ...KeyException- ...
-
testWithCloningNoDOMCache
public void testWithCloningNoDOMCache() throws org.opensaml.security.SecurityException, KeyExceptionTest with cloning, original KeyInfo has no cached DOM.- Throws:
org.opensaml.security.SecurityException- ...KeyException- ...
-
testWithCloningWithDOMCache
public void testWithCloningWithDOMCache() throws org.opensaml.security.SecurityException, KeyException, org.opensaml.core.xml.io.MarshallingExceptionTest with cloning, original KeyInfo has a cached DOM.- Throws:
org.opensaml.security.SecurityException- ...KeyException- ...org.opensaml.core.xml.io.MarshallingException- ...
-
checkKeyInfo
private void checkKeyInfo(org.opensaml.xmlsec.signature.KeyInfo keyInfo) throws KeyExceptionCheck 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
-
-