[java-opensaml COMMIT] /trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/impl/FunctionDrive...
noreply at shibboleth.net
noreply at shibboleth.net
Fri Nov 7 17:07:55 EST 2014
Author: putmanb
Date: Fri Nov 7 17:07:55 2014
New Revision: 4135
URL: http://svn.shibboleth.net/view/java-opensaml?rev=4135&view=rev
Log:
Add a well-known location test.
Modified:
trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/impl/FunctionDrivenDynamicHTTPMetadataResolverTest.java
Modified: trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/impl/FunctionDrivenDynamicHTTPMetadataResolverTest.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/impl/FunctionDrivenDynamicHTTPMetadataResolverTest.java?rev=4135&r1=4134&r2=4135&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/impl/FunctionDrivenDynamicHTTPMetadataResolverTest.java (original)
+++ trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/impl/FunctionDrivenDynamicHTTPMetadataResolverTest.java Fri Nov 7 17:07:55 2014
@@ -134,7 +134,6 @@
String template = "http://bogus.example.org/metadata?entityID=${entityID}";
String entityID = "https://www.example.org/sp";
- // Digesting the entityID is a little artificial for the test, but means we can test more easily against a path in the repo.
TemplateRequestURLBuilder requestURLBuilder = new TemplateRequestURLBuilder(
VelocityEngine.newVelocityEngine(),
template,
@@ -160,7 +159,6 @@
String template = "http://shibboleth.net/unittests/metadata?entityID=${entityID}";
String entityID = "https://www.example.org/sp";
- // Digesting the entityID is a little artificial for the test, but means we can test more easily against a path in the repo.
TemplateRequestURLBuilder requestURLBuilder = new TemplateRequestURLBuilder(
VelocityEngine.newVelocityEngine(),
template,
@@ -178,6 +176,28 @@
EntityDescriptor ed = resolver.resolveSingle(criteriaSet);
Assert.assertNull(ed);
+ }
+
+ @Test
+ public void testWellKnownLocation() throws Exception {
+ //TODO update with permanent test target, if there is a better one.
+ String entityID = "https://issues.shibboleth.net/shibboleth";
+
+ HTTPEntityIDRequestURLBuilder requestURLBuilder = new HTTPEntityIDRequestURLBuilder();
+
+ HttpClient httpClient = new HttpClientBuilder().buildClient();
+
+ resolver = new FunctionDrivenDynamicHTTPMetadataResolver(httpClient);
+ resolver.setId("myDynamicResolver");
+ resolver.setParserPool(parserPool);
+ resolver.setRequestURLBuilder(requestURLBuilder);
+ resolver.initialize();
+
+ CriteriaSet criteriaSet = new CriteriaSet( new EntityIdCriterion(entityID));
+
+ EntityDescriptor ed = resolver.resolveSingle(criteriaSet);
+ Assert.assertNotNull(ed);
+ Assert.assertEquals(ed.getEntityID(), entityID);
}
@Test
More information about the commits
mailing list