Use Gradle test fixture support for spring-beans and spring-context

See gh-23550
This commit is contained in:
Sam Brannen
2019-12-28 17:13:39 +01:00
parent 5718bf424b
commit 61d4ee594d
585 changed files with 2270 additions and 1618 deletions

View File

@@ -27,8 +27,8 @@ import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import org.springframework.beans.test.fixtures.beans.TestBean;
import org.springframework.context.ApplicationContext;
import org.springframework.tests.sample.beans.TestBean;
/**
* Simple JavaBean domain object representing an person.

View File

@@ -18,7 +18,7 @@ package org.springframework.orm.jpa.persistenceunit;
import org.junit.jupiter.api.Test;
import org.springframework.context.index.CandidateComponentsTestClassLoader;
import org.springframework.context.test.fixtures.index.CandidateComponentsTestClassLoader;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.orm.jpa.domain.Person;

View File

@@ -28,6 +28,7 @@ import javax.sql.DataSource;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.context.test.fixtures.jndi.SimpleNamingContextBuilder;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.UrlResource;
@@ -35,7 +36,6 @@ import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import org.springframework.jdbc.datasource.lookup.JndiDataSourceLookup;
import org.springframework.jdbc.datasource.lookup.MapDataSourceLookup;
import org.springframework.tests.mock.jndi.SimpleNamingContextBuilder;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;

View File

@@ -37,6 +37,8 @@ import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.context.support.GenericApplicationContext;
import org.springframework.context.test.fixtures.SimpleMapScope;
import org.springframework.context.test.fixtures.jndi.ExpectedLookupTemplate;
import org.springframework.core.test.fixtures.io.SerializationTestUtils;
import org.springframework.lang.Nullable;
import org.springframework.orm.jpa.AbstractEntityManagerFactoryBeanTests;
@@ -44,8 +46,6 @@ import org.springframework.orm.jpa.DefaultJpaDialect;
import org.springframework.orm.jpa.EntityManagerFactoryInfo;
import org.springframework.orm.jpa.EntityManagerHolder;
import org.springframework.stereotype.Repository;
import org.springframework.tests.context.SimpleMapScope;
import org.springframework.tests.mock.jndi.ExpectedLookupTemplate;
import org.springframework.transaction.support.TransactionSynchronizationManager;
import static org.assertj.core.api.Assertions.assertThat;

View File

@@ -9,7 +9,7 @@
</persistence-unit>
<persistence-unit name="Test" transaction-type="RESOURCE_LOCAL">
<class>org.springframework.tests.sample.beans.TestBean</class>
<class>org.springframework.beans.test.fixtures.beans.TestBean</class>
<exclude-unlisted-classes />
</persistence-unit>