[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 14:50:24 EST 2014


Author: putmanb
Date: Fri Nov  7 14:50:24 2014
New Revision: 4134

URL: http://svn.shibboleth.net/view/java-opensaml?rev=4134&view=rev
Log:
Add basic test for MetadataQueryProtocol, for now using Ian's responder. 

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=4134&r1=4133&r2=4134&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 14:50:24 2014
@@ -180,5 +180,28 @@
         Assert.assertNull(ed);
     }
     
+    @Test
+    public void testMDQ() throws Exception {
+        //TODO update with permanent test target, when it's stood up on shibboleth.net
+        String baseURL = "http://md.iay.org.uk/global";
+        String entityID = "https://login.cmu.edu/idp/shibboleth";
+        
+        MetadataQueryProtocolRequestURLBuilder requestURLBuilder = new MetadataQueryProtocolRequestURLBuilder(baseURL);
+        
+        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);
+    }
+    
     
 }



More information about the commits mailing list