Class DefaultEndpointResolverTest
- java.lang.Object
-
- org.opensaml.core.testing.OpenSAMLInitBaseTestCase
-
- org.opensaml.core.testing.XMLObjectBaseTestCase
-
- org.opensaml.saml.common.binding.impl.DefaultEndpointResolverTest
-
public class DefaultEndpointResolverTest extends XMLObjectBaseTestCase
Test forDefaultEndpointResolver.
-
-
Field Summary
Fields Modifier and Type Field Description private EndpointCriterion<AssertionConsumerService>endpointCritprivate static StringLOCATIONprivate static StringLOCATION_ARTprivate static StringLOCATION_POSTprivate DefaultEndpointResolver<AssertionConsumerService>resolver-
Fields inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory
-
-
Constructor Summary
Constructors Constructor Description DefaultEndpointResolverTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclassSetUp()private SPSSODescriptorloadMetadata(String path)voidsetUp()voidtestBadBinding()No endpoint at a location with the right binding requested.voidtestBadIndex()No endpoint with a requested index.voidtestBadLocation()No endpoint with the location requested.voidtestBestMatch()Get the "best" endpoint.voidtestDefault()Get the default endpoint.voidtestDefaultForBinding()Get the default endpoint with a binding.voidtestInMetadata()Requested location/binding are in metadata.voidtestMultiple()All endpoints of the right type.voidtestMultipleBindingImposeOrdered()All endpoints of the right type in a supplied binding order.voidtestMultipleBindingMetadataOrdered()All endpoints of the right type in a supplied binding order.voidtestMultipleWithBinding()All endpoints of the right type and binding.voidtestNoCriteria()voidtestNoEndpoints()An SP with no endpoints in metadata.voidtestNoMetadata()voidtestSignedRequest()voidtestSignedRequestBadBinding()SP requests an endpoint but we don't support the binding.voidtestUnsupportedBinding()Endpoint matches but we don't support the binding.-
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
-
LOCATION
private static final String LOCATION
- See Also:
- Constant Field Values
-
LOCATION_POST
private static final String LOCATION_POST
- See Also:
- Constant Field Values
-
LOCATION_ART
private static final String LOCATION_ART
- See Also:
- Constant Field Values
-
resolver
private DefaultEndpointResolver<AssertionConsumerService> resolver
-
endpointCrit
private EndpointCriterion<AssertionConsumerService> endpointCrit
-
-
Method Detail
-
classSetUp
@BeforeClass public void classSetUp() throws ComponentInitializationException- Throws:
ComponentInitializationException
-
setUp
@BeforeMethod public void setUp()
-
testNoCriteria
public void testNoCriteria() throws ResolverException- Throws:
ResolverException
-
testNoMetadata
public void testNoMetadata() throws ResolverException- Throws:
ResolverException
-
testSignedRequest
public void testSignedRequest() throws ResolverException- Throws:
ResolverException
-
testSignedRequestBadBinding
public void testSignedRequestBadBinding() throws ResolverExceptionSP requests an endpoint but we don't support the binding.- Throws:
ResolverException- ...
-
testNoEndpoints
public void testNoEndpoints() throws UnmarshallingException, ResolverExceptionAn SP with no endpoints in metadata.- Throws:
UnmarshallingException- ...ResolverException- ...
-
testBadLocation
public void testBadLocation() throws UnmarshallingException, ResolverExceptionNo endpoint with the location requested.- Throws:
UnmarshallingException- ...ResolverException- ...
-
testBadBinding
public void testBadBinding() throws UnmarshallingException, ResolverExceptionNo endpoint at a location with the right binding requested.- Throws:
UnmarshallingException- ...ResolverException- ...
-
testUnsupportedBinding
public void testUnsupportedBinding() throws UnmarshallingException, ResolverExceptionEndpoint matches but we don't support the binding.- Throws:
UnmarshallingException- ...ResolverException- ...
-
testBadIndex
public void testBadIndex() throws UnmarshallingException, ResolverExceptionNo endpoint with a requested index.- Throws:
UnmarshallingException- ...ResolverException- ...
-
testInMetadata
public void testInMetadata() throws UnmarshallingException, ResolverExceptionRequested location/binding are in metadata.- Throws:
UnmarshallingException- ...ResolverException- ...
-
testDefault
public void testDefault() throws UnmarshallingException, ResolverExceptionGet the default endpoint.- Throws:
UnmarshallingException- ...ResolverException- ...
-
testDefaultForBinding
public void testDefaultForBinding() throws UnmarshallingException, ResolverExceptionGet the default endpoint with a binding.- Throws:
UnmarshallingException- ...ResolverException- ...
-
testMultiple
public void testMultiple() throws UnmarshallingException, ResolverExceptionAll endpoints of the right type.- Throws:
UnmarshallingException- ...ResolverException- ...
-
testMultipleBindingMetadataOrdered
public void testMultipleBindingMetadataOrdered() throws UnmarshallingException, ResolverExceptionAll endpoints of the right type in a supplied binding order.- Throws:
UnmarshallingException- ...ResolverException- ...
-
testMultipleBindingImposeOrdered
public void testMultipleBindingImposeOrdered() throws UnmarshallingException, ResolverException, ComponentInitializationExceptionAll endpoints of the right type in a supplied binding order.- Throws:
UnmarshallingException- ...ResolverException- ...ComponentInitializationException
-
testMultipleWithBinding
public void testMultipleWithBinding() throws UnmarshallingException, ResolverExceptionAll endpoints of the right type and binding.- Throws:
UnmarshallingException- ...ResolverException- ...
-
testBestMatch
public void testBestMatch() throws UnmarshallingException, ResolverExceptionGet the "best" endpoint.- Throws:
UnmarshallingException- ...ResolverException- ...
-
loadMetadata
@Nonnull private SPSSODescriptor loadMetadata(@Nonnull @NotEmpty String path) throws UnmarshallingException
- Throws:
UnmarshallingException
-
-