Browse Source

Remove '.*' imports from tests

Organize test imports to expand all '.*' static imports into
fully qualified imports.

This update will allow us to use additional checkstyle rules in
the future, and will also help if we migrate fully to AssertJ.
pull/22935/head
Phillip Webb 7 years ago
parent
commit
816bbee8de
  1. 6
      spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscovererTests.java
  2. 7
      spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutTests.java
  3. 5
      spring-aop/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutMatchingTests.java
  4. 9
      spring-aop/src/test/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPointTests.java
  5. 5
      spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java
  6. 5
      spring-aop/src/test/java/org/springframework/aop/aspectj/TrickyAspectJPointcutExpressionTests.java
  7. 5
      spring-aop/src/test/java/org/springframework/aop/aspectj/TypePatternClassFilterTests.java
  8. 9
      spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java
  9. 4
      spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ArgumentBindingTests.java
  10. 7
      spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java
  11. 8
      spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectMetadataTests.java
  12. 5
      spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectProxyFactoryTests.java
  13. 4
      spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJNamespaceHandlerTests.java
  14. 4
      spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparatorTests.java
  15. 8
      spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java
  16. 7
      spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests.java
  17. 4
      spring-aop/src/test/java/org/springframework/aop/config/TopLevelAopTagTests.java
  18. 6
      spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java
  19. 4
      spring-aop/src/test/java/org/springframework/aop/framework/MethodInvocationTests.java
  20. 4
      spring-aop/src/test/java/org/springframework/aop/framework/PrototypeTargetTests.java
  21. 11
      spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java
  22. 8
      spring-aop/src/test/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptorTests.java
  23. 4
      spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java
  24. 10
      spring-aop/src/test/java/org/springframework/aop/interceptor/CustomizableTraceInterceptorTests.java
  25. 11
      spring-aop/src/test/java/org/springframework/aop/interceptor/DebugInterceptorTests.java
  26. 6
      spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisorsTests.java
  27. 5
      spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java
  28. 9
      spring-aop/src/test/java/org/springframework/aop/interceptor/JamonPerformanceMonitorInterceptorTests.java
  29. 9
      spring-aop/src/test/java/org/springframework/aop/interceptor/PerformanceMonitorInterceptorTests.java
  30. 10
      spring-aop/src/test/java/org/springframework/aop/interceptor/SimpleTraceInterceptorTests.java
  31. 2
      spring-aop/src/test/java/org/springframework/aop/scope/DefaultScopedObjectTests.java
  32. 6
      spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyAutowireTests.java
  33. 6
      spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java
  34. 6
      spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java
  35. 5
      spring-aop/src/test/java/org/springframework/aop/support/ClassFiltersTests.java
  36. 4
      spring-aop/src/test/java/org/springframework/aop/support/ClassUtilsTests.java
  37. 6
      spring-aop/src/test/java/org/springframework/aop/support/ComposablePointcutTests.java
  38. 5
      spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java
  39. 9
      spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java
  40. 6
      spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java
  41. 6
      spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java
  42. 5
      spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java
  43. 4
      spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java
  44. 6
      spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java
  45. 6
      spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java
  46. 4
      spring-aop/src/test/java/org/springframework/aop/target/LazyCreationTargetSourceTests.java
  47. 8
      spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java
  48. 5
      spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java
  49. 4
      spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java
  50. 6
      spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java
  51. 8
      spring-aop/src/test/java/org/springframework/aop/target/dynamic/RefreshableTargetSourceTests.java
  52. 4
      spring-aspects/src/test/java/org/springframework/beans/factory/aspectj/XmlBeanConfigurerTests.java
  53. 6
      spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJCacheAnnotationTests.java
  54. 7
      spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingIsolatedTests.java
  55. 4
      spring-aspects/src/test/java/org/springframework/context/annotation/aspectj/AnnotationBeanConfigurerTests.java
  56. 7
      spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java
  57. 5
      spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationDrivenBeanDefinitionParserTests.java
  58. 3
      spring-aspects/src/test/java/org/springframework/scheduling/aspectj/TestableAsyncUncaughtExceptionHandler.java
  59. 5
      spring-aspects/src/test/java/org/springframework/transaction/aspectj/JtaTransactionAspectsTests.java
  60. 4
      spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionAspectTests.java
  61. 6
      spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java
  62. 4
      spring-beans/src/test/java/org/springframework/beans/AbstractPropertyValuesTests.java
  63. 5
      spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java
  64. 8
      spring-beans/src/test/java/org/springframework/beans/BeanWrapperAutoGrowingTests.java
  65. 6
      spring-beans/src/test/java/org/springframework/beans/BeanWrapperEnumTests.java
  66. 6
      spring-beans/src/test/java/org/springframework/beans/BeanWrapperGenericsTests.java
  67. 9
      spring-beans/src/test/java/org/springframework/beans/BeanWrapperTests.java
  68. 8
      spring-beans/src/test/java/org/springframework/beans/CachedIntrospectionResultsTests.java
  69. 6
      spring-beans/src/test/java/org/springframework/beans/ConcurrentBeanWrapperTests.java
  70. 2
      spring-beans/src/test/java/org/springframework/beans/DirectFieldAccessorTests.java
  71. 5
      spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoFactoryTests.java
  72. 8
      spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java
  73. 10
      spring-beans/src/test/java/org/springframework/beans/MutablePropertyValuesTests.java
  74. 5
      spring-beans/src/test/java/org/springframework/beans/PropertyAccessorUtilsTests.java
  75. 7
      spring-beans/src/test/java/org/springframework/beans/PropertyMatchesTests.java
  76. 7
      spring-beans/src/test/java/org/springframework/beans/SimplePropertyDescriptorTests.java
  77. 7
      spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java
  78. 5
      spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java
  79. 21
      spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java
  80. 6
      spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanLookupTests.java
  81. 9
      spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanTests.java
  82. 8
      spring-beans/src/test/java/org/springframework/beans/factory/Spr5475Tests.java
  83. 8
      spring-beans/src/test/java/org/springframework/beans/factory/annotation/AnnotationBeanWiringInfoResolverTests.java
  84. 12
      spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java
  85. 4
      spring-beans/src/test/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurerTests.java
  86. 11
      spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java
  87. 7
      spring-beans/src/test/java/org/springframework/beans/factory/annotation/LookupAnnotationTests.java
  88. 10
      spring-beans/src/test/java/org/springframework/beans/factory/annotation/ParameterResolutionTests.java
  89. 6
      spring-beans/src/test/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessorTests.java
  90. 5
      spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java
  91. 4
      spring-beans/src/test/java/org/springframework/beans/factory/config/CustomScopeConfigurerTests.java
  92. 4
      spring-beans/src/test/java/org/springframework/beans/factory/config/DeprecatedBeanWarnerTests.java
  93. 4
      spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java
  94. 8
      spring-beans/src/test/java/org/springframework/beans/factory/config/MethodInvokingFactoryBeanTests.java
  95. 10
      spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java
  96. 7
      spring-beans/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java
  97. 9
      spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java
  98. 11
      spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurerTests.java
  99. 11
      spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java
  100. 10
      spring-beans/src/test/java/org/springframework/beans/factory/config/ServiceLocatorFactoryBeanTests.java
  101. Some files were not shown because too many files have changed in this diff Show More

