[java-identity-provider COMMIT] in /trunk: idp-profile-api/src/test/java/net/shibboleth/idp/profile/RequestContextBui...

noreply at shibboleth.net noreply at shibboleth.net
Wed Oct 17 15:35:01 EDT 2012


Author: tzeller
Date: Wed Oct 17 15:35:01 2012
New Revision: 4220

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4220&view=rev
Log:
As part of webflow profile decoupling, profile tests now call action.doExecute(null, null, profileRequestContext) instead of action.execute(...). RequestContextBuilder.buildProfileRequestContext() is now public instead of protected.

Modified:
    trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/RequestContextBuilder.java
    trunk/idp-profile-impl/pom.xml
    trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/CheckMandatoryIssuerTest.java
    trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/CheckMandatoryLifetimeTest.java
    trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/InitializeProfileRequestContextTest.java
    trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/SchemaValidateXmlMessageTest.java

Modified: trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/RequestContextBuilder.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/RequestContextBuilder.java?rev=4220&r1=4219&r2=4220&view=diff
==============================================================================
--- trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/RequestContextBuilder.java (original)
+++ trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/RequestContextBuilder.java Wed Oct 17 15:35:01 2012
@@ -333,7 +333,7 @@
      * @return the constructed {@link ProfileRequestContext
 
      */
-    @Nonnull protected ProfileRequestContext buildProfileRequestContext() {
+    @Nonnull public ProfileRequestContext buildProfileRequestContext() {
         final ProfileRequestContext profileContext = new ProfileRequestContext();
         profileContext.setInboundMessageContext(buildInboundMessageContext());
         profileContext.setOutboundMessageContext(buildOutboundMessageContext());
@@ -520,6 +520,10 @@
             responderId = outboundMessageIssuer;
         }
 
+        if (relyingPartyProfileConfigurations == null) {
+            relyingPartyProfileConfigurations = new ArrayList<ProfileConfiguration>();
+        }
+        
         ArrayList<ProfileConfiguration> profileConfigs =
                 Lists.newArrayList(Iterables.filter(relyingPartyProfileConfigurations, Predicates.notNull()));
         if (profileConfigs.isEmpty()) {

Modified: trunk/idp-profile-impl/pom.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-impl/pom.xml?rev=4220&r1=4219&r2=4220&view=diff
==============================================================================
--- trunk/idp-profile-impl/pom.xml (original)
+++ trunk/idp-profile-impl/pom.xml Wed Oct 17 15:35:01 2012
@@ -35,6 +35,13 @@
             <type>test-jar</type>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>${opensaml.groupId}</groupId>
+            <artifactId>opensaml-core</artifactId>
+            <version>${opensaml.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
         
     </dependencies>
 

Modified: trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/CheckMandatoryIssuerTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/CheckMandatoryIssuerTest.java?rev=4220&r1=4219&r2=4220&view=diff
==============================================================================
--- trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/CheckMandatoryIssuerTest.java (original)
+++ trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/CheckMandatoryIssuerTest.java Wed Oct 17 15:35:01 2012
@@ -28,24 +28,26 @@
 /** Unit test for {@link CheckMandatoryIssuer}. */
 public class CheckMandatoryIssuerTest {
 
-    @Test
-    public void testWithIssuer() throws Exception {
+    @Test public void testWithIssuer() throws Exception {
         CheckMandatoryIssuer action = new CheckMandatoryIssuer();
         action.setId("test");
         action.initialize();
 
-        Event result = action.execute(new RequestContextBuilder().buildRequestContext());
+        Event result =
+                action.doExecute(null, null, new RequestContextBuilder().setInboundMessageIssuer("issuer")
+                        .buildProfileRequestContext());
+
         ActionTestingSupport.assertProceedEvent(result);
     }
 
-    @Test
-    public void testNoIssuer() throws Exception {
+    @Test public void testNoIssuer() throws Exception {
         CheckMandatoryIssuer action = new CheckMandatoryIssuer();
         action.setId("test");
         action.initialize();
 
         try {
-            action.execute(new RequestContextBuilder().setInboundMessageIssuer(null).buildRequestContext());
+            action.doExecute(null, null, new RequestContextBuilder().setInboundMessageIssuer(null)

[... 252 lines stripped ...]


More information about the commits mailing list