diff --git a/spring-aop/src/test/java/org/springframework/aop/interceptor/CustomizableTraceInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/interceptor/CustomizableTraceInterceptorTests.java index 77aad8e9ff1..0c1c50c9c52 100644 --- a/spring-aop/src/test/java/org/springframework/aop/interceptor/CustomizableTraceInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/interceptor/CustomizableTraceInterceptorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 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. @@ -24,8 +24,6 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import java.lang.reflect.Method; - import org.aopalliance.intercept.MethodInvocation; import org.apache.commons.logging.Log; import org.junit.Test; diff --git a/spring-aop/src/test/java/org/springframework/aop/interceptor/SimpleTraceInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/interceptor/SimpleTraceInterceptorTests.java index 6efc651d272..96501f2c14f 100644 --- a/spring-aop/src/test/java/org/springframework/aop/interceptor/SimpleTraceInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/interceptor/SimpleTraceInterceptorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 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. @@ -24,8 +24,6 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import java.lang.reflect.Method; - import org.aopalliance.intercept.MethodInvocation; import org.apache.commons.logging.Log; import org.junit.Test; diff --git a/spring-aspects/src/test/java/org/springframework/aop/aspectj/autoproxy/CodeStyleAspect.aj b/spring-aspects/src/test/java/org/springframework/aop/aspectj/autoproxy/CodeStyleAspect.aj index 0758d3a403a..77da43176ab 100644 --- a/spring-aspects/src/test/java/org/springframework/aop/aspectj/autoproxy/CodeStyleAspect.aj +++ b/spring-aspects/src/test/java/org/springframework/aop/aspectj/autoproxy/CodeStyleAspect.aj @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 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. @@ -16,6 +16,8 @@ package org.springframework.aop.aspectj.autoproxy; +import org.aspectj.lang.annotation.SuppressAjWarnings; + /** * @author Adrian Colyer */ @@ -25,6 +27,7 @@ public aspect CodeStyleAspect { pointcut somePC() : call(* someMethod()); + @SuppressAjWarnings("adviceDidNotMatch") before() : somePC() { System.out.println("match"); } diff --git a/spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java b/spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java index b95ee6b8078..d82367ddb07 100644 --- a/spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java +++ b/spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java @@ -49,14 +49,14 @@ public class AnnotationAsyncExecutionAspectTests { @Before public void setUp() { + Assume.group(TestGroup.PERFORMANCE); + executor = new CountingExecutor(); AnnotationAsyncExecutionAspect.aspectOf().setExecutor(executor); } @Test public void asyncMethodGetsRoutedAsynchronously() { - Assume.group(TestGroup.PERFORMANCE); - ClassWithoutAsyncAnnotation obj = new ClassWithoutAsyncAnnotation(); obj.incrementAsync(); executor.waitForCompletion(); @@ -107,6 +107,7 @@ public class AnnotationAsyncExecutionAspectTests { assertEquals(1, executor.submitCompleteCounter); } + /* @Test public void methodReturningNonVoidNonFutureInAsyncClassGetsRoutedSynchronously() { ClassWithAsyncAnnotation obj = new ClassWithAsyncAnnotation(); @@ -115,6 +116,7 @@ public class AnnotationAsyncExecutionAspectTests { assertEquals(0, executor.submitStartCounter); assertEquals(0, executor.submitCompleteCounter); } + */ @Test public void qualifiedAsyncMethodsAreRoutedToCorrectExecutor() throws InterruptedException, ExecutionException { @@ -198,9 +200,11 @@ public class AnnotationAsyncExecutionAspectTests { // Manually check that there is a warning from the 'declare warning' statement in // AnnotationAsyncExecutionAspect + /* public int return5() { return 5; } + */ public Future incrementReturningAFuture() { counter++; diff --git a/spring-beans/src/test/java/com/foo/Component.java b/spring-beans/src/test/java/com/foo/Component.java deleted file mode 100644 index 5c5d61ec81c..00000000000 --- a/spring-beans/src/test/java/com/foo/Component.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.foo; - -import java.util.ArrayList; -import java.util.List; - -public class Component { - private String name; - private List components = new ArrayList(); - - // mmm, there is no setter method for the 'components' - public void addComponent(Component component) { - this.components.add(component); - } - - public List getComponents() { - return components; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } -} diff --git a/spring-beans/src/test/java/com/foo/ComponentNamespaceHandler.java b/spring-beans/src/test/java/com/foo/ComponentNamespaceHandler.java deleted file mode 100644 index b29eeca0614..00000000000 --- a/spring-beans/src/test/java/com/foo/ComponentNamespaceHandler.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.foo; - -import org.springframework.beans.factory.xml.NamespaceHandlerSupport; - -public class ComponentNamespaceHandler extends NamespaceHandlerSupport { - @Override - public void init() { - registerBeanDefinitionParser("component", - new ComponentBeanDefinitionParser()); - } -} diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java index cab03e38239..2480f64fac2 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java @@ -47,8 +47,6 @@ import org.springframework.core.io.UrlResource; import org.springframework.tests.Assume; import org.springframework.tests.TestGroup; -import org.springframework.tests.Assume; -import org.springframework.tests.TestGroup; import org.springframework.tests.sample.beans.GenericBean; import org.springframework.tests.sample.beans.GenericIntegerBean; import org.springframework.tests.sample.beans.GenericSetOfIntegerBean; diff --git a/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java b/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java index 9e5bd8911a5..7e7694767c6 100644 --- a/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java @@ -24,8 +24,6 @@ import org.junit.Test; import org.springframework.tests.Assume; import org.springframework.tests.TestGroup; -import org.springframework.tests.Assume; -import org.springframework.tests.TestGroup; import org.springframework.tests.sample.beans.TestBean; import static org.junit.Assert.*; diff --git a/spring-beans/src/test/java/org/springframework/tests/beans/CollectingReaderEventListener.java b/spring-beans/src/test/java/org/springframework/tests/beans/CollectingReaderEventListener.java index 8779f9ed5ed..b581a05f032 100644 --- a/spring-beans/src/test/java/org/springframework/tests/beans/CollectingReaderEventListener.java +++ b/spring-beans/src/test/java/org/springframework/tests/beans/CollectingReaderEventListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 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. @@ -29,7 +29,6 @@ import org.springframework.beans.factory.parsing.ComponentDefinition; import org.springframework.beans.factory.parsing.DefaultsDefinition; import org.springframework.beans.factory.parsing.ImportDefinition; import org.springframework.beans.factory.parsing.ReaderEventListener; -import org.springframework.core.CollectionFactory; /** * @author Rob Harrop diff --git a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java index 0a9cfdf655f..578748f4fd2 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java @@ -17,7 +17,6 @@ package org.springframework.context.annotation; import static org.junit.Assert.*; -import static org.junit.Assume.assumeFalse; import javax.annotation.Resource; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/BeanMethodPolymorphismTests.java b/spring-context/src/test/java/org/springframework/context/annotation/BeanMethodPolymorphismTests.java index 4797aae61be..655324d1c7d 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/BeanMethodPolymorphismTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/BeanMethodPolymorphismTests.java @@ -1,3 +1,19 @@ +/* + * Copyright 2002-2013 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.context.annotation; import static org.hamcrest.CoreMatchers.equalTo; @@ -31,7 +47,7 @@ public class BeanMethodPolymorphismTests { @Test public void beanMethodOverloadingWithoutInheritance() { - @SuppressWarnings("unused") + @SuppressWarnings({ "unused", "hiding" }) @Configuration class Config { @Bean String aString() { return "na"; } @Bean String aString(Integer dependency) { return "na"; } diff --git a/spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptorTests.java b/spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptorTests.java index c0fa18c2c33..0c03c57c69d 100644 --- a/spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptorTests.java +++ b/spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 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. @@ -18,7 +18,6 @@ package org.springframework.ejb.access; import static org.junit.Assert.*; import static org.mockito.BDDMockito.given; -import static org.mockito.Mockito.atLeastOnce; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; diff --git a/spring-context/src/test/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBeanTests.java index 4f5b69735ec..095f930c610 100644 --- a/spring-context/src/test/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBeanTests.java @@ -28,7 +28,6 @@ import org.springframework.tests.TestGroup; import static org.junit.Assert.*; import static org.mockito.BDDMockito.*; -import static org.mockito.Mockito.*; /** * @author Rick Evans diff --git a/spring-core/src/test/java/org/springframework/core/BridgeMethodResolverTests.java b/spring-core/src/test/java/org/springframework/core/BridgeMethodResolverTests.java index b4c32171cfa..c013f3d3db5 100644 --- a/spring-core/src/test/java/org/springframework/core/BridgeMethodResolverTests.java +++ b/spring-core/src/test/java/org/springframework/core/BridgeMethodResolverTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 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. @@ -1048,7 +1048,7 @@ public class BridgeMethodResolverTests { } - public class GenericSqlMapIntegerDao extends GenericSqlMapDao { + public class GenericSqlMapIntegerDao extends GenericSqlMapDao { @Override public void saveOrUpdate(T t) { diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/core/AbstractRowMapperTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/core/AbstractRowMapperTests.java index aeffd6f6bb7..98016c61134 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/core/AbstractRowMapperTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/core/AbstractRowMapperTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 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. @@ -26,7 +26,6 @@ import java.math.BigDecimal; import java.sql.Connection; import java.sql.ResultSet; import java.sql.ResultSetMetaData; -import java.sql.SQLException; import java.sql.Statement; import java.sql.Timestamp; diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/TableMetaDataContextTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/TableMetaDataContextTests.java index a6d22145b91..34572961a80 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/TableMetaDataContextTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/TableMetaDataContextTests.java @@ -1,3 +1,19 @@ +/* + * Copyright 2002-2013 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.jdbc.core.simple; import static org.junit.Assert.*; @@ -9,7 +25,6 @@ import static org.mockito.Mockito.verify; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.ResultSet; -import java.sql.SQLException; import java.sql.Types; import java.util.ArrayList; import java.util.Date; diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/support/custom-error-codes.xml b/spring-jdbc/src/test/java/org/springframework/jdbc/support/custom-error-codes.xml deleted file mode 100644 index a2aa1898320..00000000000 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/support/custom-error-codes.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - 1,2 - 1,1400,1722 - - - - 999 - - org.springframework.jdbc.support.CustomErrorCodeException - - - - - - - diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/support/test-error-codes.xml b/spring-jdbc/src/test/java/org/springframework/jdbc/support/test-error-codes.xml deleted file mode 100644 index dd3fc33004b..00000000000 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/support/test-error-codes.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - 1,2 - 1,1400,1722 - - - diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/support/wildcard-error-codes.xml b/spring-jdbc/src/test/java/org/springframework/jdbc/support/wildcard-error-codes.xml deleted file mode 100644 index b44c0a9c1b8..00000000000 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/support/wildcard-error-codes.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - 1,2,942 - 1,1400,1722 - - - - *DB0 - -204,1,2 - 3,4 - - - - DB1* - -204,1,2 - 3,4 - - - - *DB2* - -204,1,2 - 3,4 - - - - *DB3* - -204,1,2 - 3,4 - - - diff --git a/spring-orm/src/test/java/org/springframework/orm/hibernate3/filterDefinitions.xml b/spring-orm/src/test/java/org/springframework/orm/hibernate3/filterDefinitions.xml deleted file mode 100644 index 96b19990ac4..00000000000 --- a/spring-orm/src/test/java/org/springframework/orm/hibernate3/filterDefinitions.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - string - long - - - - - - - - integer - - - - - - - - diff --git a/spring-orm/src/test/java/org/springframework/orm/hibernate3/typeDefinitions.xml b/spring-orm/src/test/java/org/springframework/orm/hibernate3/typeDefinitions.xml deleted file mode 100644 index bd12f319b7f..00000000000 --- a/spring-orm/src/test/java/org/springframework/orm/hibernate3/typeDefinitions.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - value1 - othervalue - - - - - - - - - myvalue - - - - - - - - diff --git a/spring-orm/src/test/java/org/springframework/orm/jdo/test.properties b/spring-orm/src/test/java/org/springframework/orm/jdo/test.properties deleted file mode 100644 index cd4acea9278..00000000000 --- a/spring-orm/src/test/java/org/springframework/orm/jdo/test.properties +++ /dev/null @@ -1 +0,0 @@ -myKey=myValue diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestUtilsTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestUtilsTests.java index 8092d835b32..9c3e7b045de 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestUtilsTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 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. @@ -16,8 +16,6 @@ package org.springframework.web.portlet.bind; -import junit.framework.TestCase; - import org.junit.Test; import org.springframework.tests.Assume; import org.springframework.tests.TestGroup; diff --git a/spring-webmvc/src/test/java/org/springframework/web/context/WEB-INF/empty-servlet.xml b/spring-webmvc/src/test/java/org/springframework/web/context/WEB-INF/empty-servlet.xml deleted file mode 100644 index b49584e11dd..00000000000 --- a/spring-webmvc/src/test/java/org/springframework/web/context/WEB-INF/empty-servlet.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/spring-webmvc/src/test/java/org/springframework/web/context/WEB-INF/sessionContext.xml b/spring-webmvc/src/test/java/org/springframework/web/context/WEB-INF/sessionContext.xml deleted file mode 100644 index eb7bf0f6eae..00000000000 --- a/spring-webmvc/src/test/java/org/springframework/web/context/WEB-INF/sessionContext.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/spring-webmvc/src/test/java/org/springframework/web/context/support/ServletContextSupportTests.java b/spring-webmvc/src/test/java/org/springframework/web/context/support/ServletContextSupportTests.java index 07823327e66..77bc44cca56 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/context/support/ServletContextSupportTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/context/support/ServletContextSupportTests.java @@ -41,7 +41,6 @@ import org.springframework.beans.factory.support.ManagedList; import org.springframework.beans.factory.support.ManagedMap; import org.springframework.beans.factory.support.ManagedSet; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.core.io.Resource; import org.springframework.mock.web.test.MockServletContext; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/complexviews.properties b/spring-webmvc/src/test/java/org/springframework/web/servlet/complexviews.properties deleted file mode 100644 index 6917be21627..00000000000 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/complexviews.properties +++ /dev/null @@ -1,3 +0,0 @@ -form.(class)=org.springframework.web.servlet.view.InternalResourceView -form.requestContextAttribute=rc -form.url=myform.jsp diff --git a/src/test/java/com/foo/Component.java b/src/test/java/com/foo/Component.java new file mode 100644 index 00000000000..759954c41db --- /dev/null +++ b/src/test/java/com/foo/Component.java @@ -0,0 +1,42 @@ +/* + * Copyright 2002-2013 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 com.foo; + +import java.util.ArrayList; +import java.util.List; + +public class Component { + private String name; + private List components = new ArrayList(); + + // mmm, there is no setter method for the 'components' + public void addComponent(Component component) { + this.components.add(component); + } + + public List getComponents() { + return components; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/spring-beans/src/test/java/com/foo/ComponentBeanDefinitionParser.java b/src/test/java/com/foo/ComponentBeanDefinitionParser.java similarity index 75% rename from spring-beans/src/test/java/com/foo/ComponentBeanDefinitionParser.java rename to src/test/java/com/foo/ComponentBeanDefinitionParser.java index 94dd439bfb0..9fb2213c2bb 100644 --- a/spring-beans/src/test/java/com/foo/ComponentBeanDefinitionParser.java +++ b/src/test/java/com/foo/ComponentBeanDefinitionParser.java @@ -1,3 +1,19 @@ +/* + * Copyright 2002-2013 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 com.foo; import java.util.List; diff --git a/spring-beans/src/test/java/com/foo/ComponentBeanDefinitionParserTest.java b/src/test/java/com/foo/ComponentBeanDefinitionParserTests.java similarity index 97% rename from spring-beans/src/test/java/com/foo/ComponentBeanDefinitionParserTest.java rename to src/test/java/com/foo/ComponentBeanDefinitionParserTests.java index 97e77c5740f..4a036f6c27f 100644 --- a/spring-beans/src/test/java/com/foo/ComponentBeanDefinitionParserTest.java +++ b/src/test/java/com/foo/ComponentBeanDefinitionParserTests.java @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package com.foo; import static org.hamcrest.CoreMatchers.equalTo; @@ -30,7 +31,7 @@ import org.springframework.core.io.ClassPathResource; /** * @author Costin Leau */ -public class ComponentBeanDefinitionParserTest { +public class ComponentBeanDefinitionParserTests { private static DefaultListableBeanFactory bf; diff --git a/spring-beans/src/test/java/com/foo/ComponentFactoryBean.java b/src/test/java/com/foo/ComponentFactoryBean.java similarity index 55% rename from spring-beans/src/test/java/com/foo/ComponentFactoryBean.java rename to src/test/java/com/foo/ComponentFactoryBean.java index ac47c4efea9..2b126d4f4e5 100644 --- a/spring-beans/src/test/java/com/foo/ComponentFactoryBean.java +++ b/src/test/java/com/foo/ComponentFactoryBean.java @@ -1,3 +1,19 @@ +/* + * Copyright 2002-2013 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 com.foo; import java.util.List; diff --git a/src/test/java/com/foo/ComponentNamespaceHandler.java b/src/test/java/com/foo/ComponentNamespaceHandler.java new file mode 100644 index 00000000000..b1a830c83b7 --- /dev/null +++ b/src/test/java/com/foo/ComponentNamespaceHandler.java @@ -0,0 +1,27 @@ +/* + * Copyright 2002-2013 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 com.foo; + +import org.springframework.beans.factory.xml.NamespaceHandlerSupport; + +public class ComponentNamespaceHandler extends NamespaceHandlerSupport { + @Override + public void init() { + registerBeanDefinitionParser("component", + new ComponentBeanDefinitionParser()); + } +} diff --git a/spring-beans/src/test/resources/META-INF/spring.handlers b/src/test/resources/META-INF/spring.handlers similarity index 100% rename from spring-beans/src/test/resources/META-INF/spring.handlers rename to src/test/resources/META-INF/spring.handlers diff --git a/spring-beans/src/test/resources/META-INF/spring.schemas b/src/test/resources/META-INF/spring.schemas similarity index 100% rename from spring-beans/src/test/resources/META-INF/spring.schemas rename to src/test/resources/META-INF/spring.schemas diff --git a/spring-beans/src/test/resources/com/foo/component-config.xml b/src/test/resources/com/foo/component-config.xml similarity index 100% rename from spring-beans/src/test/resources/com/foo/component-config.xml rename to src/test/resources/com/foo/component-config.xml diff --git a/spring-beans/src/test/resources/com/foo/component.xsd b/src/test/resources/com/foo/component.xsd similarity index 100% rename from spring-beans/src/test/resources/com/foo/component.xsd rename to src/test/resources/com/foo/component.xsd