Moved tests from testsuite to context and context support
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@208 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
parent
cbf1ffd0fe
commit
ba4274f08e
|
|
@ -172,6 +172,17 @@
|
|||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$IVY_CACHE$/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$IVY_CACHE$/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntryProperties />
|
||||
</component>
|
||||
<component name="copyright">
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
<!-- test dependencies -->
|
||||
<dependency org="org.apache.log4j" name="com.springsource.org.apache.log4j" rev="1.2.15" conf="test->runtime"/>
|
||||
<dependency org="org.junit" name="com.springsource.org.junit" rev="4.4.0" conf="test->runtime" />
|
||||
<dependency org="org.easymock" name="com.springsource.org.easymock" rev="2.3.0" conf="test->compile"/>
|
||||
</dependencies>
|
||||
|
||||
</ivy-module>
|
||||
|
|
|
|||
|
|
@ -1,16 +1,90 @@
|
|||
<?xml version="1.0"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<parent>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>org.springframework.parent</artifactId>
|
||||
<version>3.0-M1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>org.springframework.context</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>Spring Core Abstractions and Utilities</name>
|
||||
<version>3.0.0.M1</version>
|
||||
<name>Spring Framework: Context</name>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>org.springframework.core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>org.springframework.beans</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>org.springframework.aop</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>org.springframework.agent</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<groupId>javax.ejb</groupId>
|
||||
<artifactId>com.springsource.javax.ejb</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.jms</groupId>
|
||||
<artifactId>com.springsource.javax.jms</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.persistence</groupId>
|
||||
<artifactId>com.springsource.javax.persistence</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.cglib</groupId>
|
||||
<artifactId>com.springsource.net.sf.cglib</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>com.springsource.org.aspectj.weaver</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.aopalliance</groupId>
|
||||
<artifactId>com.springsource.org.aopalliance</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jruby</groupId>
|
||||
<artifactId>com.springsource.org.jruby</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>com.springsource.org.codehaus.groovy</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.beanshell</groupId>
|
||||
<artifactId>com.springsource.bsh</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>edu.emory.mathcs.backport</groupId>
|
||||
<artifactId>com.springsource.edu.emory.mathcs.backport</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.oracle.oc4j</groupId>
|
||||
<artifactId>com.springsource.oracle.classloader</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.enterprise</groupId>
|
||||
<artifactId>com.springsource.com.sun.enterprise.loader</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -19,7 +19,11 @@ package org.springframework.context.config;
|
|||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.beans.factory.config.PropertyOverrideConfigurer;
|
||||
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
|
@ -29,22 +33,25 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
|||
* @author Arjen Poutsma
|
||||
* @since 2.5.6
|
||||
*/
|
||||
public class ContextNamespaceHandlerTests extends TestCase {
|
||||
public class ContextNamespaceHandlerTests {
|
||||
|
||||
private ApplicationContext applicationContext;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
@Before
|
||||
public void createAppContext() {
|
||||
applicationContext = new ClassPathXmlApplicationContext("contextNamespaceHandlerTests.xml", getClass());
|
||||
}
|
||||
|
||||
public void testPropertyPlaceholder() throws Exception {
|
||||
@Test
|
||||
public void propertyPlaceholder() throws Exception {
|
||||
Map beans = applicationContext.getBeansOfType(PropertyPlaceholderConfigurer.class);
|
||||
assertFalse("No PropertyPlaceHolderConfigurer found", beans.isEmpty());
|
||||
String s = (String) applicationContext.getBean("string");
|
||||
assertEquals("No properties replaced", "bar", s);
|
||||
}
|
||||
|
||||
public void testPropertyOverride() throws Exception {
|
||||
@Test
|
||||
public void propertyOverride() throws Exception {
|
||||
Map beans = applicationContext.getBeansOfType(PropertyOverrideConfigurer.class);
|
||||
assertFalse("No PropertyOverrideConfigurer found", beans.isEmpty());
|
||||
Date date = (Date) applicationContext.getBean("date");
|
||||
Loading…
Reference in New Issue