[java-identity-provider COMMIT] in /trunk/idp-core/src/test: java/net/shibboleth/idp/service/ReloadableSpringServiceT...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Dec 31 11:56:01 EST 2013
Author: tzeller
Date: Tue Dec 31 11:56:01 2013
New Revision: 5124
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5124&view=rev
Log:
Test that the ReloadableSpringService implements the ApplicationContextAware interface.
Added:
trunk/idp-core/src/test/resources/net/shibboleth/idp/service/ReloadableSpringService.xml (with props)
Modified:
trunk/idp-core/src/test/java/net/shibboleth/idp/service/ReloadableSpringServiceTest.java
Modified: trunk/idp-core/src/test/java/net/shibboleth/idp/service/ReloadableSpringServiceTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-core/src/test/java/net/shibboleth/idp/service/ReloadableSpringServiceTest.java?rev=5124&r1=5123&r2=5124&view=diff
==============================================================================
--- trunk/idp-core/src/test/java/net/shibboleth/idp/service/ReloadableSpringServiceTest.java (original)
+++ trunk/idp-core/src/test/java/net/shibboleth/idp/service/ReloadableSpringServiceTest.java Tue Dec 31 11:56:01 2013
@@ -24,8 +24,10 @@
import java.util.Collections;
import junit.framework.Assert;
+import net.shibboleth.idp.spring.SpringSupport;
import org.springframework.beans.factory.BeanInitializationException;
+import org.springframework.context.support.GenericApplicationContext;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.Resource;
@@ -33,10 +35,7 @@
import com.google.common.io.ByteStreams;
-/**
- * Test to exercise the {@link ReloadableSpringService}.
- *
- */
+/** {@link ReloadableSpringService} unit test. */
public class ReloadableSpringServiceTest {
private static final long RELOAD_DELAY = 100;
@@ -221,4 +220,16 @@
}
+ @Test public void testApplicationContextAware() {
+
+ Resource parentResource = new ClassPathResource("net/shibboleth/idp/service/ReloadableSpringService.xml");
+
+ GenericApplicationContext appCtx =
+ SpringSupport.newContext("appCtx", Collections.singletonList(parentResource), null);
+
+ ReloadableSpringService service = appCtx.getBean(ReloadableSpringService.class);
+
+ Assert.assertNotNull("Parent context should not be null", service.getParentContext());
+ }
+
}
More information about the commits
mailing list