[java-identity-provider COMMIT] /trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/saml1/SAML1ActionSu...
noreply at shibboleth.net
noreply at shibboleth.net
Mon Feb 24 14:55:15 EST 2014
Author: scantor
Date: Mon Feb 24 14:55:15 2014
New Revision: 5463
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5463&view=rev
Log:
Fix unit test utility.
Modified:
trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/saml1/SAML1ActionSupportTest.java
Modified: trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/saml1/SAML1ActionSupportTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/saml1/SAML1ActionSupportTest.java?rev=5463&r1=5462&r2=5463&view=diff
==============================================================================
--- trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/saml1/SAML1ActionSupportTest.java (original)
+++ trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/profile/saml1/SAML1ActionSupportTest.java Mon Feb 24 14:55:15 2014
@@ -28,6 +28,7 @@
import org.opensaml.saml.saml1.core.Assertion;
import org.opensaml.saml.saml1.core.Conditions;
import org.opensaml.saml.saml1.core.Response;
+import org.opensaml.saml.saml1.profile.SAML1ActionSupport;
import org.springframework.webflow.execution.RequestContext;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -65,10 +66,14 @@
RelyingPartyContext relyingPartyCtx = relyingPartyContextLookupStrategy.apply(profileRequestContext);
Assert.assertEquals(response.getAssertions().size(), 0, "Expected zarro assertions before insert");
- Assertion assertion = SAML1ActionSupport.addAssertionToResponse(action, relyingPartyCtx, response);
+ Assertion assertion = SAML1ActionSupport.addAssertionToResponse(action, response,
+ relyingPartyCtx.getProfileConfig().getSecurityConfiguration().getIdGenerator(),
+ relyingPartyCtx.getConfiguration().getResponderId());
Assert.assertEquals(response.getAssertions().size(), 1, "Expected but one assertion after insert");
Assert.assertTrue(response.getAssertions().contains(assertion), "Inserted assertion should be there");
- Assertion second = SAML1ActionSupport.addAssertionToResponse(action, relyingPartyCtx, response);
+ Assertion second = SAML1ActionSupport.addAssertionToResponse(action, response,
+ relyingPartyCtx.getProfileConfig().getSecurityConfiguration().getIdGenerator(),
+ relyingPartyCtx.getConfiguration().getResponderId());
Assert.assertEquals(response.getAssertions().size(), 2, "Expected two assertions after two inserts");
Assert.assertTrue(response.getAssertions().contains(assertion), "Inserted assertion should be there");
Assert.assertNotSame(second, assertion, "Two separate assertions should have been added");
More information about the commits
mailing list