[java-opensaml COMMIT] /trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/index/impl/SAMLArt...

noreply at shibboleth.net noreply at shibboleth.net
Wed Oct 5 19:28:32 EDT 2016


Author: putmanb
Date: Wed Oct  5 19:28:32 2016
New Revision: 4516

URL: http://svn.shibboleth.net/view/java-opensaml?rev=4516&view=rev
Log:
Add test of index key location canonicalization.

Modified:
    trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/index/impl/SAMLArtifactMetadataIndexTest.java

Modified: trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/index/impl/SAMLArtifactMetadataIndexTest.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/index/impl/SAMLArtifactMetadataIndexTest.java?rev=4516&r1=4515&r2=4516&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/index/impl/SAMLArtifactMetadataIndexTest.java	(original)
+++ trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/index/impl/SAMLArtifactMetadataIndexTest.java	Wed Oct  5 19:28:32 2016
@@ -272,6 +272,9 @@
         MetadataIndexKey keySame = 
                 new SAMLArtifactMetadataIndex.ArtifactSourceLocationMetadataIndexKey(sourceLocation1);
                 
+        MetadataIndexKey keySameCanonicalized = 
+                new SAMLArtifactMetadataIndex.ArtifactSourceLocationMetadataIndexKey("HTTPS://WWW.EXAMPLE.COM:443/saml/artifactResolve1?foo=x&bar=y#someFragment");
+                
         MetadataIndexKey keyDifferent = 
                 new SAMLArtifactMetadataIndex.ArtifactSourceLocationMetadataIndexKey("https://bogus.example.org/sp");
                 
@@ -279,6 +282,9 @@
         Assert.assertEquals(sourceLocationKey1, keySame);
         Assert.assertTrue(sourceLocationKey1.hashCode() == keySame.hashCode());
         
+        Assert.assertEquals(sourceLocationKey1, keySameCanonicalized);
+        Assert.assertTrue(sourceLocationKey1.hashCode() == keySameCanonicalized.hashCode());
+        
         Assert.assertNotEquals(sourceLocationKey1, keyDifferent);
     }
 



More information about the commits mailing list