[java-identity-provider COMMIT] /trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml1/AddResp...

noreply at shibboleth.net noreply at shibboleth.net
Wed Oct 10 18:16:58 EDT 2012


Author: tzeller
Date: Wed Oct 10 18:16:58 2012
New Revision: 4218

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4218&view=rev
Log:
Fixed test to check for event id rather than catching an exception. IDP-191.

Modified:
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml1/AddResponseShellTest.java

Modified: trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml1/AddResponseShellTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml1/AddResponseShellTest.java?rev=4218&r1=4217&r2=4218&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml1/AddResponseShellTest.java (original)
+++ trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml1/AddResponseShellTest.java Wed Oct 10 18:16:58 2012
@@ -20,6 +20,7 @@
 import net.shibboleth.idp.profile.ActionTestingSupport;
 import net.shibboleth.idp.profile.ProfileRequestContext;
 import net.shibboleth.idp.profile.RequestContextBuilder;
+import net.shibboleth.idp.saml.profile.SamlEventIds;
 import net.shibboleth.idp.saml.profile.saml1.Saml1ActionTestingSupport;
 
 import org.opensaml.core.OpenSAMLInitBaseTestCase;
@@ -80,11 +81,10 @@
         action.setId("test");
         action.initialize();
 
-        try {
-            action.execute(springRequestContext);
-            Assert.fail();
-        } catch (Exception e) {
-            // expected this
-        }
+        Event result = action.execute(springRequestContext);
+
+        Assert.assertNotNull(result);
+        Assert.assertNotNull(result.getSource());
+        Assert.assertEquals(result.getId(), SamlEventIds.RESPONSE_EXISTS);
     }
 }



More information about the commits mailing list