Package org.opensaml.xmlsec.keyinfo.impl
Class BasicKeyInfoGeneratorTest
- java.lang.Object
-
- org.opensaml.core.OpenSAMLInitBaseTestCase
-
- org.opensaml.core.xml.XMLObjectBaseTestCase
-
- org.opensaml.xmlsec.keyinfo.impl.BasicKeyInfoGeneratorTest
-
public class BasicKeyInfoGeneratorTest extends XMLObjectBaseTestCase
Tests the factory and impl for BasicKeyInfoGenerator.
-
-
Field Summary
Fields Modifier and Type Field Description private BasicCredentialcredentialprivate StringentityIDprivate BasicKeyInfoGeneratorFactoryfactoryprivate KeyInfoGeneratorgeneratorprivate StringkeyNameBarprivate StringkeyNameFooprivate PublicKeypubKeyprivate StringrsaBase64-
Fields inherited from class org.opensaml.core.xml.XMLObjectBaseTestCase
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory
-
-
Constructor Summary
Constructors Constructor Description BasicKeyInfoGeneratorTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidsetUp()voidtestEmitEntityIDAsKeyName()Test emit entity ID as key name.voidtestEmitKeynames()Test emit credential key names.voidtestEmitPublicKey()Test emit public key.voidtestNoOptions()Test no options - should produce null KeyInfo.voidtestProperOptionsCloning()Test that the options passed to the generator are really cloned.-
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
-
credential
private BasicCredential credential
-
factory
private BasicKeyInfoGeneratorFactory factory
-
generator
private KeyInfoGenerator generator
-
keyNameFoo
private String keyNameFoo
-
keyNameBar
private String keyNameBar
-
entityID
private String entityID
-
pubKey
private PublicKey pubKey
-
rsaBase64
private final String rsaBase64
- See Also:
- Constant Field Values
-
-
Method Detail
-
setUp
@BeforeMethod protected void setUp() throws Exception
- Throws:
Exception
-
testNoOptions
public void testNoOptions() throws SecurityExceptionTest no options - should produce null KeyInfo.- Throws:
SecurityException- ...
-
testEmitPublicKey
public void testEmitPublicKey() throws SecurityException, KeyExceptionTest emit public key.- Throws:
SecurityException- ...KeyException- ...
-
testEmitKeynames
public void testEmitKeynames() throws SecurityExceptionTest emit credential key names.- Throws:
SecurityException- ...
-
testEmitEntityIDAsKeyName
public void testEmitEntityIDAsKeyName() throws SecurityExceptionTest emit entity ID as key name.- Throws:
SecurityException- ...
-
testProperOptionsCloning
public void testProperOptionsCloning() throws SecurityExceptionTest that the options passed to the generator are really cloned. After newInstance() is called, changes to the factory options should not be reflected in the generator.- Throws:
SecurityException- ...
-
-