Merge branch '2.0.x' into 2.1.x
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-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 static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@DirtiesContext
|
||||
@ContextConfiguration(classes = ConfigFileApplicationContextInitializerTests.Config.class, initializers = ConfigFileApplicationContextInitializer.class)
|
||||
@ContextConfiguration(classes = ConfigFileApplicationContextInitializerTests.Config.class,
|
||||
initializers = ConfigFileApplicationContextInitializer.class)
|
||||
public class ConfigFileApplicationContextInitializerTests {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -33,8 +33,8 @@ import org.springframework.web.reactive.config.EnableWebFlux;
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@DirtiesContext
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = {
|
||||
"spring.main.webApplicationType=reactive", "value=123" })
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
|
||||
properties = { "spring.main.webApplicationType=reactive", "value=123" })
|
||||
public class SpringBootTestReactiveWebEnvironmentRandomPortTests
|
||||
extends AbstractSpringBootTestEmbeddedReactiveWebEnvironmentTests {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -38,8 +38,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@DirtiesContext
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = {
|
||||
"spring.main.web-application-type=reactive", "value=123" })
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
|
||||
properties = { "spring.main.web-application-type=reactive", "value=123" })
|
||||
public class SpringBootTestReactiveWebEnvironmentUserDefinedTestRestTemplateTests
|
||||
extends AbstractSpringBootTestEmbeddedReactiveWebEnvironmentTests {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -44,8 +44,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@DirtiesContext
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT, properties = {
|
||||
"server.port=0", "value=123" })
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT,
|
||||
properties = { "server.port=0", "value=123" })
|
||||
@ContextHierarchy({ @ContextConfiguration(classes = ParentConfiguration.class),
|
||||
@ContextConfiguration(classes = ChildConfiguration.class) })
|
||||
public class SpringBootTestWebEnvironmentContextHierarchyTests {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -33,8 +33,8 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@DirtiesContext
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT, properties = {
|
||||
"server.port=0", "value=123" })
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT,
|
||||
properties = { "server.port=0", "value=123" })
|
||||
public class SpringBootTestWebEnvironmentDefinedPortTests
|
||||
extends AbstractSpringBootTestWebServerWebEnvironmentTests {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -38,8 +38,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@DirtiesContext
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = {
|
||||
"server.port=12345" })
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
|
||||
properties = { "server.port=12345" })
|
||||
public class SpringBootTestWebEnvironmentRandomPortCustomPortTests {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -38,7 +38,8 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
@RunWith(SpringRunner.class)
|
||||
@DirtiesContext
|
||||
@SpringBootTest
|
||||
@ContextConfiguration(classes = SpringBootTestWithContextConfigurationIntegrationTests.Config.class)
|
||||
@ContextConfiguration(
|
||||
classes = SpringBootTestWithContextConfigurationIntegrationTests.Config.class)
|
||||
public class SpringBootTestWithContextConfigurationIntegrationTests {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -41,9 +41,10 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
@DirtiesContext
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.NONE, properties = {
|
||||
"boot-test-inlined=foo", "b=boot-test-inlined", "c=boot-test-inlined" })
|
||||
@TestPropertySource(properties = { "property-source-inlined=bar",
|
||||
"a=property-source-inlined",
|
||||
"c=property-source-inlined" }, locations = "classpath:/test-property-source-annotation.properties")
|
||||
@TestPropertySource(
|
||||
properties = { "property-source-inlined=bar", "a=property-source-inlined",
|
||||
"c=property-source-inlined" },
|
||||
locations = "classpath:/test-property-source-annotation.properties")
|
||||
public class SpringBootTestWithTestPropertySourceTests {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -225,7 +225,10 @@ public class DefinitionsParserTests {
|
||||
|
||||
}
|
||||
|
||||
@MockBean(name = "Name", classes = ExampleService.class, extraInterfaces = ExampleExtraInterface.class, answer = Answers.RETURNS_SMART_NULLS, serializable = true, reset = MockReset.NONE)
|
||||
@MockBean(name = "Name", classes = ExampleService.class,
|
||||
extraInterfaces = ExampleExtraInterface.class,
|
||||
answer = Answers.RETURNS_SMART_NULLS, serializable = true,
|
||||
reset = MockReset.NONE)
|
||||
static class MockBeanAttributes {
|
||||
|
||||
}
|
||||
@@ -244,8 +247,8 @@ public class DefinitionsParserTests {
|
||||
|
||||
}
|
||||
|
||||
@MockBean(name = "name", classes = { ExampleService.class,
|
||||
ExampleServiceCaller.class })
|
||||
@MockBean(name = "name",
|
||||
classes = { ExampleService.class, ExampleServiceCaller.class })
|
||||
static class MockBeanMultipleClassesWithName {
|
||||
|
||||
}
|
||||
@@ -292,8 +295,8 @@ public class DefinitionsParserTests {
|
||||
|
||||
}
|
||||
|
||||
@SpyBean(name = "name", classes = { RealExampleService.class,
|
||||
ExampleServiceCaller.class })
|
||||
@SpyBean(name = "name",
|
||||
classes = { RealExampleService.class, ExampleServiceCaller.class })
|
||||
static class SpyBeanMultipleClassesWithName {
|
||||
|
||||
}
|
||||
|
||||
@@ -36,7 +36,9 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
* @author Madhura Bhave
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = TestRestTemplateContextCustomizerWithFactoryBeanTests.TestClassWithFactoryBean.class, webEnvironment = WebEnvironment.RANDOM_PORT)
|
||||
@SpringBootTest(
|
||||
classes = TestRestTemplateContextCustomizerWithFactoryBeanTests.TestClassWithFactoryBean.class,
|
||||
webEnvironment = WebEnvironment.RANDOM_PORT)
|
||||
@DirtiesContext
|
||||
public class TestRestTemplateContextCustomizerWithFactoryBeanTests {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-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,7 +42,8 @@ import org.springframework.test.web.reactive.server.WebTestClient;
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "spring.main.web-application-type=reactive")
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
|
||||
properties = "spring.main.web-application-type=reactive")
|
||||
@DirtiesContext
|
||||
public class WebTestClientContextCustomizerIntegrationTests {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -46,7 +46,8 @@ import static org.mockito.Mockito.mock;
|
||||
* @author Phillip Webb
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "spring.main.web-application-type=reactive")
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
|
||||
properties = "spring.main.web-application-type=reactive")
|
||||
@DirtiesContext
|
||||
public class WebTestClientContextCustomizerWithOverrideIntegrationTests {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user