Class HTTPPostDecoderTest
- java.lang.Object
-
- org.opensaml.core.testing.OpenSAMLInitBaseTestCase
-
- org.opensaml.core.testing.XMLObjectBaseTestCase
-
- org.opensaml.saml.saml1.binding.decoding.impl.HTTPPostDecoderTest
-
public class HTTPPostDecoderTest extends XMLObjectBaseTestCase
Test case for SAML 1 HTTP POST decoding.
-
-
Field Summary
Fields Modifier and Type Field Description private HTTPPostDecoderdecoderprivate StringexpectedRelayValueprivate MockHttpServletRequesthttpRequestprivate static StringINVALID_BASE64_TRAILINGInvalid base64 string as it has invalid trailing digits.-
Fields inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory
-
-
Constructor Summary
Constructors Constructor Description HTTPPostDecoderTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringencodeMessage(SAMLObject message)private voidpopulateRequestURL(MockHttpServletRequest request, String requestURL)protected voidsetUp()voidtestDecode()Test decoding message.voidtestDecodeInvalidResponse()Test decoding a base64 invalid message.-
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
-
expectedRelayValue
private String expectedRelayValue
-
decoder
private HTTPPostDecoder decoder
-
httpRequest
private MockHttpServletRequest httpRequest
-
INVALID_BASE64_TRAILING
private static final String INVALID_BASE64_TRAILING
Invalid base64 string as it has invalid trailing digits.- See Also:
- Constant Field Values
-
-
Method Detail
-
testDecode
public void testDecode() throws ExceptionTest decoding message.- Throws:
Exception- if something goes wrong
-
testDecodeInvalidResponse
public void testDecodeInvalidResponse()
Test decoding a base64 invalid message. Should throw aMessageDecodingExceptionwrapping a DecodingException.
-
populateRequestURL
private void populateRequestURL(MockHttpServletRequest request, String requestURL)
-
encodeMessage
protected String encodeMessage(SAMLObject message) throws Exception
- Throws:
Exception
-
-