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

noreply at shibboleth.net noreply at shibboleth.net
Thu Mar 7 22:49:33 EST 2013


Author: tzeller
Date: Thu Mar  7 22:49:33 2013
New Revision: 4319

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4319&view=rev
Log:
So test passes, catch and ignore unmodifiable component exception thrown when setting the id after initialization.

Modified:
    trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/AbstractProfileActionTest.java

Modified: trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/AbstractProfileActionTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/AbstractProfileActionTest.java?rev=4319&r1=4318&r2=4319&view=diff
==============================================================================
--- trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/AbstractProfileActionTest.java (original)
+++ trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/AbstractProfileActionTest.java Thu Mar  7 22:49:33 2013
@@ -22,6 +22,7 @@
 
 import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
 import net.shibboleth.utilities.java.support.component.UninitializedComponentException;
+import net.shibboleth.utilities.java.support.component.UnmodifiableComponentException;
 import net.shibboleth.utilities.java.support.logic.ConstraintViolationException;
 
 import org.springframework.webflow.execution.Event;
@@ -58,15 +59,19 @@
         MockIdentityProviderAction action = new MockIdentityProviderAction(null);
         Assert.assertFalse(action.isInitialized());
         action.setId("mock");
-        
+
         try {
             action.initialize();
         } catch (ComponentInitializationException e) {
             Assert.fail();
         }
 
-        Assert.assertEquals(action.getId(), "mock");               
-        action.setId("foo");
+        Assert.assertEquals(action.getId(), "mock");
+        try {
+            action.setId("foo");
+        } catch (UnmodifiableComponentException e) {
+            // ignore
+        }
         Assert.assertEquals(action.getId(), "mock");
     }
 



More information about the commits mailing list