Package org.opensaml.saml.security.impl
Class SAMLSignatureProfileValidatorTest
- java.lang.Object
-
- org.opensaml.core.testing.OpenSAMLInitBaseTestCase
-
- org.opensaml.core.testing.XMLObjectBaseTestCase
-
- org.opensaml.saml.security.impl.SAMLSignatureProfileValidatorTest
-
public class SAMLSignatureProfileValidatorTest extends XMLObjectBaseTestCase
Test the SAML XML Signature profile validator.
-
-
Field Summary
Fields Modifier and Type Field Description private SAMLSignatureProfileValidatorvalidator-
Fields inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory
-
-
Constructor Summary
Constructors Constructor Description SAMLSignatureProfileValidatorTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidassertValidationFail(String message, Signature validateTarget)Asserts that the validation of the specified Signature target failed, as expected.protected voidassertValidationPass(String message, Signature validateTarget)Asserts that the validation of the specified Signature target was successful, as expected.protected SignaturegetSignature(String filename)Get the signature to validated.protected voidsetUp()voidtestInvalidBadTransform()voidtestInvalidBadURIValue()voidtestInvalidDuplicateIDs()voidtestInvalidMissingEnvelopedTransform()voidtestInvalidMissingID()voidtestInvalidNonLocalURI()voidtestInvalidNoXMLSignature()voidtestInvalidTooManyReferences()voidtestInvalidTooManyTransforms()voidtestValid()-
Methods inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
assertXMLEquals, assertXMLEquals, buildXMLObject, getBuilder, getMarshaller, getMarshaller, getUnmarshaller, getUnmarshaller, getUnmarshaller, initXMLObjectSupport, parseXMLDocument, printXML, printXML, unmarshallElement, unmarshallElement
-
Methods inherited from class org.opensaml.core.testing.OpenSAMLInitBaseTestCase
initOpenSAML
-
-
-
-
Field Detail
-
validator
private SAMLSignatureProfileValidator validator
-
-
Method Detail
-
testValid
public void testValid()
-
testInvalidNoXMLSignature
public void testInvalidNoXMLSignature()
-
testInvalidTooManyReferences
public void testInvalidTooManyReferences()
-
testInvalidNonLocalURI
public void testInvalidNonLocalURI()
-
testInvalidMissingID
public void testInvalidMissingID()
-
testInvalidBadURIValue
public void testInvalidBadURIValue()
-
testInvalidTooManyTransforms
public void testInvalidTooManyTransforms()
-
testInvalidBadTransform
public void testInvalidBadTransform()
-
testInvalidMissingEnvelopedTransform
public void testInvalidMissingEnvelopedTransform()
-
testInvalidDuplicateIDs
public void testInvalidDuplicateIDs()
-
getSignature
protected Signature getSignature(String filename)
Get the signature to validated. Assume the document element of the file is a SignableSAMLObject.- Parameters:
filename- file containing a signed SignableSAMLObject as its document element.- Returns:
- the signature from the indicated element
-
assertValidationPass
protected void assertValidationPass(String message, Signature validateTarget)
Asserts that the validation of the specified Signature target was successful, as expected.- Parameters:
message- failure message if the validation does not passvalidateTarget- the XMLObject to validate
-
-