Class HTTPMetadataResolverTest
- java.lang.Object
-
- org.opensaml.core.testing.OpenSAMLInitBaseTestCase
-
- org.opensaml.core.testing.XMLObjectBaseTestCase
-
- org.opensaml.saml.metadata.resolver.impl.HTTPMetadataResolverTest
-
public class HTTPMetadataResolverTest extends XMLObjectBaseTestCase
Unit tests forHTTPMetadataResolver.
-
-
Field Summary
Fields Modifier and Type Field Description private StringbadMDURLprivate CriteriaSetcriteriaSet(package private) static StringDATA_PATHprivate StringentityIDprivate HttpClientBuilderhttpClientBuilderprivate HTTPMetadataResolvermetadataProviderprivate StringmetadataURLHttpprivate StringmetadataURLHttps-
Fields inherited from class org.opensaml.core.testing.XMLObjectBaseTestCase
builderFactory, marshallerFactory, parserPool, simpleXMLObjectQName, unmarshallerFactory
-
-
Constructor Summary
Constructors Constructor Description HTTPMetadataResolverTest()
-
Method Summary
-
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
-
httpClientBuilder
private HttpClientBuilder httpClientBuilder
-
metadataURLHttp
private String metadataURLHttp
-
metadataURLHttps
private String metadataURLHttps
-
badMDURL
private String badMDURL
-
entityID
private String entityID
-
metadataProvider
private HTTPMetadataResolver metadataProvider
-
criteriaSet
private CriteriaSet criteriaSet
-
DATA_PATH
static final String DATA_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
setUpClass
@BeforeClass protected void setUpClass()
-
testGetEntityDescriptor
public void testGetEntityDescriptor() throws ExceptionTests theAbstractMetadataResolver.lookupEntityID(String)method.- Throws:
Exception
-
testFailFastBadURL
public void testFailFastBadURL() throws ExceptionTest fail-fast = true with known bad metadata URL.- Throws:
Exception- if something goes wrong
-
testNoFailFastBadURL
public void testNoFailFastBadURL() throws ExceptionTest fail-fast = false with known bad metadata URL.- Throws:
Exception- if something goes wrong
-
testTrustEngineSocketFactoryNoHTTPSNoTrustEngine
public void testTrustEngineSocketFactoryNoHTTPSNoTrustEngine() throws Exception- Throws:
Exception
-
testTrustEngineSocketFactoryNoHTTPSWithTrustEngine
public void testTrustEngineSocketFactoryNoHTTPSWithTrustEngine() throws Exception- Throws:
Exception
-
testHTTPSTrustEngineExplicitKey
public void testHTTPSTrustEngineExplicitKey() throws Exception- Throws:
Exception
-
testHTTPSTrustEngineInvalidKey
public void testHTTPSTrustEngineInvalidKey() throws Exception- Throws:
Exception
-
testHTTPSTrustEngineValidPKIX
public void testHTTPSTrustEngineValidPKIX() throws Exception- Throws:
Exception
-
testHTTPSTrustEngineValidPKIXExplicitName
public void testHTTPSTrustEngineValidPKIXExplicitName() throws Exception- Throws:
Exception
-
testHTTPSTrustEngineInvalidPKIX
public void testHTTPSTrustEngineInvalidPKIX() throws Exception- Throws:
Exception
-
testHTTPSTrustEngineValidPKIXInvalidName
public void testHTTPSTrustEngineValidPKIXInvalidName() throws Exception- Throws:
Exception
-
testHTTPSTrustEngineWrongSocketFactory
public void testHTTPSTrustEngineWrongSocketFactory() throws Exception- Throws:
Exception
-
buildPKIXTrustEngine
public static TrustEngine<? super X509Credential> buildPKIXTrustEngine(String cert, String name, boolean nameCheckEnabled) throws URISyntaxException, CertificateException, IOException
-
buildExplicitKeyTrustEngine
public static TrustEngine<? super X509Credential> buildExplicitKeyTrustEngine(String cert) throws URISyntaxException, CertificateException, IOException
-
buildSocketFactory
public static org.apache.http.conn.socket.LayeredConnectionSocketFactory buildSocketFactory()
-
buildSocketFactory
public static org.apache.http.conn.socket.LayeredConnectionSocketFactory buildSocketFactory(boolean supportTrustEngine)
-
-