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

noreply at shibboleth.net noreply at shibboleth.net
Wed Dec 12 15:12:53 EST 2012


Author: tzeller
Date: Wed Dec 12 15:12:53 2012
New Revision: 4245

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4245&view=rev
Log:
Action testing support assertEvent(event, id) helper.

Modified:
    trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/ActionTestingSupport.java
    trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/DecodeMessageTest.java
    trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/FilterAttributesTest.java
    trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/ResolveAttributesTest.java
    trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/SchemaValidateXmlMessageTest.java
    trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/SelectRelyingPartyConfigurationTest.java
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/SelectProfileConfigurationTest.java
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml1/AddAttributeStatementToAssertionTest.java
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml1/AddAudienceRestrictionToAssertionsTest.java
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml1/AddAuthenticationStatementToAssertionTest.java
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml1/AddDoNotCacheConditionToAssertionsTest.java
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml1/AddNotBeforeConditionToAssertionsTest.java
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml1/AddNotOnOrAfterConditionToAssertionsTest.java
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml1/AddResponseShellTest.java
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml1/CheckRequestVersionTest.java
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml2/AddAudienceRestrictionToAssertionsTest.java
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml2/AddNotBeforeConditionToAssertionsTest.java
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml2/AddNotOnOrAfterConditionToAssertionsTest.java
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml2/AddOneTimeUseConditionToAssertionsTest.java
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml2/CheckRequestVersionTest.java

Modified: trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/ActionTestingSupport.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/ActionTestingSupport.java?rev=4245&r1=4244&r2=4245&view=diff
==============================================================================
--- trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/ActionTestingSupport.java (original)
+++ trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/ActionTestingSupport.java Wed Dec 12 15:12:53 2012
@@ -39,14 +39,23 @@
     public final static String OUTBOUND_MSG_ISSUER = "http://idp.example.org";
 
     /**
+     * Checks that the event is not null, that the event source is not null, and that the event ID is the given id.
+     * 
+     * @param event the event to check
+     */
+    public static void assertEvent(final Event event, final String id) {
+        Assert.assertNotNull(event);
+        Assert.assertNotNull(event.getSource());
+        Assert.assertEquals(event.getId(), id);
+    }
+
+    /**
      * Checks that the given event is a proceed event. That is, that the event is not null, that its source is not null,
      * and that its ID is {@link EventIds#PROCEED_EVENT_ID}.
      * 
      * @param event the event to check
      */
-    public static void assertProceedEvent(Event event) {
-        Assert.assertNotNull(event);
-        Assert.assertNotNull(event.getSource());
-        Assert.assertEquals(event.getId(), EventIds.PROCEED_EVENT_ID);
+    public static void assertProceedEvent(final Event event) {
+        assertEvent(event, EventIds.PROCEED_EVENT_ID);
     }
 }

Modified: trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/DecodeMessageTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/DecodeMessageTest.java?rev=4245&r1=4244&r2=4245&view=diff
==============================================================================
--- trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/DecodeMessageTest.java (original)
+++ trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/DecodeMessageTest.java Wed Dec 12 15:12:53 2012
@@ -72,9 +72,7 @@
 
         Event result = action.doExecute(null, null, profileCtx);
 
-        Assert.assertNotNull(result);
-        Assert.assertNotNull(result.getSource());
-        Assert.assertEquals(result.getId(), DecodeMessage.UNABLE_TO_DECODE);

[... 857 lines stripped ...]


More information about the commits mailing list