[java-identity-provider COMMIT] in /trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/nameid: DefaultSAM...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Jan 28 14:59:26 EST 2014
Author: scantor
Date: Tue Jan 28 14:59:25 2014
New Revision: 5260
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5260&view=rev
Log:
Add format parameter to NameIdentifierGenerator interface, needed for legacy NameIDEncoder support
Modified:
trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/nameid/DefaultSAML1NameIdentifierGeneratorTest.java
trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/nameid/DefaultSAML2NameIDGeneratorTest.java
Modified: trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/nameid/DefaultSAML1NameIdentifierGeneratorTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/nameid/DefaultSAML1NameIdentifierGeneratorTest.java?rev=5260&r1=5259&r2=5260&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/nameid/DefaultSAML1NameIdentifierGeneratorTest.java (original)
+++ trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/nameid/DefaultSAML1NameIdentifierGeneratorTest.java Tue Jan 28 14:59:25 2014
@@ -99,7 +99,7 @@
@Test public void testNoSource() throws ComponentInitializationException, ProfileException {
generator.setAttributeSourceIds(Collections.singletonList("bar"));
generator.initialize();
- Assert.assertNull(generator.generate(prc));
+ Assert.assertNull(generator.generate(prc, generator.getFormat()));
}
@Test public void testWrongType() throws Exception {
@@ -119,7 +119,7 @@
generator.setAttributeSourceIds(Collections.singletonList(ATTR_NAME));
generator.initialize();
- Assert.assertNull(generator.generate(prc));
+ Assert.assertNull(generator.generate(prc, generator.getFormat()));
}
@Test public void testWrongFormat() throws Exception {
@@ -132,7 +132,7 @@
generator.setFormat(NameIdentifier.EMAIL);
generator.setAttributeSourceIds(Collections.singletonList(ATTR_NAME));
generator.initialize();
- Assert.assertNull(generator.generate(prc));
+ Assert.assertNull(generator.generate(prc, generator.getFormat()));
}
@Test public void testNameIdentifierValued() throws Exception {
@@ -144,7 +144,7 @@
generator.setAttributeSourceIds(Collections.singletonList(ATTR_NAME));
generator.initialize();
- final NameIdentifier outputNameId = generator.generate(prc);
+ final NameIdentifier outputNameId = generator.generate(prc, generator.getFormat());
Assert.assertNotNull(outputNameId);
Assert.assertEquals(outputNameId.getNameIdentifier(), NAME_1);
@@ -162,7 +162,7 @@
generator.setAttributeSourceIds(Collections.singletonList(ATTR_NAME));
generator.initialize();
- final NameIdentifier outputNameId = generator.generate(prc);
+ final NameIdentifier outputNameId = generator.generate(prc, generator.getFormat());
Assert.assertNotNull(outputNameId);
Assert.assertEquals(outputNameId.getNameIdentifier(), NAME_1);
@@ -180,7 +180,7 @@
generator.setAttributeSourceIds(Collections.singletonList(ATTR_NAME));
generator.initialize();
- final NameIdentifier outputNameId = generator.generate(prc);
+ final NameIdentifier outputNameId = generator.generate(prc, generator.getFormat());
Assert.assertNotNull(outputNameId);
Assert.assertEquals(outputNameId.getNameIdentifier(), NAME_1);
@@ -199,7 +199,7 @@
generator.setAttributeSourceIds(Collections.singletonList(ATTR_NAME));
generator.initialize();
- final NameIdentifier outputNameId = generator.generate(prc);
+ final NameIdentifier outputNameId = generator.generate(prc, generator.getFormat());
Assert.assertNotNull(outputNameId);
Assert.assertEquals(outputNameId.getNameIdentifier(), NAME_1 + '@' + QUALIFIER);
Modified: trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/nameid/DefaultSAML2NameIDGeneratorTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/nameid/DefaultSAML2NameIDGeneratorTest.java?rev=5260&r1=5259&r2=5260&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/nameid/DefaultSAML2NameIDGeneratorTest.java (original)
+++ trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/nameid/DefaultSAML2NameIDGeneratorTest.java Tue Jan 28 14:59:25 2014
@@ -99,7 +99,7 @@
@Test public void testNoSource() throws ComponentInitializationException, ProfileException {
generator.setAttributeSourceIds(Collections.singletonList("bar"));
generator.initialize();
- Assert.assertNull(generator.generate(prc));
+ Assert.assertNull(generator.generate(prc, generator.getFormat()));
}
@Test public void testWrongType() throws Exception {
@@ -119,7 +119,7 @@
[... 54 lines stripped ...]
More information about the commits
mailing list