[java-identity-provider] branch maint-4 updated: Add Scoping checks to unit tests.

Scott Cantor cantor.2 at osu.edu
Mon Dec 19 13:58:49 UTC 2022


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch maint-4
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=5cbb24a11455e7cce24758775a61ab0c6036a433

The following commit(s) were added to refs/heads/maint-4 by this push:
     new 5cbb24a11 Add Scoping checks to unit tests.
5cbb24a11 is described below

commit 5cbb24a11455e7cce24758775a61ab0c6036a433
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Dec 19 08:58:23 2022 -0500

    Add Scoping checks to unit tests.
---
 .../idp/saml/saml2/profile/impl/AddAuthnRequestTest.java           | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnRequestTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnRequestTest.java
index 0f6617bd9..90f6f8feb 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnRequestTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/saml2/profile/impl/AddAuthnRequestTest.java
@@ -144,6 +144,9 @@ public class AddAuthnRequestTest extends OpenSAMLInitBaseTestCase {
         assertTrue(nid.getAllowCreate());
         
         assertNull(request.getRequestedAuthnContext());
+        
+        final Scoping scoping = request.getScoping();
+        assertEquals(scoping.getRequesterIDs().get(0).getURI(), ActionTestingSupport.INBOUND_MSG_ISSUER);
     }
 
     /** Test that the action works for ForceAuthn/IsPassive. */
@@ -204,6 +207,7 @@ public class AddAuthnRequestTest extends OpenSAMLInitBaseTestCase {
         assertNotNull(scoping);
         assertNull(scoping.getProxyCount());
         assertNotNull(scoping.getIDPList());
+        assertEquals(scoping.getRequesterIDs().get(0).getURI(), ActionTestingSupport.INBOUND_MSG_ISSUER);
         
         final Set<String> requestedAuthorities = scoping.getIDPList().getIDPEntrys()
                 .stream()
@@ -230,6 +234,7 @@ public class AddAuthnRequestTest extends OpenSAMLInitBaseTestCase {
         assertNotNull(scoping);
         assertNull(scoping.getIDPList());
         assertEquals(scoping.getProxyCount(), Integer.valueOf(0));
+        assertEquals(scoping.getRequesterIDs().get(0).getURI(), ActionTestingSupport.INBOUND_MSG_ISSUER);
     }
 
     /** Test with Scoping element and count of 5. */
@@ -248,6 +253,7 @@ public class AddAuthnRequestTest extends OpenSAMLInitBaseTestCase {
         assertNotNull(scoping);
         assertNull(scoping.getIDPList());
         assertEquals(scoping.getProxyCount(), Integer.valueOf(4));
+        assertEquals(scoping.getRequesterIDs().get(0).getURI(), ActionTestingSupport.INBOUND_MSG_ISSUER);
     }
 
     /** Test with Scoping element and count of 0 (this shouldn't really happen). */
@@ -266,6 +272,7 @@ public class AddAuthnRequestTest extends OpenSAMLInitBaseTestCase {
         assertNotNull(scoping);
         assertNull(scoping.getIDPList());
         assertEquals(scoping.getProxyCount(), Integer.valueOf(0));
+        assertEquals(scoping.getRequesterIDs().get(0).getURI(), ActionTestingSupport.INBOUND_MSG_ISSUER);
     }
 
     /** Test that the action works for RequestedAuthnContext. */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list