Moved tests over from testsuite to beans

This commit is contained in:
Arjen Poutsma
2008-10-29 17:32:01 +00:00
parent 6b80dbb4a9
commit bd1e259b4a
23 changed files with 41 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<!--
Test data for ObjectFactoryCreatingFactoryBeanTests
-->
<beans>
<bean id="prototypeTarget" class="java.util.Date" scope="prototype"/>
<bean id="prototype" class="org.springframework.beans.factory.config.ObjectFactoryCreatingFactoryBean">
<property name="targetBeanName"><idref local="prototypeTarget"/></property>
</bean>
<bean id="testBean" class="org.springframework.beans.factory.config.ObjectFactoryCreatingFactoryBeanTests$TestBean">
<property name="objectFactory"><ref local="prototype"/></property>
</bean>
</beans>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="testBean" class="org.springframework.beans.TestBean">
<property name="someIntegerArray">
<list>
<bean name="java.sql.Connection.TRANSACTION_SERIALIZABLE" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean"/>
<bean name="java.sql.Connection.TRANSACTION_SERIALIZABLE" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean"/>
</list>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="tb" class="org.springframework.beans.TestBean" scope="prototype">
<property name="age"><value>10</value></property>
<property name="spouse">
<bean class="org.springframework.beans.TestBean">
<property name="age"><value>11</value></property>
</bean>
</property>
</bean>
<bean id="otb" class="org.springframework.beans.TestBean">
<property name="age"><value>98</value></property>
<property name="spouse">
<bean class="org.springframework.beans.TestBean">
<property name="age"><value>99</value></property>
</bean>
</property>
</bean>
<bean id="propertyPath1" class="org.springframework.beans.factory.config.PropertyPathFactoryBean">
<property name="targetObject">
<bean class="org.springframework.beans.TestBean">
<property name="age"><value>12</value></property>
</bean>
</property>
<property name="propertyPath"><value>age</value></property>
</bean>
<bean id="propertyPath2" class="org.springframework.beans.factory.config.PropertyPathFactoryBean">
<property name="targetBeanName"><value>tb</value></property>
<property name="propertyPath"><value>spouse.age</value></property>
</bean>
<bean id="tb.age" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>
<bean id="otb.spouse" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>
<bean id="tb.spouse" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>
<bean id="tb.spouse.spouse" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>
<bean id="propertyPath3" class="org.springframework.beans.factory.config.PropertyPathFactoryBean">
<property name="targetBeanName"><value>tb</value></property>
<property name="propertyPath"><value>spouse</value></property>
<property name="resultType"><value>org.springframework.beans.TestBean</value></property>
</bean>
<bean id="tbWithInner" class="org.springframework.beans.TestBean">
<property name="age" value="10"/>
<property name="spouse">
<bean name="otb.spouse" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>
</property>
<property name="friends">
<bean name="otb.spouse" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties version="1.0">
<entry key="tb.array[0].age">99</entry>
<entry key="tb.list[1].name">test</entry>
</properties>

View File

@@ -0,0 +1,2 @@
tb.array[0].age=99
tb.list[1].name=test

View File

@@ -0,0 +1,3 @@
testBean.(class)=org.springframework.beans.TestBean
testBean.$0=Rob Harrop
testBean.$1=23

View File

@@ -0,0 +1,5 @@
sally.(class)=org.springframework.beans.TestBean
sally.name=Sally
rob.(class)=org.springframework.beans.TestBean
rob.$0(ref)=sally

View File

@@ -0,0 +1,2 @@
testBean.(class)=org.springframework.beans.TestBean
testBean.$0=Rob Harrop