Updated metadata tests to synch with recent OpenSAML2 metadata interface rewrite.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 7 Jul 2006 14:35:36 +0000 (14:35 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 7 Jul 2006 14:35:36 +0000 (14:35 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1963 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

tests/edu/internet2/middleware/shibboleth/metadata/MetadataTests.java

index f639c1e..17c34dd 100644 (file)
@@ -25,11 +25,8 @@ import org.opensaml.saml2.metadata.EntityDescriptor;
 import org.opensaml.saml2.metadata.IDPSSODescriptor;
 import org.opensaml.saml2.metadata.KeyDescriptor;
 import org.opensaml.saml2.metadata.SPSSODescriptor;
-import org.opensaml.saml2.metadata.provider.MetadataCache;
+import org.opensaml.saml2.metadata.provider.FilesystemMetadataProvider;
 import org.opensaml.saml2.metadata.provider.MetadataProvider;
-import org.opensaml.saml2.metadata.provider.impl.CachingMetadataProvider;
-import org.opensaml.saml2.metadata.provider.impl.SoftReferenceMetadataCache;
-import org.opensaml.saml2.metadata.resolver.impl.URLResolver;
 import org.opensaml.xml.Configuration;
 import org.w3c.dom.Document;
 
@@ -102,11 +99,7 @@ public class MetadataTests extends TestCase {
 
                try {
                        // Load metadata
-                       MetadataCache cache = new SoftReferenceMetadataCache(60L, (short) 5, 60L);
-                       cache
-                                       .addMetadataResolver(new URLResolver("foobar", new File("src/conf/IQ-metadata.xml").toURL()
-                                                       .toString()));
-                       MetadataProvider metadata = new CachingMetadataProvider(cache);
+                       MetadataProvider metadata = new FilesystemMetadataProvider(new File("src/conf/IQ-metadata.xml"));
 
                        // Basic Query
                        EntityDescriptor entity = metadata.getEntityDescriptor("urn:mace:inqueue:example.edu");
@@ -141,11 +134,7 @@ public class MetadataTests extends TestCase {
 
                try {
                        // Load metadata
-                       MetadataCache cache = new SoftReferenceMetadataCache(60L, (short) 5, 60L);
-                       cache
-                                       .addMetadataResolver(new URLResolver("foobar", new File("src/conf/IQ-metadata.xml").toURL()
-                                                       .toString()));
-                       MetadataProvider metadata = new CachingMetadataProvider(cache);
+                       MetadataProvider metadata = new FilesystemMetadataProvider(new File("src/conf/IQ-metadata.xml"));
 
                        // Grab the Key Descriptors for an entity descriptor
                        Iterator<KeyDescriptor> keys = metadata.getEntityDescriptor("urn:mace:inqueue:example.edu")