From c5a734440486ef560d380db244452a63022e068f Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Wed, 29 Oct 2008 17:32:01 +0000 Subject: [PATCH] Moved tests over from testsuite to beans git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@193 50f2f4bb-b051-0410-bef5-90022cba6387 --- org.springframework.beans/ivy.xml | 1 + .../factory/PackageLevelVisibleBean.java | 28 +++++++++++++++++++ .../config/CustomEditorConfigurerTests.java | 0 .../FieldRetrievingFactoryBeanTests.java | 0 ...ObjectFactoryCreatingFactoryBeanTests.java | 0 .../config/PropertiesFactoryBeanTests.java | 0 .../config/PropertyPathFactoryBeanTests.java | 0 .../support/BeanDefinitionBuilderTests.java | 2 +- .../factory/support/BeanDefinitionTests.java | 0 ...DefinitionMetadataEqualsHashCodeTests.java | 0 .../factory/support/ManagedListTests.java | 0 .../factory/support/ManagedMapTests.java | 0 .../support/ManagedPropertiesTests.java | 0 .../factory/support/ManagedSetTests.java | 0 .../PropertiesBeanDefinitionReaderTests.java | 0 .../ObjectFactoryCreatingFactoryBeanTests.xml | 0 .../beans/factory/config/fieldRetrieving.xml | 0 .../beans/factory/config/propertyPath.xml | 0 .../beans/factory/config/test-properties.xml | 9 ++++++ .../beans/factory/config/test.properties | 2 ++ .../support/multiConstructorArgs.properties | 0 .../support/refConstructorArg.properties | 0 .../support/simpleConstructorArg.properties | 0 23 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 org.springframework.beans/src/test/java/org/springframework/beans/factory/PackageLevelVisibleBean.java rename {org.springframework.testsuite => org.springframework.beans}/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java (100%) rename {org.springframework.testsuite => org.springframework.beans}/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java (100%) rename {org.springframework.testsuite => org.springframework.beans}/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java (100%) rename {org.springframework.testsuite => org.springframework.beans}/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java (100%) rename {org.springframework.testsuite => org.springframework.beans}/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java (100%) rename {org.springframework.testsuite => org.springframework.beans}/src/test/java/org/springframework/beans/factory/support/BeanDefinitionBuilderTests.java (97%) rename {org.springframework.testsuite => org.springframework.beans}/src/test/java/org/springframework/beans/factory/support/BeanDefinitionTests.java (100%) rename {org.springframework.testsuite => org.springframework.beans}/src/test/java/org/springframework/beans/factory/support/DefinitionMetadataEqualsHashCodeTests.java (100%) rename {org.springframework.testsuite => org.springframework.beans}/src/test/java/org/springframework/beans/factory/support/ManagedListTests.java (100%) rename {org.springframework.testsuite => org.springframework.beans}/src/test/java/org/springframework/beans/factory/support/ManagedMapTests.java (100%) rename {org.springframework.testsuite => org.springframework.beans}/src/test/java/org/springframework/beans/factory/support/ManagedPropertiesTests.java (100%) rename {org.springframework.testsuite => org.springframework.beans}/src/test/java/org/springframework/beans/factory/support/ManagedSetTests.java (100%) rename {org.springframework.testsuite => org.springframework.beans}/src/test/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReaderTests.java (100%) rename {org.springframework.testsuite/src/test/java => org.springframework.beans/src/test/resources}/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.xml (100%) rename {org.springframework.testsuite/src/test/java => org.springframework.beans/src/test/resources}/org/springframework/beans/factory/config/fieldRetrieving.xml (100%) rename {org.springframework.testsuite/src/test/java => org.springframework.beans/src/test/resources}/org/springframework/beans/factory/config/propertyPath.xml (100%) create mode 100644 org.springframework.beans/src/test/resources/org/springframework/beans/factory/config/test-properties.xml create mode 100644 org.springframework.beans/src/test/resources/org/springframework/beans/factory/config/test.properties rename {org.springframework.testsuite/src/test/java => org.springframework.beans/src/test/resources}/org/springframework/beans/factory/support/multiConstructorArgs.properties (100%) rename {org.springframework.testsuite/src/test/java => org.springframework.beans/src/test/resources}/org/springframework/beans/factory/support/refConstructorArg.properties (100%) rename {org.springframework.testsuite/src/test/java => org.springframework.beans/src/test/resources}/org/springframework/beans/factory/support/simpleConstructorArg.properties (100%) diff --git a/org.springframework.beans/ivy.xml b/org.springframework.beans/ivy.xml index 840dad0def8..1cf9b73af20 100644 --- a/org.springframework.beans/ivy.xml +++ b/org.springframework.beans/ivy.xml @@ -28,6 +28,7 @@ + diff --git a/org.springframework.beans/src/test/java/org/springframework/beans/factory/PackageLevelVisibleBean.java b/org.springframework.beans/src/test/java/org/springframework/beans/factory/PackageLevelVisibleBean.java new file mode 100644 index 00000000000..f451dfe6151 --- /dev/null +++ b/org.springframework.beans/src/test/java/org/springframework/beans/factory/PackageLevelVisibleBean.java @@ -0,0 +1,28 @@ +/* + * Copyright 2002-2006 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.beans.factory; + +/** + * Used in the tests for the FieldRetrievingFactoryBean class + * (c.f. FieldRetrievingFactoryBeanTests) + * + * @author Rick Evans + */ +class PackageLevelVisibleBean { + + public static final String CONSTANT = "Wuby"; +} \ No newline at end of file diff --git a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java b/org.springframework.beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java rename to org.springframework.beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java diff --git a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java b/org.springframework.beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java rename to org.springframework.beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java diff --git a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java b/org.springframework.beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java rename to org.springframework.beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java diff --git a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java b/org.springframework.beans/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java rename to org.springframework.beans/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java diff --git a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java b/org.springframework.beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java rename to org.springframework.beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java diff --git a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/BeanDefinitionBuilderTests.java b/org.springframework.beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionBuilderTests.java similarity index 97% rename from org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/BeanDefinitionBuilderTests.java rename to org.springframework.beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionBuilderTests.java index 0aedf79d322..143c929c74c 100644 --- a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/BeanDefinitionBuilderTests.java +++ b/org.springframework.beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionBuilderTests.java @@ -20,7 +20,7 @@ import java.util.Arrays; import junit.framework.TestCase; -import org.springframework.aop.framework.PrototypeTargetTests.TestBean; +import org.springframework.beans.TestBean; /** * @author Rod Johnson diff --git a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/BeanDefinitionTests.java b/org.springframework.beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionTests.java similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/BeanDefinitionTests.java rename to org.springframework.beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionTests.java diff --git a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/DefinitionMetadataEqualsHashCodeTests.java b/org.springframework.beans/src/test/java/org/springframework/beans/factory/support/DefinitionMetadataEqualsHashCodeTests.java similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/DefinitionMetadataEqualsHashCodeTests.java rename to org.springframework.beans/src/test/java/org/springframework/beans/factory/support/DefinitionMetadataEqualsHashCodeTests.java diff --git a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/ManagedListTests.java b/org.springframework.beans/src/test/java/org/springframework/beans/factory/support/ManagedListTests.java similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/ManagedListTests.java rename to org.springframework.beans/src/test/java/org/springframework/beans/factory/support/ManagedListTests.java diff --git a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/ManagedMapTests.java b/org.springframework.beans/src/test/java/org/springframework/beans/factory/support/ManagedMapTests.java similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/ManagedMapTests.java rename to org.springframework.beans/src/test/java/org/springframework/beans/factory/support/ManagedMapTests.java diff --git a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/ManagedPropertiesTests.java b/org.springframework.beans/src/test/java/org/springframework/beans/factory/support/ManagedPropertiesTests.java similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/ManagedPropertiesTests.java rename to org.springframework.beans/src/test/java/org/springframework/beans/factory/support/ManagedPropertiesTests.java diff --git a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/ManagedSetTests.java b/org.springframework.beans/src/test/java/org/springframework/beans/factory/support/ManagedSetTests.java similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/ManagedSetTests.java rename to org.springframework.beans/src/test/java/org/springframework/beans/factory/support/ManagedSetTests.java diff --git a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReaderTests.java b/org.springframework.beans/src/test/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReaderTests.java similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReaderTests.java rename to org.springframework.beans/src/test/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReaderTests.java diff --git a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.xml b/org.springframework.beans/src/test/resources/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.xml rename to org.springframework.beans/src/test/resources/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/config/fieldRetrieving.xml b/org.springframework.beans/src/test/resources/org/springframework/beans/factory/config/fieldRetrieving.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/beans/factory/config/fieldRetrieving.xml rename to org.springframework.beans/src/test/resources/org/springframework/beans/factory/config/fieldRetrieving.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/config/propertyPath.xml b/org.springframework.beans/src/test/resources/org/springframework/beans/factory/config/propertyPath.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/beans/factory/config/propertyPath.xml rename to org.springframework.beans/src/test/resources/org/springframework/beans/factory/config/propertyPath.xml diff --git a/org.springframework.beans/src/test/resources/org/springframework/beans/factory/config/test-properties.xml b/org.springframework.beans/src/test/resources/org/springframework/beans/factory/config/test-properties.xml new file mode 100644 index 00000000000..e39b872c9fc --- /dev/null +++ b/org.springframework.beans/src/test/resources/org/springframework/beans/factory/config/test-properties.xml @@ -0,0 +1,9 @@ + + + + + + 99 + test + + diff --git a/org.springframework.beans/src/test/resources/org/springframework/beans/factory/config/test.properties b/org.springframework.beans/src/test/resources/org/springframework/beans/factory/config/test.properties new file mode 100644 index 00000000000..9affcba0135 --- /dev/null +++ b/org.springframework.beans/src/test/resources/org/springframework/beans/factory/config/test.properties @@ -0,0 +1,2 @@ +tb.array[0].age=99 +tb.list[1].name=test diff --git a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/multiConstructorArgs.properties b/org.springframework.beans/src/test/resources/org/springframework/beans/factory/support/multiConstructorArgs.properties similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/multiConstructorArgs.properties rename to org.springframework.beans/src/test/resources/org/springframework/beans/factory/support/multiConstructorArgs.properties diff --git a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/refConstructorArg.properties b/org.springframework.beans/src/test/resources/org/springframework/beans/factory/support/refConstructorArg.properties similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/refConstructorArg.properties rename to org.springframework.beans/src/test/resources/org/springframework/beans/factory/support/refConstructorArg.properties diff --git a/org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/simpleConstructorArg.properties b/org.springframework.beans/src/test/resources/org/springframework/beans/factory/support/simpleConstructorArg.properties similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/beans/factory/support/simpleConstructorArg.properties rename to org.springframework.beans/src/test/resources/org/springframework/beans/factory/support/simpleConstructorArg.properties