Use Gradle test fixture support for spring-core
See gh-23550
This commit is contained in:
@@ -47,9 +47,9 @@ import org.springframework.core.convert.ConversionFailedException;
|
||||
import org.springframework.core.convert.TypeDescriptor;
|
||||
import org.springframework.core.convert.support.DefaultConversionService;
|
||||
import org.springframework.core.convert.support.GenericConversionService;
|
||||
import org.springframework.core.test.fixtures.Assume;
|
||||
import org.springframework.core.test.fixtures.EnabledForTestGroups;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.tests.Assume;
|
||||
import org.springframework.tests.EnabledForTestGroups;
|
||||
import org.springframework.tests.sample.beans.BooleanTestBean;
|
||||
import org.springframework.tests.sample.beans.ITestBean;
|
||||
import org.springframework.tests.sample.beans.IndexedTestBean;
|
||||
@@ -62,7 +62,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
|
||||
import static org.assertj.core.api.Assertions.within;
|
||||
import static org.springframework.tests.TestGroup.PERFORMANCE;
|
||||
import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE;
|
||||
|
||||
/**
|
||||
* Shared tests for property accessors.
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.springframework.tests.sample.beans.factory.DummyFactory;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
|
||||
import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource;
|
||||
|
||||
/**
|
||||
* @author Rod Johnson
|
||||
|
||||
@@ -33,11 +33,11 @@ import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
|
||||
import org.springframework.beans.propertyeditors.CustomDateEditor;
|
||||
import org.springframework.tests.EnabledForTestGroups;
|
||||
import org.springframework.tests.TestGroup;
|
||||
import org.springframework.core.test.fixtures.EnabledForTestGroups;
|
||||
import org.springframework.core.test.fixtures.TestGroup;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
|
||||
import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource;
|
||||
|
||||
/**
|
||||
* @author Guillaume Poirier
|
||||
|
||||
@@ -86,10 +86,11 @@ import org.springframework.core.convert.support.DefaultConversionService;
|
||||
import org.springframework.core.convert.support.GenericConversionService;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.UrlResource;
|
||||
import org.springframework.core.test.fixtures.Assume;
|
||||
import org.springframework.core.test.fixtures.EnabledForTestGroups;
|
||||
import org.springframework.core.test.fixtures.TestGroup;
|
||||
import org.springframework.core.test.fixtures.io.SerializationTestUtils;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.tests.Assume;
|
||||
import org.springframework.tests.EnabledForTestGroups;
|
||||
import org.springframework.tests.TestGroup;
|
||||
import org.springframework.tests.sample.beans.DependenciesBean;
|
||||
import org.springframework.tests.sample.beans.DerivedTestBean;
|
||||
import org.springframework.tests.sample.beans.ITestBean;
|
||||
@@ -98,7 +99,6 @@ import org.springframework.tests.sample.beans.NestedTestBean;
|
||||
import org.springframework.tests.sample.beans.SideEffectBean;
|
||||
import org.springframework.tests.sample.beans.TestBean;
|
||||
import org.springframework.tests.sample.beans.factory.DummyFactory;
|
||||
import org.springframework.util.SerializationTestUtils;
|
||||
import org.springframework.util.StopWatch;
|
||||
import org.springframework.util.StringValueResolver;
|
||||
|
||||
|
||||
@@ -27,11 +27,11 @@ import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.core.test.fixtures.stereotype.Component;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
|
||||
import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource;
|
||||
|
||||
/**
|
||||
* @author Rob Harrop
|
||||
|
||||
@@ -68,12 +68,12 @@ import org.springframework.core.Ordered;
|
||||
import org.springframework.core.ResolvableType;
|
||||
import org.springframework.core.annotation.AnnotationAwareOrderComparator;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.core.test.fixtures.io.SerializationTestUtils;
|
||||
import org.springframework.tests.sample.beans.ITestBean;
|
||||
import org.springframework.tests.sample.beans.IndexedTestBean;
|
||||
import org.springframework.tests.sample.beans.NestedTestBean;
|
||||
import org.springframework.tests.sample.beans.TestBean;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
import org.springframework.util.SerializationTestUtils;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
|
||||
import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link CustomAutowireConfigurer}.
|
||||
|
||||
@@ -40,11 +40,11 @@ import org.springframework.beans.factory.support.AutowireCandidateQualifier;
|
||||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
import org.springframework.beans.factory.support.GenericBeanDefinition;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
import org.springframework.core.test.fixtures.io.SerializationTestUtils;
|
||||
import org.springframework.tests.sample.beans.ITestBean;
|
||||
import org.springframework.tests.sample.beans.IndexedTestBean;
|
||||
import org.springframework.tests.sample.beans.NestedTestBean;
|
||||
import org.springframework.tests.sample.beans.TestBean;
|
||||
import org.springframework.util.SerializationTestUtils;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
|
||||
import org.springframework.tests.sample.beans.TestBean;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
|
||||
import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link FieldRetrievingFactoryBean}.
|
||||
|
||||
@@ -28,13 +28,13 @@ import org.springframework.beans.factory.BeanFactory;
|
||||
import org.springframework.beans.factory.ObjectFactory;
|
||||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
|
||||
import org.springframework.util.SerializationTestUtils;
|
||||
import org.springframework.core.test.fixtures.io.SerializationTestUtils;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
|
||||
import static org.mockito.BDDMockito.given;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
|
||||
import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource;
|
||||
|
||||
/**
|
||||
* @author Colin Sampaleanu
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
|
||||
import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link PropertiesFactoryBean}.
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.tests.sample.beans.ITestBean;
|
||||
import org.springframework.tests.sample.beans.TestBean;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
|
||||
import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link PropertyPathFactoryBean}.
|
||||
|
||||
@@ -47,7 +47,7 @@ import org.springframework.util.StringUtils;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
import static org.springframework.beans.factory.support.BeanDefinitionBuilder.genericBeanDefinition;
|
||||
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
|
||||
import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource;
|
||||
|
||||
/**
|
||||
* Unit tests for various {@link PropertyResourceConfigurer} implementations including:
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
|
||||
import org.springframework.tests.sample.beans.TestBean;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
|
||||
import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource;
|
||||
|
||||
/**
|
||||
* Simple test to illustrate and verify scope usage.
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
|
||||
import org.springframework.tests.sample.beans.TestBean;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.springframework.tests.TestResourceUtils.qualifiedResource;
|
||||
import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource;
|
||||
|
||||
/**
|
||||
* @author Rob Harrop
|
||||
|
||||
@@ -49,7 +49,7 @@ import org.springframework.core.annotation.AnnotationAwareOrderComparator;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.core.io.UrlResource;
|
||||
import org.springframework.tests.EnabledForTestGroups;
|
||||
import org.springframework.core.test.fixtures.EnabledForTestGroups;
|
||||
import org.springframework.tests.sample.beans.GenericBean;
|
||||
import org.springframework.tests.sample.beans.GenericIntegerBean;
|
||||
import org.springframework.tests.sample.beans.GenericSetOfIntegerBean;
|
||||
@@ -57,7 +57,7 @@ import org.springframework.tests.sample.beans.TestBean;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
import static org.springframework.tests.TestGroup.LONG_RUNNING;
|
||||
import static org.springframework.core.test.fixtures.TestGroup.LONG_RUNNING;
|
||||
|
||||
/**
|
||||
* @author Juergen Hoeller
|
||||
|
||||
Reference in New Issue
Block a user