pull/9707/head
Stephane Nicoll 7 years ago
parent b37946363b
commit cb13c98649

@ -58,7 +58,6 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.test.context.ContextConsumer;
import org.springframework.boot.test.context.ContextLoader;
import org.springframework.boot.test.context.StandardContextLoader;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.cassandra.core.CassandraOperations;
@ -80,7 +79,7 @@ import static org.mockito.Mockito.mock;
*/
public class HealthIndicatorAutoConfigurationTests {
public final StandardContextLoader contextLoader = ContextLoader.standard()
public final ContextLoader contextLoader = ContextLoader.standard()
.autoConfig(HealthIndicatorAutoConfiguration.class,
ManagementServerProperties.class);

@ -56,7 +56,6 @@ import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.boot.autoconfigure.cache.support.MockCachingProvider;
import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration;
import org.springframework.boot.test.context.ContextLoader;
import org.springframework.boot.test.context.StandardContextLoader;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathRunner;
import org.springframework.cache.Cache;
@ -101,7 +100,7 @@ public class CacheAutoConfigurationTests {
@Rule
public final ExpectedException thrown = ExpectedException.none();
private final StandardContextLoader contextLoader = ContextLoader.standard()
private final ContextLoader contextLoader = ContextLoader.standard()
.autoConfig(CacheAutoConfiguration.class);
@Test

@ -29,7 +29,6 @@ import org.junit.Test;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.boot.test.context.ContextLoader;
import org.springframework.boot.test.context.StandardContextLoader;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -60,7 +59,7 @@ public class HazelcastAutoConfigurationClientTests {
}
}
private final StandardContextLoader contextLoader = ContextLoader.standard()
private final ContextLoader contextLoader = ContextLoader.standard()
.autoConfig(HazelcastAutoConfiguration.class);
@Test

@ -28,7 +28,6 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.boot.test.context.ContextLoader;
import org.springframework.boot.test.context.StandardContextLoader;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathRunner;
import org.springframework.context.annotation.Bean;
@ -46,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat;
@ClassPathExclusions("hazelcast-client-*.jar")
public class HazelcastAutoConfigurationServerTests {
private final StandardContextLoader contextLoader = ContextLoader.standard()
private final ContextLoader contextLoader = ContextLoader.standard()
.autoConfig(HazelcastAutoConfiguration.class);
@Test

@ -22,7 +22,6 @@ import com.hazelcast.core.HazelcastInstance;
import org.junit.Test;
import org.springframework.boot.test.context.ContextLoader;
import org.springframework.boot.test.context.StandardContextLoader;
import org.springframework.core.io.ClassPathResource;
import static org.assertj.core.api.Assertions.assertThat;
@ -34,8 +33,8 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
public class HazelcastAutoConfigurationTests {
private final StandardContextLoader contextLoader = ContextLoader
.standard().autoConfig(HazelcastAutoConfiguration.class);
private final ContextLoader contextLoader = ContextLoader.standard()
.autoConfig(HazelcastAutoConfiguration.class);
@Test
public void defaultConfigFile() throws IOException {

@ -41,7 +41,6 @@ import org.springframework.boot.jdbc.DatabaseDriver;
import org.springframework.boot.test.context.ContextConsumer;
import org.springframework.boot.test.context.ContextLoader;
import org.springframework.boot.test.context.HidePackagesClassLoader;
import org.springframework.boot.test.context.StandardContextLoader;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.core.JdbcTemplate;
@ -58,8 +57,8 @@ import static org.mockito.Mockito.mock;
*/
public class DataSourceAutoConfigurationTests {
private final StandardContextLoader contextLoader = ContextLoader
.standard().autoConfig(DataSourceAutoConfiguration.class)
private final ContextLoader contextLoader = ContextLoader.standard()
.autoConfig(DataSourceAutoConfiguration.class)
.env("spring.datasource.initialize=false",
"spring.datasource.url:jdbc:hsqldb:mem:testdb-"
+ new Random().nextInt());

@ -28,7 +28,6 @@ import org.springframework.beans.DirectFieldAccessor;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration;
import org.springframework.boot.test.context.ContextLoader;
import org.springframework.boot.test.context.StandardContextLoader;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
@ -62,7 +61,7 @@ public class JmsAutoConfigurationTests {
private static final String ACTIVEMQ_NETWORK_URL = "tcp://localhost:61616";
private final StandardContextLoader contextLoader = ContextLoader.standard()
private final ContextLoader contextLoader = ContextLoader.standard()
.autoConfig(ActiveMQAutoConfiguration.class, JmsAutoConfiguration.class);
@Test

@ -25,7 +25,6 @@ import org.junit.Test;
import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration;
import org.springframework.boot.test.context.ContextLoader;
import org.springframework.boot.test.context.StandardContextLoader;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -42,7 +41,7 @@ import static org.mockito.Mockito.mockingDetails;
*/
public class ActiveMQAutoConfigurationTests {
private final StandardContextLoader contextLoader = ContextLoader.standard()
private final ContextLoader contextLoader = ContextLoader.standard()
.autoConfig(ActiveMQAutoConfiguration.class, JmsAutoConfiguration.class);
@Test

@ -43,7 +43,6 @@ import org.junit.rules.TemporaryFolder;
import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration;
import org.springframework.boot.test.context.ContextLoader;
import org.springframework.boot.test.context.StandardContextLoader;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -66,7 +65,7 @@ public class ArtemisAutoConfigurationTests {
@Rule
public final TemporaryFolder folder = new TemporaryFolder();
private final StandardContextLoader contextLoader = ContextLoader.standard()
private final ContextLoader contextLoader = ContextLoader.standard()
.autoConfig(ArtemisAutoConfiguration.class, JmsAutoConfiguration.class);
@Test

@ -21,7 +21,6 @@ import javax.sql.DataSource;
import org.junit.Test;
import org.springframework.boot.test.context.ContextLoader;
import org.springframework.boot.test.context.StandardContextLoader;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.core.JdbcTemplate;
@ -38,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
public class TestDatabaseAutoConfigurationTests {
private final StandardContextLoader contextLoader = ContextLoader.standard()
private final ContextLoader contextLoader = ContextLoader.standard()
.autoConfig(TestDatabaseAutoConfiguration.class);
@Test

@ -24,7 +24,6 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.boot.test.autoconfigure.jdbc.TestDatabaseAutoConfiguration;
import org.springframework.boot.test.context.ContextLoader;
import org.springframework.boot.test.context.StandardContextLoader;
import org.springframework.boot.testsupport.runner.classpath.ClassPathExclusions;
import org.springframework.boot.testsupport.runner.classpath.ModifiedClassPathRunner;
import org.springframework.context.annotation.Bean;
@ -44,7 +43,7 @@ import static org.mockito.Mockito.mock;
@ClassPathExclusions({ "h2-*.jar", "hsqldb-*.jar", "derby-*.jar" })
public class TestDatabaseAutoConfigurationNoEmbeddedTests {
private final StandardContextLoader contextLoader = ContextLoader.standard()
private final ContextLoader contextLoader = ContextLoader.standard()
.config(ExistingDataSourceConfiguration.class)
.autoConfig(TestDatabaseAutoConfiguration.class);

Loading…
Cancel
Save