[java-opensaml COMMIT] /trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/impl/RegexRequestU...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Nov 18 17:04:43 EST 2014
Author: putmanb
Date: Tue Nov 18 17:04:43 2014
New Revision: 4152
URL: http://svn.shibboleth.net/view/java-opensaml?rev=4152&view=rev
Log:
Make the tests a little more realistic, actually construct a URL.
Modified:
trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/impl/RegexRequestURLBuilderTest.java
Modified: trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/impl/RegexRequestURLBuilderTest.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/impl/RegexRequestURLBuilderTest.java?rev=4152&r1=4151&r2=4152&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/impl/RegexRequestURLBuilderTest.java (original)
+++ trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/impl/RegexRequestURLBuilderTest.java Tue Nov 18 17:04:43 2014
@@ -27,12 +27,12 @@
@Test
public void testBasic() {
// Attempt to pluck out the domain name into match group $1.
- function = new RegexRequestURLBuilder("^https?://([a-zA-Z0-9\\.]+).*$", "urn:test:domain:$1");
+ function = new RegexRequestURLBuilder("^https?://([a-zA-Z0-9\\.]+).*$", "http://metadata.example.org/query?domain=$1");
- Assert.assertEquals(function.apply("http://example.org"), "urn:test:domain:example.org");
- Assert.assertEquals(function.apply("http://example.org/"), "urn:test:domain:example.org");
- Assert.assertEquals(function.apply("http://example.org/idp"), "urn:test:domain:example.org");
- Assert.assertEquals(function.apply("http://example.org:443/idp"), "urn:test:domain:example.org");
+ Assert.assertEquals(function.apply("http://example.org"), "http://metadata.example.org/query?domain=example.org");
+ Assert.assertEquals(function.apply("http://example.org/"), "http://metadata.example.org/query?domain=example.org");
+ Assert.assertEquals(function.apply("http://example.org/idp"), "http://metadata.example.org/query?domain=example.org");
+ Assert.assertEquals(function.apply("http://example.org:443/idp"), "http://metadata.example.org/query?domain=example.org");
// These shouldn't match, so should return null.
Assert.assertNull(function.apply("urn:test:foo"));
More information about the commits
mailing list