6
spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscovererTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -23,7 +23,9 @@ import org.junit.Test; @@ -23,7 +23,9 @@ import org.junit.Test;
import org.springframework.aop.aspectj.AspectJAdviceParameterNameDiscoverer.AmbiguousBindingException;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
/**
* Unit tests for the {@link AspectJAdviceParameterNameDiscoverer} class.

7
spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -36,7 +36,10 @@ import org.springframework.tests.sample.beans.ITestBean; @@ -36,7 +36,10 @@ import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
import org.springframework.tests.sample.beans.subpkg.DeepBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
/**
* @author Rob Harrop

5
spring-aop/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutMatchingTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -20,7 +20,8 @@ import org.junit.Test; @@ -20,7 +20,8 @@ import org.junit.Test;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* Tests for matching of bean() pointcut designator.

9
spring-aop/src/test/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPointTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2019 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.
@ -37,7 +37,12 @@ import org.springframework.lang.Nullable; @@ -37,7 +37,12 @@ import org.springframework.lang.Nullable;
import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
/**
* @author Rod Johnson

5
spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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,8 @@ import test.annotation.transaction.Tx; @@ -29,7 +29,8 @@ import test.annotation.transaction.Tx;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* Java 5 specific {@link AspectJExpressionPointcutTests}.

5
spring-aop/src/test/java/org/springframework/aop/aspectj/TrickyAspectJPointcutExpressionTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2019 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.
@ -34,7 +34,8 @@ import org.springframework.aop.support.DefaultPointcutAdvisor; @@ -34,7 +34,8 @@ import org.springframework.aop.support.DefaultPointcutAdvisor;
import org.springframework.core.OverridingClassLoader;
import org.springframework.lang.Nullable;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
/**
* @author Dave Syer

5
spring-aop/src/test/java/org/springframework/aop/aspectj/TypePatternClassFilterTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2019 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,8 @@ import org.springframework.tests.sample.beans.ITestBean; @@ -26,7 +26,8 @@ import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
import org.springframework.tests.sample.beans.subpkg.DeepBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* Unit tests for the {@link TypePatternClassFilter} class.

9
spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java

@ -59,8 +59,13 @@ import org.springframework.tests.sample.beans.TestBean; @@ -59,8 +59,13 @@ import org.springframework.tests.sample.beans.TestBean;
import org.springframework.util.ObjectUtils;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static org.hamcrest.Matchers.instanceOf;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
/**
* Abstract tests for AspectJAdvisorFactory.

4
spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ArgumentBindingTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2019 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.
@ -30,7 +30,7 @@ import org.springframework.aop.aspectj.AspectJAdviceParameterNameDiscoverer; @@ -30,7 +30,7 @@ import org.springframework.aop.aspectj.AspectJAdviceParameterNameDiscoverer;
import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
/**
* @author Adrian Colyer

7
spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2019 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.
@ -25,7 +25,10 @@ import org.springframework.aop.aspectj.AspectJExpressionPointcutTests; @@ -25,7 +25,10 @@ import org.springframework.aop.aspectj.AspectJExpressionPointcutTests;
import org.springframework.aop.framework.AopConfigException;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
/**
* @author Rod Johnson

8
spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectMetadataTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2019 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.
@ -23,7 +23,11 @@ import test.aop.PerTargetAspect; @@ -23,7 +23,11 @@ import test.aop.PerTargetAspect;
import org.springframework.aop.Pointcut;
import org.springframework.aop.aspectj.annotation.AbstractAspectJAdvisorFactoryTests.ExceptionAspect;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
/**
* @since 2.0

5
spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectProxyFactoryTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2019 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.
@ -28,7 +28,8 @@ import test.aop.PerThisAspect; @@ -28,7 +28,8 @@ import test.aop.PerThisAspect;
import org.springframework.util.SerializationTestUtils;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
/**
* @author Rob Harrop

4
spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJNamespaceHandlerTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2019 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.
@ -31,7 +31,7 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; @@ -31,7 +31,7 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.beans.factory.xml.XmlReaderContext;
import org.springframework.tests.beans.CollectingReaderEventListener;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
/**
* @author Rob Harrop

4
spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparatorTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2019 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.
@ -35,7 +35,7 @@ import org.springframework.aop.aspectj.AspectJPointcutAdvisor; @@ -35,7 +35,7 @@ import org.springframework.aop.aspectj.AspectJPointcutAdvisor;
import org.springframework.aop.support.DefaultPointcutAdvisor;
import org.springframework.lang.Nullable;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
/**
* @author Adrian Colyer

8
spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -32,8 +32,10 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; @@ -32,8 +32,10 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.core.io.Resource;
import org.springframework.tests.beans.CollectingReaderEventListener;
import static org.junit.Assert.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* @author Rob Harrop

7
spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2019 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.
@ -23,8 +23,9 @@ import org.springframework.beans.factory.parsing.BeanDefinitionParsingException; @@ -23,8 +23,9 @@ import org.springframework.beans.factory.parsing.BeanDefinitionParsingException;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import static org.junit.Assert.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* @author Mark Fisher

4
spring-aop/src/test/java/org/springframework/aop/config/TopLevelAopTagTests.java

@ -21,8 +21,8 @@ import org.junit.Test; @@ -21,8 +21,8 @@ import org.junit.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import static org.junit.Assert.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertTrue;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* Tests that the <aop:config/> element can be used as a top level element.

6
spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2019 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,9 @@ import org.springframework.aop.SpringProxy; @@ -26,7 +26,9 @@ import org.springframework.aop.SpringProxy;
import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* @author Rod Johnson

4
spring-aop/src/test/java/org/springframework/aop/framework/MethodInvocationTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2019 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,7 @@ import org.junit.Test; @@ -26,7 +26,7 @@ import org.junit.Test;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertTrue;
/**
* @author Rod Johnson

4
spring-aop/src/test/java/org/springframework/aop/framework/PrototypeTargetTests.java

@ -24,8 +24,8 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; @@ -24,8 +24,8 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.core.io.Resource;
import static org.junit.Assert.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertEquals;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* @author Juergen Hoeller

11
spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -42,9 +42,14 @@ import org.springframework.tests.sample.beans.IOther; @@ -42,9 +42,14 @@ import org.springframework.tests.sample.beans.IOther;
import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
/**
* Also tests AdvisedSupport and ProxyCreatorSupport superclasses.

8
spring-aop/src/test/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptorTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2019 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.
@ -28,8 +28,10 @@ import org.junit.Test; @@ -28,8 +28,10 @@ import org.junit.Test;
import org.springframework.aop.ThrowsAdvice;
import org.springframework.tests.aop.advice.MethodCounter;
import static org.junit.Assert.*;
import static org.mockito.BDDMockito.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
/**
* @author Rod Johnson

4
spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -27,7 +27,7 @@ import org.springframework.tests.sample.beans.ITestBean; @@ -27,7 +27,7 @@ import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
import org.springframework.util.SerializationTestUtils;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
/**
* @author Juergen Hoeller

10
spring-aop/src/test/java/org/springframework/aop/interceptor/CustomizableTraceInterceptorTests.java

@ -20,9 +20,13 @@ import org.aopalliance.intercept.MethodInvocation; @@ -20,9 +20,13 @@ import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.BDDMockito.*;
import static org.junit.Assert.fail;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
/**
* @author Rob Harrop

11
spring-aop/src/test/java/org/springframework/aop/interceptor/DebugInterceptorTests.java

@ -20,9 +20,14 @@ import org.aopalliance.intercept.MethodInvocation; @@ -20,9 +20,14 @@ import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.BDDMockito.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
/**
* Unit tests for the {@link DebugInterceptor} class.

6
spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisorsTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2019 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.
@ -23,7 +23,9 @@ import org.springframework.beans.factory.NamedBean; @@ -23,7 +23,9 @@ import org.springframework.beans.factory.NamedBean;
import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* @author Rod Johnson

5
spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java

@ -24,8 +24,9 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; @@ -24,8 +24,9 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* Non-XML tests are in AbstractAopProxyTests

9
spring-aop/src/test/java/org/springframework/aop/interceptor/JamonPerformanceMonitorInterceptorTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2019 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.
@ -23,8 +23,11 @@ import org.junit.After; @@ -23,8 +23,11 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.mockito.BDDMockito.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
/**
* @author Steve Souza

9
spring-aop/src/test/java/org/springframework/aop/interceptor/PerformanceMonitorInterceptorTests.java

@ -20,9 +20,12 @@ import org.aopalliance.intercept.MethodInvocation; @@ -20,9 +20,12 @@ import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.BDDMockito.*;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
/**
* @author Rob Harrop

10
spring-aop/src/test/java/org/springframework/aop/interceptor/SimpleTraceInterceptorTests.java

@ -20,9 +20,13 @@ import org.aopalliance.intercept.MethodInvocation; @@ -20,9 +20,13 @@ import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.BDDMockito.*;
import static org.junit.Assert.fail;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
/**
* Unit tests for the {@link SimpleTraceInterceptor} class.

2
spring-aop/src/test/java/org/springframework/aop/scope/DefaultScopedObjectTests.java

@ -20,7 +20,7 @@ import org.junit.Test; @@ -20,7 +20,7 @@ import org.junit.Test;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import static org.mockito.Mockito.*;
import static org.mockito.Mockito.mock;
/**
* Unit tests for the {@link DefaultScopedObject} class.

6
spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyAutowireTests.java

@ -23,8 +23,10 @@ import org.junit.Test; @@ -23,8 +23,10 @@ import org.junit.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import static org.junit.Assert.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* @author Mark Fisher

6
spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2019 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,7 +24,9 @@ import org.junit.Test; @@ -24,7 +24,9 @@ import org.junit.Test;
import org.springframework.tests.sample.beans.TestBean;
import org.springframework.util.SerializationTestUtils;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* @author Rod Johnson

6
spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2019 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.
@ -30,7 +30,9 @@ import org.springframework.tests.aop.interceptor.NopInterceptor; @@ -30,7 +30,9 @@ import org.springframework.tests.aop.interceptor.NopInterceptor;
import org.springframework.tests.sample.beans.TestBean;
import org.springframework.util.SerializationTestUtils;
import static org.junit.Assert.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
/**
* @author Rod Johnson

5
spring-aop/src/test/java/org/springframework/aop/support/ClassFiltersTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2019 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.
@ -23,7 +23,8 @@ import org.springframework.core.NestedRuntimeException; @@ -23,7 +23,8 @@ import org.springframework.core.NestedRuntimeException;
import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* @author Rod Johnson

4
spring-aop/src/test/java/org/springframework/aop/support/ClassUtilsTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2019 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.
@ -21,7 +21,7 @@ import org.springframework.aop.framework.ProxyFactory; @@ -21,7 +21,7 @@ import org.springframework.aop.framework.ProxyFactory;
import org.springframework.tests.sample.beans.TestBean;
import org.springframework.util.ClassUtils;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
/**
* @author Colin Sampaleanu

6
spring-aop/src/test/java/org/springframework/aop/support/ComposablePointcutTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2019 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.
@ -27,7 +27,9 @@ import org.springframework.core.NestedRuntimeException; @@ -27,7 +27,9 @@ import org.springframework.core.NestedRuntimeException;
import org.springframework.lang.Nullable;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* @author Rod Johnson

5
spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2019 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,7 +24,8 @@ import org.springframework.tests.aop.interceptor.NopInterceptor; @@ -24,7 +24,8 @@ import org.springframework.tests.aop.interceptor.NopInterceptor;
import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
/**
* @author Rod Johnson

9
spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java

@ -35,9 +35,12 @@ import org.springframework.tests.sample.beans.TestBean; @@ -35,9 +35,12 @@ import org.springframework.tests.sample.beans.TestBean;
import org.springframework.util.SerializationTestUtils;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static org.mockito.BDDMockito.*;
import static org.hamcrest.Matchers.instanceOf;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
/**
* @author Rod Johnson

6
spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2019 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.
@ -27,7 +27,9 @@ import org.springframework.tests.sample.beans.ITestBean; @@ -27,7 +27,9 @@ import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
import org.springframework.util.SerializationTestUtils;
import static org.junit.Assert.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
/**
* @author Juergen Hoeller

6
spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -27,7 +27,9 @@ import org.springframework.tests.sample.beans.Person; @@ -27,7 +27,9 @@ import org.springframework.tests.sample.beans.Person;
import org.springframework.tests.sample.beans.SerializablePerson;
import org.springframework.util.SerializationTestUtils;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* @author Rod Johnson

5
spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2019 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.
@ -25,7 +25,8 @@ import org.springframework.aop.Pointcut; @@ -25,7 +25,8 @@ import org.springframework.aop.Pointcut;
import org.springframework.lang.Nullable;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* @author Rod Johnson

4
spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java

@ -29,8 +29,8 @@ import org.springframework.tests.sample.beans.Person; @@ -29,8 +29,8 @@ import org.springframework.tests.sample.beans.Person;
import org.springframework.tests.sample.beans.TestBean;
import org.springframework.util.SerializationTestUtils;
import static org.junit.Assert.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertEquals;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* @author Rod Johnson

6
spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2019 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,8 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; @@ -24,8 +24,8 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.core.io.Resource;
import org.springframework.tests.sample.beans.ITestBean;
import static org.junit.Assert.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertTrue;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* @author Stephane Nicoll

6
spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java

@ -31,8 +31,10 @@ import org.springframework.tests.sample.beans.SerializablePerson; @@ -31,8 +31,10 @@ import org.springframework.tests.sample.beans.SerializablePerson;
import org.springframework.tests.sample.beans.SideEffectBean;
import org.springframework.util.SerializationTestUtils;
import static org.junit.Assert.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* @author Rod Johnson

4
spring-aop/src/test/java/org/springframework/aop/target/LazyCreationTargetSourceTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2019 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.
@ -21,7 +21,7 @@ import org.junit.Test; @@ -21,7 +21,7 @@ import org.junit.Test;
import org.springframework.aop.TargetSource;
import org.springframework.aop.framework.ProxyFactory;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
/**
* @author Rob Harrop

8
spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2019 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.
@ -25,8 +25,10 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; @@ -25,8 +25,10 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.core.io.Resource;
import org.springframework.tests.sample.beans.ITestBean;
import static org.junit.Assert.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* @author Juergen Hoeller

5
spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2019 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,8 @@ import org.springframework.tests.sample.beans.SerializablePerson; @@ -26,7 +26,8 @@ import org.springframework.tests.sample.beans.SerializablePerson;
import org.springframework.tests.sample.beans.TestBean;
import org.springframework.util.SerializationTestUtils;
import static org.junit.Assert.*;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
/**
* Unit tests relating to the abstract {@link AbstractPrototypeBasedTargetSource}

4
spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java

@ -23,8 +23,8 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; @@ -23,8 +23,8 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.tests.sample.beans.SideEffectBean;
import static org.junit.Assert.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertEquals;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* @author Rod Johnson

6
spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java

@ -24,8 +24,10 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; @@ -24,8 +24,10 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.SideEffectBean;
import static org.junit.Assert.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* @author Rod Johnson

8
spring-aop/src/test/java/org/springframework/aop/target/dynamic/RefreshableTargetSourceTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2019 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.
@ -21,7 +21,11 @@ import org.junit.Test; @@ -21,7 +21,11 @@ import org.junit.Test;
import org.springframework.tests.Assume;
import org.springframework.tests.TestGroup;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
/**
* @author Rob Harrop

4
spring-aspects/src/test/java/org/springframework/beans/factory/aspectj/XmlBeanConfigurerTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2019 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.
@ -20,7 +20,7 @@ import org.junit.Test; @@ -20,7 +20,7 @@ import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
/**
* @author Chris Beams

6
spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJCacheAnnotationTests.java vendored

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2019 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.
@ -25,7 +25,9 @@ import org.springframework.cache.config.CacheableService; @@ -25,7 +25,9 @@ import org.springframework.cache.config.CacheableService;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.GenericXmlApplicationContext;
import static org.junit.Assert.*;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
/**
* @author Costin Leau

7
spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingIsolatedTests.java vendored

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -43,7 +43,10 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext @@ -43,7 +43,10 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
/**
* @author Stephane Nicoll

4
spring-aspects/src/test/java/org/springframework/context/annotation/aspectj/AnnotationBeanConfigurerTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2019 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.
@ -23,7 +23,7 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext @@ -23,7 +23,7 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
/**
* Tests that @EnableSpringConfigured properly registers an

7
spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -40,7 +40,10 @@ import org.springframework.util.concurrent.ListenableFuture; @@ -40,7 +40,10 @@ import org.springframework.util.concurrent.ListenableFuture;
import static org.hamcrest.CoreMatchers.startsWith;
import static org.hamcrest.Matchers.not;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
/**
* Unit tests for {@link AnnotationAsyncExecutionAspect}.

5
spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationDrivenBeanDefinitionParserTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -27,7 +27,8 @@ import org.springframework.context.ConfigurableApplicationContext; @@ -27,7 +27,8 @@ import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.scheduling.config.TaskManagementConfigUtils;
import static org.junit.Assert.*;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
/**
* @author Stephane Nicoll

3
spring-aspects/src/test/java/org/springframework/scheduling/aspectj/TestableAsyncUncaughtExceptionHandler.java

@ -22,7 +22,8 @@ import java.util.concurrent.TimeUnit; @@ -22,7 +22,8 @@ import java.util.concurrent.TimeUnit;
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
/**
* A {@link AsyncUncaughtExceptionHandler} implementation used for testing purposes.

5
spring-aspects/src/test/java/org/springframework/transaction/aspectj/JtaTransactionAspectsTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2019 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.
@ -30,7 +30,8 @@ import org.springframework.test.context.ContextConfiguration; @@ -30,7 +30,8 @@ import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.tests.transaction.CallCountingTransactionManager;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
/**
* @author Stephane Nicoll

4
spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionAspectTests.java

@ -21,7 +21,9 @@ import org.junit.Test; @@ -21,7 +21,9 @@ import org.junit.Test;
import org.springframework.tests.transaction.CallCountingTransactionManager;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.fail;
/**
* @author Rod Johnson

6
spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java

@ -65,7 +65,11 @@ import static org.hamcrest.CoreMatchers.notNullValue; @@ -65,7 +65,11 @@ import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
/**
* Shared tests for property accessors.

4
spring-beans/src/test/java/org/springframework/beans/AbstractPropertyValuesTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -19,7 +19,7 @@ package org.springframework.beans; @@ -19,7 +19,7 @@ package org.springframework.beans;
import java.util.HashMap;
import java.util.Map;
import static org.junit.Assert.*;
import static org.junit.Assert.assertTrue;
/**
* @author Rod Johnson

5
spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java

@ -33,7 +33,10 @@ import org.springframework.tests.sample.beans.DerivedTestBean; @@ -33,7 +33,10 @@ import org.springframework.tests.sample.beans.DerivedTestBean;
import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
/**
* Unit tests for {@link BeanUtils}.

8
spring-beans/src/test/java/org/springframework/beans/BeanWrapperAutoGrowingTests.java

@ -23,8 +23,12 @@ import org.junit.Before; @@ -23,8 +23,12 @@ import org.junit.Before;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static org.hamcrest.Matchers.instanceOf;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
/**
* @author Keith Donald

6
spring-beans/src/test/java/org/springframework/beans/BeanWrapperEnumTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -25,7 +25,9 @@ import org.springframework.core.convert.support.DefaultConversionService; @@ -25,7 +25,9 @@ import org.springframework.core.convert.support.DefaultConversionService;
import org.springframework.tests.sample.beans.CustomEnum;
import org.springframework.tests.sample.beans.GenericBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
/**
* @author Juergen Hoeller

6
spring-beans/src/test/java/org/springframework/beans/BeanWrapperGenericsTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -39,7 +39,9 @@ import org.springframework.tests.sample.beans.GenericIntegerBean; @@ -39,7 +39,9 @@ import org.springframework.tests.sample.beans.GenericIntegerBean;
import org.springframework.tests.sample.beans.GenericSetOfIntegerBean;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
/**
* @author Juergen Hoeller

9
spring-beans/src/test/java/org/springframework/beans/BeanWrapperTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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,7 +24,12 @@ import org.junit.Test; @@ -24,7 +24,12 @@ import org.junit.Test;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
/**
* Specific {@link BeanWrapperImpl} tests.

8
spring-beans/src/test/java/org/springframework/beans/CachedIntrospectionResultsTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2019 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.
@ -25,9 +25,11 @@ import org.junit.Test; @@ -25,9 +25,11 @@ import org.junit.Test;
import org.springframework.core.OverridingClassLoader;
import org.springframework.tests.sample.beans.TestBean;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* @author Juergen Hoeller

6
spring-beans/src/test/java/org/springframework/beans/ConcurrentBeanWrapperTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2019 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.
@ -28,7 +28,9 @@ import org.apache.commons.logging.Log; @@ -28,7 +28,9 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
/**
* @author Guillaume Poirier

2
spring-beans/src/test/java/org/springframework/beans/DirectFieldAccessorTests.java

@ -20,7 +20,7 @@ import org.junit.Test; @@ -20,7 +20,7 @@ import org.junit.Test;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
/**
* Specific {@link DirectFieldAccessor} tests.

5
spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoFactoryTests.java

@ -20,8 +20,9 @@ import java.beans.IntrospectionException; @@ -20,8 +20,9 @@ import java.beans.IntrospectionException;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.MatcherAssert.*;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.MatcherAssert.assertThat;
/**
* Unit tests for {@link ExtendedBeanInfoTests}.

8
spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2019 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.
@ -30,8 +30,10 @@ import org.springframework.tests.sample.beans.TestBean; @@ -30,8 +30,10 @@ import org.springframework.tests.sample.beans.TestBean;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.lessThan;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
/**
* @author Chris Beams

10
spring-beans/src/test/java/org/springframework/beans/MutablePropertyValuesTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -20,9 +20,13 @@ import java.util.Iterator; @@ -20,9 +20,13 @@ import java.util.Iterator;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
/**
* Tests for {@link MutablePropertyValues}.

5
spring-beans/src/test/java/org/springframework/beans/PropertyAccessorUtilsTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2019 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.
@ -20,7 +20,8 @@ import java.util.Arrays; @@ -20,7 +20,8 @@ import java.util.Arrays;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
/**
* @author Juergen Hoeller

7
spring-beans/src/test/java/org/springframework/beans/PropertyMatchesTests.java

@ -18,8 +18,11 @@ package org.springframework.beans; @@ -18,8 +18,11 @@ package org.springframework.beans;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.*;
import static org.hamcrest.Matchers.*;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.emptyArray;
import static org.hamcrest.Matchers.hasItemInArray;
import static org.hamcrest.Matchers.not;
/**
* Tests for {@link PropertyMatches}.

7
spring-beans/src/test/java/org/springframework/beans/SimplePropertyDescriptorTests.java

@ -23,8 +23,11 @@ import java.lang.reflect.Method; @@ -23,8 +23,11 @@ import java.lang.reflect.Method;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.MatcherAssert.*;
import static org.hamcrest.CoreMatchers.allOf;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.MatcherAssert.assertThat;
/**
* @author Chris Beams

7
spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2019 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.
@ -36,8 +36,9 @@ import org.springframework.tests.sample.beans.TestBean; @@ -36,8 +36,9 @@ import org.springframework.tests.sample.beans.TestBean;
import org.springframework.tests.sample.beans.factory.DummyFactory;
import org.springframework.util.ObjectUtils;
import static org.junit.Assert.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* @author Rod Johnson

5
spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java

@ -36,8 +36,9 @@ import org.springframework.beans.propertyeditors.CustomDateEditor; @@ -36,8 +36,9 @@ import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.tests.Assume;
import org.springframework.tests.TestGroup;
import static org.junit.Assert.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* @author Guillaume Poirier

21
spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java

@ -102,10 +102,23 @@ import org.springframework.util.StringValueResolver; @@ -102,10 +102,23 @@ import org.springframework.util.StringValueResolver;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.BDDMockito.*;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.isNull;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
/**
* Tests properties population and autowire behavior.

6
spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanLookupTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2019 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.
@ -25,9 +25,9 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; @@ -25,9 +25,9 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.core.io.ClassPathResource;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.*;
import static org.junit.Assert.assertNotNull;
/**
* Written with the intention of reproducing SPR-7318.

9
spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2019 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.
@ -30,8 +30,11 @@ import org.springframework.core.io.Resource; @@ -30,8 +30,11 @@ import org.springframework.core.io.Resource;
import org.springframework.stereotype.Component;
import org.springframework.util.Assert;
import static org.junit.Assert.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* @author Rob Harrop

8
spring-beans/src/test/java/org/springframework/beans/factory/Spr5475Tests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2019 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.
@ -23,10 +23,10 @@ import org.springframework.beans.factory.config.ConstructorArgumentValues; @@ -23,10 +23,10 @@ import org.springframework.beans.factory.config.ConstructorArgumentValues;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.support.RootBeanDefinition;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.*;
import static org.springframework.beans.factory.support.BeanDefinitionBuilder.*;
import static org.junit.Assert.fail;
import static org.springframework.beans.factory.support.BeanDefinitionBuilder.rootBeanDefinition;
/**
* SPR-5475 exposed the fact that the error message displayed when incorrectly

8
spring-beans/src/test/java/org/springframework/beans/factory/annotation/AnnotationBeanWiringInfoResolverTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2019 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.
@ -20,7 +20,11 @@ import org.junit.Test; @@ -20,7 +20,11 @@ import org.junit.Test;
import org.springframework.beans.factory.wiring.BeanWiringInfo;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
/**
* @author Rick Evans

12
spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -72,7 +72,15 @@ import org.springframework.tests.sample.beans.TestBean; @@ -72,7 +72,15 @@ import org.springframework.tests.sample.beans.TestBean;
import org.springframework.util.ReflectionUtils;
import org.springframework.util.SerializationTestUtils;
import static org.junit.Assert.*;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
/**
* @author Juergen Hoeller

4
spring-beans/src/test/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurerTests.java

@ -24,8 +24,8 @@ import org.springframework.beans.factory.support.AutowireCandidateResolver; @@ -24,8 +24,8 @@ import org.springframework.beans.factory.support.AutowireCandidateResolver;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import static org.junit.Assert.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertEquals;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* Unit tests for {@link CustomAutowireConfigurer}.

11
spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -45,7 +45,14 @@ import org.springframework.tests.sample.beans.NestedTestBean; @@ -45,7 +45,14 @@ import org.springframework.tests.sample.beans.NestedTestBean;
import org.springframework.tests.sample.beans.TestBean;
import org.springframework.util.SerializationTestUtils;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
/**
* Unit tests for {@link org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor}

7
spring-beans/src/test/java/org/springframework/beans/factory/annotation/LookupAnnotationTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2019 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.
@ -23,7 +23,10 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; @@ -23,7 +23,10 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.fail;
/**
* @author Karl Pietrzak

10
spring-beans/src/test/java/org/springframework/beans/factory/annotation/ParameterResolutionTests.java

@ -28,9 +28,13 @@ import org.springframework.beans.factory.config.DependencyDescriptor; @@ -28,9 +28,13 @@ import org.springframework.beans.factory.config.DependencyDescriptor;
import org.springframework.util.ClassUtils;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.junit.Assert.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.isNull;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
/**
* Unit tests for {@link ParameterResolutionDelegate}.

6
spring-beans/src/test/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessorTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -32,7 +32,9 @@ import org.springframework.beans.factory.support.BeanDefinitionBuilder; @@ -32,7 +32,9 @@ import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.support.RootBeanDefinition;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
/**
* @author Rob Harrop

5
spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2019 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.
@ -35,7 +35,8 @@ import org.springframework.beans.factory.support.RootBeanDefinition; @@ -35,7 +35,8 @@ import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
/**
* @author Juergen Hoeller

4
spring-beans/src/test/java/org/springframework/beans/factory/config/CustomScopeConfigurerTests.java

@ -23,8 +23,8 @@ import org.junit.Test; @@ -23,8 +23,8 @@ import org.junit.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
/**
* Unit tests for {@link CustomScopeConfigurer}.

4
spring-beans/src/test/java/org/springframework/beans/factory/config/DeprecatedBeanWarnerTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -21,7 +21,7 @@ import org.junit.Test; @@ -21,7 +21,7 @@ import org.junit.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.support.RootBeanDefinition;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
/**
* @author Arjen Poutsma

4
spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java

@ -24,8 +24,8 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; @@ -24,8 +24,8 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertEquals;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* Unit tests for {@link FieldRetrievingFactoryBean}.

8
spring-beans/src/test/java/org/springframework/beans/factory/config/MethodInvokingFactoryBeanTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2019 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,11 @@ import org.springframework.beans.propertyeditors.StringTrimmerEditor; @@ -26,7 +26,11 @@ import org.springframework.beans.propertyeditors.StringTrimmerEditor;
import org.springframework.beans.support.ArgumentConvertingMethodInvoker;
import org.springframework.util.MethodInvoker;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
/**
* Unit tests for {@link MethodInvokingFactoryBean} and {@link MethodInvokingBean}.

10
spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java

@ -29,9 +29,13 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; @@ -29,9 +29,13 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.util.SerializationTestUtils;
import static org.junit.Assert.*;
import static org.mockito.BDDMockito.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* @author Colin Sampaleanu

7
spring-beans/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2019 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.
@ -22,8 +22,9 @@ import org.junit.Test; @@ -22,8 +22,9 @@ import org.junit.Test;
import org.springframework.core.io.Resource;
import static org.junit.Assert.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* Unit tests for {@link PropertiesFactoryBean}.

9
spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2019 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,11 @@ import org.springframework.core.io.Resource; @@ -24,8 +24,11 @@ import org.springframework.core.io.Resource;
import org.springframework.tests.sample.beans.ITestBean;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* Unit tests for {@link PropertyPathFactoryBean}.

11
spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurerTests.java

@ -28,10 +28,13 @@ import org.springframework.core.io.ClassPathResource; @@ -28,10 +28,13 @@ import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.tests.sample.beans.TestBean;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
import static org.springframework.beans.factory.support.BeanDefinitionBuilder.*;
import static org.springframework.beans.factory.support.BeanDefinitionReaderUtils.*;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.junit.Assert.assertThat;
import static org.springframework.beans.factory.support.BeanDefinitionBuilder.genericBeanDefinition;
import static org.springframework.beans.factory.support.BeanDefinitionBuilder.rootBeanDefinition;
import static org.springframework.beans.factory.support.BeanDefinitionReaderUtils.registerWithGeneratedName;
/**
* Unit tests for {@link PropertyPlaceholderConfigurer}.

11
spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java

@ -44,9 +44,14 @@ import org.springframework.tests.sample.beans.IndexedTestBean; @@ -44,9 +44,14 @@ import org.springframework.tests.sample.beans.IndexedTestBean;
import org.springframework.tests.sample.beans.TestBean;
import org.springframework.util.StringUtils;
import static org.junit.Assert.*;
import static org.springframework.beans.factory.support.BeanDefinitionBuilder.*;
import static org.springframework.tests.TestResourceUtils.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.springframework.beans.factory.support.BeanDefinitionBuilder.genericBeanDefinition;
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
/**
* Unit tests for various {@link PropertyResourceConfigurer} implementations including:

10
spring-beans/src/test/java/org/springframework/beans/factory/config/ServiceLocatorFactoryBeanTests.java

@ -27,9 +27,13 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; @@ -27,9 +27,13 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.core.NestedCheckedException;
import org.springframework.core.NestedRuntimeException;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
import static org.springframework.beans.factory.support.BeanDefinitionBuilder.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
import static org.springframework.beans.factory.support.BeanDefinitionBuilder.genericBeanDefinition;
/**
* Unit tests for {@link ServiceLocatorFactoryBean}.

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save