[java-idp-testbed COMMIT] /trunk/src/test/java/idp/saml1/SAML1UnsolicitedFlowTest.java

noreply at shibboleth.net noreply at shibboleth.net
Tue Jan 28 18:40:23 EST 2014


Author: tzeller
Date: Tue Jan 28 18:40:22 2014
New Revision: 135

URL: http://svn.shibboleth.net/view/java-idp-testbed?rev=135&view=rev
Log:
Initial work on action to initialize the SAML 1 outbound message context.

Modified:
    trunk/src/test/java/idp/saml1/SAML1UnsolicitedFlowTest.java

Modified: trunk/src/test/java/idp/saml1/SAML1UnsolicitedFlowTest.java
URL: http://svn.shibboleth.net/view/java-idp-testbed/trunk/src/test/java/idp/saml1/SAML1UnsolicitedFlowTest.java?rev=135&r1=134&r2=135&view=diff
==============================================================================
--- trunk/src/test/java/idp/saml1/SAML1UnsolicitedFlowTest.java (original)
+++ trunk/src/test/java/idp/saml1/SAML1UnsolicitedFlowTest.java Tue Jan 28 18:40:22 2014
@@ -21,8 +21,10 @@
 
 import javax.annotation.Nonnull;
 
+import org.opensaml.profile.context.ProfileRequestContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.test.context.ContextConfiguration;
 import org.springframework.webflow.execution.FlowExecutionOutcome;
 import org.springframework.webflow.executor.FlowExecutionResult;
 import org.testng.Assert;
@@ -31,6 +33,8 @@
 /**
  * Test for SAML1 flow.
  */
+// TODO Remove ContextConfiguration once credentials are figured out.
+ at ContextConfiguration({"/system/conf/testbed-beans.xml", "file:src/main/webapp/WEB-INF/idp/testbed.xml"})
 public class SAML1UnsolicitedFlowTest extends AbstractFlowTest {
 
     /** Class logger. */
@@ -50,9 +54,14 @@
         log.debug("flow outcome {}", outcome);
         Assert.assertNotNull(outcome);
         Assert.assertEquals(outcome.getId(), "end");
+        Assert.assertTrue(result.isEnded());
+
+        Assert.assertTrue(outcome.getOutput().contains(OUTPUT_ATTR_NAME));
+        Assert.assertTrue(outcome.getOutput().get(OUTPUT_ATTR_NAME) instanceof ProfileRequestContext);
+        ProfileRequestContext prc = (ProfileRequestContext) outcome.getOutput().get(OUTPUT_ATTR_NAME);
+
+        Assert.assertNotNull(prc.getOutboundMessageContext());
 
         // TODO meaningful asserts
-
-        Assert.assertTrue(result.isEnded());
     }
 }



More information about the commits mailing list