[java-identity-provider COMMIT] in /trunk/idp-profile-impl/src/test: java/net/shibboleth/idp/profile/impl/ProfileActi...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Feb 11 13:18:06 EST 2014
Author: tzeller
Date: Tue Feb 11 13:18:06 2014
New Revision: 5373
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5373&view=rev
Log:
Reorganize test.
Modified:
trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/ProfileActionBeanPostProcessorTest.java
trunk/idp-profile-impl/src/test/resources/net/shibboleth/idp/profile/impl/ProfileActionBeanPostProcessorTest.xml
Modified: trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/ProfileActionBeanPostProcessorTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/ProfileActionBeanPostProcessorTest.java?rev=5373&r1=5372&r2=5373&view=diff
==============================================================================
--- trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/ProfileActionBeanPostProcessorTest.java (original)
+++ trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/ProfileActionBeanPostProcessorTest.java Tue Feb 11 13:18:06 2014
@@ -30,23 +30,41 @@
@Test public void testPostProcessBeforeInitialization() {
Object bean = null;
- bean = applicationContext.getBean("AnIdPActionWithDefaultID");
+ bean = applicationContext.getBean("IdPActionWithDefaultID");
Assert.assertTrue(bean instanceof ProfileAction);
- Assert.assertEquals(((ProfileAction) bean).getId(), "AnIdPActionWithDefaultID");
+ Assert.assertEquals(((ProfileAction) bean).getId(), "IdPActionWithDefaultID");
- bean = applicationContext.getBean("AnIdPActionWithCustomID");
+ bean = applicationContext.getBean("IdPActionWithCustomID");
Assert.assertTrue(bean instanceof ProfileAction);
Assert.assertEquals(((ProfileAction) bean).getId(), "CustomID");
- bean = applicationContext.getBean("AnOpenSAMLActionWithDefaultID");
+ bean = applicationContext.getBean("OpenSAMLActionWithDefaultID");
Assert.assertTrue(bean instanceof ProfileAction);
- Assert.assertTrue(bean instanceof WebFlowProfileActionAdaptor);
- Assert.assertEquals(((ProfileAction) bean).getId(), "AnOpenSAMLActionWithDefaultID");
+ Assert.assertEquals(((ProfileAction) bean).getId(), "OpenSAMLActionWithDefaultID");
- bean = applicationContext.getBean("AnOpenSAMLActionWithCustomID");
+ bean = applicationContext.getBean("OpenSAMLActionWithCustomID");
Assert.assertTrue(bean instanceof ProfileAction);
- Assert.assertTrue(bean instanceof WebFlowProfileActionAdaptor);
Assert.assertEquals(((ProfileAction) bean).getId(), "CustomID");
}
+ @Test public void testPostProcessAfterInitialization() {
+ Object bean = null;
+
+ bean = applicationContext.getBean("IdPActionWithDefaultID");
+ Assert.assertFalse(bean instanceof WebFlowProfileActionAdaptor);
+
+ bean = applicationContext.getBean("IdPActionWithCustomID");
+ Assert.assertFalse(bean instanceof WebFlowProfileActionAdaptor);
+
+ bean = applicationContext.getBean("OpenSAMLActionWithDefaultID");
+ Assert.assertTrue(bean instanceof WebFlowProfileActionAdaptor);
+ Assert.assertTrue(((WebFlowProfileActionAdaptor) bean).isInitialized());
+
+ bean = applicationContext.getBean("OpenSAMLActionWithCustomID");
+ Assert.assertTrue(bean instanceof WebFlowProfileActionAdaptor);
+ Assert.assertTrue(((WebFlowProfileActionAdaptor) bean).isInitialized());
+
+ // TODO Test throwing ComponentInitializationException ?
+ }
+
}
Modified: trunk/idp-profile-impl/src/test/resources/net/shibboleth/idp/profile/impl/ProfileActionBeanPostProcessorTest.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-impl/src/test/resources/net/shibboleth/idp/profile/impl/ProfileActionBeanPostProcessorTest.xml?rev=5373&r1=5372&r2=5373&view=diff
==============================================================================
--- trunk/idp-profile-impl/src/test/resources/net/shibboleth/idp/profile/impl/ProfileActionBeanPostProcessorTest.xml (original)
+++ trunk/idp-profile-impl/src/test/resources/net/shibboleth/idp/profile/impl/ProfileActionBeanPostProcessorTest.xml Tue Feb 11 13:18:06 2014
@@ -10,23 +10,23 @@
<bean class="net.shibboleth.idp.profile.impl.ProfileActionBeanPostProcessor" />
<bean
- id="AnIdPActionWithDefaultID"
+ id="IdPActionWithDefaultID"
class="net.shibboleth.idp.profile.impl.InitializeRelyingPartyContext"
scope="prototype" />
<bean
- id="AnIdPActionWithCustomID"
+ id="IdPActionWithCustomID"
class="net.shibboleth.idp.profile.impl.InitializeRelyingPartyContext"
scope="prototype"
p:id="CustomID" />
<bean
- id="AnOpenSAMLActionWithDefaultID"
+ id="OpenSAMLActionWithDefaultID"
class="org.opensaml.profile.action.impl.CheckMandatoryIssuer"
scope="prototype" />
<bean
- id="AnOpenSAMLActionWithCustomID"
+ id="OpenSAMLActionWithCustomID"
[... 4 lines stripped ...]
More information about the commits
mailing list