diff --git a/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/EndpointDocumentation.java b/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/EndpointDocumentation.java index caa70f01d5..cb120a772f 100644 --- a/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/EndpointDocumentation.java +++ b/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/EndpointDocumentation.java @@ -45,7 +45,7 @@ import org.springframework.http.MediaType; import org.springframework.restdocs.JUnitRestDocumentation; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; @@ -59,7 +59,7 @@ import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.docu import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SpringBootHypermediaApplication.class) @WebAppConfiguration @TestPropertySource(properties = { "spring.jackson.serialization.indent_output=true", diff --git a/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/HealthEndpointDocumentation.java b/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/HealthEndpointDocumentation.java index d8c166632a..229b3fdb4f 100644 --- a/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/HealthEndpointDocumentation.java +++ b/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/HealthEndpointDocumentation.java @@ -27,7 +27,7 @@ import org.springframework.http.MediaType; import org.springframework.restdocs.JUnitRestDocumentation; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -38,7 +38,7 @@ import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.docu import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SpringBootHypermediaApplication.class) @WebAppConfiguration @TestPropertySource(properties = { "spring.jackson.serialization.indent_output=true", diff --git a/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/HypermediaEndpointDocumentation.java b/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/HypermediaEndpointDocumentation.java index f87d78e4a3..c462ca281b 100644 --- a/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/HypermediaEndpointDocumentation.java +++ b/spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/HypermediaEndpointDocumentation.java @@ -27,7 +27,7 @@ import org.springframework.http.MediaType; import org.springframework.restdocs.JUnitRestDocumentation; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -38,7 +38,7 @@ import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.docu import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SpringBootHypermediaApplication.class) @WebAppConfiguration @TestPropertySource(properties = "spring.jackson.serialization.indent_output=true") diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/EndpointMvcIntegrationTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/EndpointMvcIntegrationTests.java index 6055e442d5..63af038b24 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/EndpointMvcIntegrationTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/EndpointMvcIntegrationTests.java @@ -57,7 +57,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; @@ -72,7 +72,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(Application.class) @IntegrationTest("server.port=0") @WebAppConfiguration diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpointTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpointTests.java index 30910ae5d0..e0cb9bdaa0 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpointTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/EnvironmentMvcEndpointTests.java @@ -40,7 +40,7 @@ import org.springframework.context.annotation.Import; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.MapPropertySource; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -57,7 +57,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author Dave Syer * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(TestConfiguration.class) @WebAppConfiguration diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointBrowserPathIntegrationTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointBrowserPathIntegrationTests.java index 369b1a1618..9ff00611b0 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointBrowserPathIntegrationTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointBrowserPathIntegrationTests.java @@ -28,7 +28,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; @@ -46,7 +46,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author Dave Syer * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SpringBootHypermediaApplication.class) @WebAppConfiguration @TestPropertySource(properties = "endpoints.actuator.path=/actuator") diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointDisabledIntegrationTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointDisabledIntegrationTests.java index fabc96d73e..ee70717219 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointDisabledIntegrationTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointDisabledIntegrationTests.java @@ -28,7 +28,7 @@ import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; @@ -47,7 +47,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author Dave Syer * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SpringBootHypermediaApplication.class) @WebAppConfiguration @DirtiesContext diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointEndpointsDisabledIntegrationTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointEndpointsDisabledIntegrationTests.java index 04a7fa56d4..3777848c52 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointEndpointsDisabledIntegrationTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointEndpointsDisabledIntegrationTests.java @@ -28,7 +28,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -44,7 +44,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author Dave Syer * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SpringBootHypermediaApplication.class) @WebAppConfiguration @TestPropertySource(properties = "endpoints.enabled=false") diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointManagementContextPathIntegrationTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointManagementContextPathIntegrationTests.java index 9dcf6d827c..8a8b58a7a9 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointManagementContextPathIntegrationTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointManagementContextPathIntegrationTests.java @@ -28,7 +28,7 @@ import org.springframework.hateoas.ResourceSupport; import org.springframework.http.MediaType; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -49,7 +49,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author Dave Syer * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SpringBootHypermediaApplication.class) @WebAppConfiguration @TestPropertySource(properties = "management.contextPath:/admin") diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointServerContextPathIntegrationTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointServerContextPathIntegrationTests.java index 680617e498..eb85c76f33 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointServerContextPathIntegrationTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointServerContextPathIntegrationTests.java @@ -35,7 +35,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -50,7 +50,7 @@ import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo; * @author Dave Syer * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SpringBootHypermediaApplication.class) @WebAppConfiguration @IntegrationTest({ "server.port=0", "server.contextPath=/spring" }) diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointServerPortIntegrationTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointServerPortIntegrationTests.java index 9fb9c98fb6..bd8b70d867 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointServerPortIntegrationTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointServerPortIntegrationTests.java @@ -35,7 +35,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -50,7 +50,7 @@ import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo; * @author Dave Syer * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SpringBootHypermediaApplication.class) @WebAppConfiguration @IntegrationTest({ "server.port=0", "management.port=0" }) diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointVanillaIntegrationTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointVanillaIntegrationTests.java index 0eb2c0ac6f..ff674fec0c 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointVanillaIntegrationTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HalBrowserMvcEndpointVanillaIntegrationTests.java @@ -32,7 +32,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; @@ -51,7 +51,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author Dave Syer * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SpringBootHypermediaApplication.class) @WebAppConfiguration @DirtiesContext diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/InfoMvcEndpointTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/InfoMvcEndpointTests.java index 01a5a0be53..7510f5f291 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/InfoMvcEndpointTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/InfoMvcEndpointTests.java @@ -39,7 +39,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -56,7 +56,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author Meang Akira Tanaka * @author Stephane Nicoll */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(classes = { TestConfiguration.class }) @WebAppConfiguration @TestPropertySource(properties = { "info.app.name=MyService" }) diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/InfoMvcEndpointWithoutAnyInfoProvidersTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/InfoMvcEndpointWithoutAnyInfoProvidersTests.java index ff80fa94d4..e41bb08f1d 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/InfoMvcEndpointWithoutAnyInfoProvidersTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/InfoMvcEndpointWithoutAnyInfoProvidersTests.java @@ -35,7 +35,7 @@ import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -49,7 +49,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * * @author Meang Akira Tanaka */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(classes = { TestConfiguration.class }) @WebAppConfiguration public class InfoMvcEndpointWithoutAnyInfoProvidersTests { diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaMvcEndpointContextPathTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaMvcEndpointContextPathTests.java index b8ebb095b9..3debee9077 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaMvcEndpointContextPathTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaMvcEndpointContextPathTests.java @@ -36,7 +36,7 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -52,7 +52,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author Christian Dupuis * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(classes = { Config.class }, initializers = ContextPathListener.class) diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaMvcEndpointTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaMvcEndpointTests.java index c70868178e..77d14bc214 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaMvcEndpointTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/JolokiaMvcEndpointTests.java @@ -36,7 +36,7 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -55,7 +55,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author Christian Dupuis * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Config.class) @WebAppConfiguration diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/MetricsMvcEndpointTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/MetricsMvcEndpointTests.java index f40a172c4b..c6470463de 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/MetricsMvcEndpointTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/MetricsMvcEndpointTests.java @@ -39,7 +39,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -57,7 +57,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author Andy Wilkinson * @author Sergei Egorov */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(TestConfiguration.class) @WebAppConfiguration diff --git a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/integration/SpringIntegrationMetricReaderTests.java b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/integration/SpringIntegrationMetricReaderTests.java index cb2fc31006..7119119673 100644 --- a/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/integration/SpringIntegrationMetricReaderTests.java +++ b/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/integration/SpringIntegrationMetricReaderTests.java @@ -30,7 +30,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.integration.monitor.IntegrationMBeanExporter; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(TestConfiguration.class) @IntegrationTest("spring.jmx.enabled=true") @DirtiesContext diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfigurationIntegrationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfigurationIntegrationTests.java index 5134cbe050..f38d0f7080 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfigurationIntegrationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfigurationIntegrationTests.java @@ -28,7 +28,7 @@ import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat; */ @SpringApplicationConfiguration({ Config.class, MessageSourceAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class }) -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @IntegrationTest("spring.messages.basename:test/messages") public class MessageSourceAutoConfigurationIntegrationTests { diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfigurationProfileTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfigurationProfileTests.java index 78473f6aeb..13f1f38680 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfigurationProfileTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/MessageSourceAutoConfigurationProfileTests.java @@ -28,7 +28,7 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ActiveProfiles; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat; */ @SpringApplicationConfiguration({ Config.class, MessageSourceAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class }) -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @ActiveProfiles("switch-messages") public class MessageSourceAutoConfigurationProfileTests { diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/SpringJUnitTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/SpringJUnitTests.java index dbd8c001e0..9c74df2e69 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/SpringJUnitTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/SpringJUnitTests.java @@ -27,14 +27,14 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; /** * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(TestConfiguration.class) public class SpringJUnitTests { diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/h2/H2ConsoleAutoConfigurationIntegrationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/h2/H2ConsoleAutoConfigurationIntegrationTests.java index 168515ad82..d18ffed2bc 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/h2/H2ConsoleAutoConfigurationIntegrationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/h2/H2ConsoleAutoConfigurationIntegrationTests.java @@ -29,7 +29,7 @@ import org.springframework.stereotype.Controller; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -47,7 +47,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @WebAppConfiguration @ContextConfiguration(classes = TestConfiguration.class) diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomFilterContextPathTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomFilterContextPathTests.java index 1b38c2b4be..e48dc3f0d2 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomFilterContextPathTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomFilterContextPathTests.java @@ -44,7 +44,7 @@ import org.springframework.context.annotation.Import; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.web.client.RestTemplate; @@ -55,7 +55,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Application.class) @IntegrationTest({ "server.port=0", "spring.jersey.type=filter", diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomFilterPathTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomFilterPathTests.java index 9d0a02b513..c93fe107ac 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomFilterPathTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomFilterPathTests.java @@ -44,7 +44,7 @@ import org.springframework.context.annotation.Import; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.web.client.RestTemplate; @@ -55,7 +55,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Application.class) @IntegrationTest({ "server.port=0", "spring.jersey.type=filter" }) diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomObjectMapperProviderTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomObjectMapperProviderTests.java index 7061f8407d..c3da9f7ca3 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomObjectMapperProviderTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomObjectMapperProviderTests.java @@ -44,7 +44,7 @@ import org.springframework.context.annotation.Import; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.web.client.RestTemplate; @@ -55,7 +55,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Eddú Meléndez */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Application.class) @IntegrationTest({ "server.port=0", "spring.jackson.serialization-inclusion=non_null" }) diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomServletContextPathTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomServletContextPathTests.java index 271676daa8..5a5148e76c 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomServletContextPathTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomServletContextPathTests.java @@ -44,7 +44,7 @@ import org.springframework.context.annotation.Import; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.web.client.RestTemplate; @@ -55,7 +55,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Application.class) @IntegrationTest({ "server.port=0", "server.contextPath=/app" }) diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomServletPathTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomServletPathTests.java index e5046645fa..5dd6211311 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomServletPathTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationCustomServletPathTests.java @@ -44,7 +44,7 @@ import org.springframework.context.annotation.Import; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.web.client.RestTemplate; @@ -55,7 +55,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Application.class) @IntegrationTest("server.port=0") diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationDefaultFilterPathTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationDefaultFilterPathTests.java index c9fb616a4a..eb72e41398 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationDefaultFilterPathTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationDefaultFilterPathTests.java @@ -43,7 +43,7 @@ import org.springframework.context.annotation.Import; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.web.client.RestTemplate; @@ -54,7 +54,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Application.class) @IntegrationTest({ "server.port=0", "spring.jersey.type=filter" }) diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationDefaultServletPathTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationDefaultServletPathTests.java index 3028b9b0c3..f9de343157 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationDefaultServletPathTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationDefaultServletPathTests.java @@ -43,7 +43,7 @@ import org.springframework.context.annotation.Import; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.web.client.RestTemplate; @@ -54,7 +54,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Application.class) @IntegrationTest("server.port=0") diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationObjectMapperProviderTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationObjectMapperProviderTests.java index df4bfa515d..dd286c4dd4 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationObjectMapperProviderTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationObjectMapperProviderTests.java @@ -44,7 +44,7 @@ import org.springframework.context.annotation.Import; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.web.client.RestTemplate; @@ -55,7 +55,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Eddú Meléndez */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Application.class) @IntegrationTest("server.port=0") diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationServletContainerTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationServletContainerTests.java index f65fedd8f1..ec75bafbfa 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationServletContainerTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationServletContainerTests.java @@ -42,7 +42,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import static org.assertj.core.api.Assertions.assertThat; @@ -53,7 +53,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Application.class) @IntegrationTest("server.port=0") diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationWithoutApplicationPathTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationWithoutApplicationPathTests.java index b39c0ba2a7..e38768ddc7 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationWithoutApplicationPathTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jersey/JerseyAutoConfigurationWithoutApplicationPathTests.java @@ -43,7 +43,7 @@ import org.springframework.context.annotation.Import; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.web.client.RestTemplate; @@ -54,7 +54,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Eddú Meléndez */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Application.class) @IntegrationTest({ "server.port=0", "spring.jersey.application-path=/api" }) diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mustache/MustacheAutoConfigurationIntegrationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mustache/MustacheAutoConfigurationIntegrationTests.java index 005ead910b..0700367131 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mustache/MustacheAutoConfigurationIntegrationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mustache/MustacheAutoConfigurationIntegrationTests.java @@ -43,7 +43,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.stereotype.Controller; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.web.bind.annotation.RequestMapping; @@ -54,7 +54,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Application.class) @IntegrationTest({ "server.port:0", diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mustache/MustacheStandaloneIntegrationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mustache/MustacheStandaloneIntegrationTests.java index 574c09774e..0abac11d89 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mustache/MustacheStandaloneIntegrationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mustache/MustacheStandaloneIntegrationTests.java @@ -30,7 +30,7 @@ import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Application.class) @IntegrationTest({ "spring.main.web_environment=false", "env.foo=There", "foo=World" }) diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mustache/web/MustacheWebIntegrationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mustache/web/MustacheWebIntegrationTests.java index 621d8127a8..8116909558 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mustache/web/MustacheWebIntegrationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mustache/web/MustacheWebIntegrationTests.java @@ -49,7 +49,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.stereotype.Controller; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.web.bind.annotation.RequestMapping; @@ -61,7 +61,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Application.class) @IntegrationTest("server.port:0") diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/jpa/JpaUserDetailsTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/jpa/JpaUserDetailsTests.java index d5b74b4ac8..d03a9600be 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/jpa/JpaUserDetailsTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/jpa/JpaUserDetailsTests.java @@ -30,7 +30,7 @@ import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Import; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; /** * The EntityScanRegistrar can cause problems with Spring security and its eager @@ -40,7 +40,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(JpaUserDetailsTests.Main.class) @DirtiesContext public class JpaUserDetailsTests { diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/UserInfoTokenServicesRefreshTokenTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/UserInfoTokenServicesRefreshTokenTests.java index 3a1cf5605e..ebac802d5f 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/UserInfoTokenServicesRefreshTokenTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/UserInfoTokenServicesRefreshTokenTests.java @@ -46,7 +46,7 @@ import org.springframework.security.oauth2.common.DefaultExpiringOAuth2RefreshTo import org.springframework.security.oauth2.common.DefaultOAuth2AccessToken; import org.springframework.security.oauth2.common.exceptions.InvalidTokenException; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestMapping; @@ -61,7 +61,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer */ @SpringApplicationConfiguration(classes = Application.class) -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @WebIntegrationTest({ "server.port=0", "security.oauth2.resource.userInfoUri:http://example.com", "security.oauth2.client.clientId=foo" }) diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/sso/BasicOAuth2SsoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/sso/BasicOAuth2SsoConfigurationTests.java index 5b402b673d..835cee654b 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/sso/BasicOAuth2SsoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/sso/BasicOAuth2SsoConfigurationTests.java @@ -32,7 +32,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -47,7 +47,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(TestConfiguration.class) @WebAppConfiguration diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/sso/CustomOAuth2SsoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/sso/CustomOAuth2SsoConfigurationTests.java index 54c0d40077..0dee07d379 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/sso/CustomOAuth2SsoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/sso/CustomOAuth2SsoConfigurationTests.java @@ -34,7 +34,7 @@ import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -53,7 +53,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(TestConfiguration.class) @WebAppConfiguration diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/sso/CustomOAuth2SsoWithAuthenticationEntryPointConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/sso/CustomOAuth2SsoWithAuthenticationEntryPointConfigurationTests.java index 9d5631e9a1..570d2c4622 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/sso/CustomOAuth2SsoWithAuthenticationEntryPointConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/sso/CustomOAuth2SsoWithAuthenticationEntryPointConfigurationTests.java @@ -36,7 +36,7 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur import org.springframework.security.web.authentication.HttpStatusEntryPoint; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -55,7 +55,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(TestConfiguration.class) @WebAppConfiguration diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerDirectMockMvcTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerDirectMockMvcTests.java index f1164bf598..c1f8180840 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerDirectMockMvcTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerDirectMockMvcTests.java @@ -41,7 +41,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.context.annotation.Import; import org.springframework.http.MediaType; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -54,7 +54,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. /** * Tests for {@link BasicErrorController} using {@link MockMvc} but not - * {@link SpringJUnit4ClassRunner}. + * {@link SpringRunner}. * * @author Dave Syer * @author Sebastien Deleuze diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerIntegrationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerIntegrationTests.java index d41ee6793e..fce906ec32 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerIntegrationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerIntegrationTests.java @@ -45,7 +45,7 @@ import org.springframework.http.MediaType; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.validation.BindException; import org.springframework.web.bind.MethodArgumentNotValidException; @@ -66,7 +66,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer * @author Stephane Nicoll */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(TestConfiguration.class) @WebAppConfiguration @DirtiesContext diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerMockMvcTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerMockMvcTests.java index dcb3e81745..a7610e2f88 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerMockMvcTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/BasicErrorControllerMockMvcTests.java @@ -44,7 +44,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; @@ -64,12 +64,12 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. /** * Tests for {@link BasicErrorController} using {@link MockMvc} and - * {@link SpringJUnit4ClassRunner}. + * {@link SpringRunner}. * * @author Dave Syer */ @SpringApplicationConfiguration(TestConfiguration.class) -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @WebAppConfiguration @DirtiesContext public class BasicErrorControllerMockMvcTests { diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/DefaultErrorViewIntegrationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/DefaultErrorViewIntegrationTests.java index 36b68e1d00..27d001c9c7 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/DefaultErrorViewIntegrationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/DefaultErrorViewIntegrationTests.java @@ -35,7 +35,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.http.MediaType; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; @@ -50,7 +50,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author Dave Syer */ @SpringApplicationConfiguration(TestConfiguration.class) -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @WebAppConfiguration @DirtiesContext public class DefaultErrorViewIntegrationTests { diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/RemappedErrorViewIntegrationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/RemappedErrorViewIntegrationTests.java index 949dd93162..5799c0ee80 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/RemappedErrorViewIntegrationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/RemappedErrorViewIntegrationTests.java @@ -33,7 +33,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.stereotype.Controller; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.client.RestTemplate; @@ -44,7 +44,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer */ @SpringApplicationConfiguration(TestConfiguration.class) -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @WebAppConfiguration @IntegrationTest({ "server.servletPath:/spring/*", "server.port:0" }) @DirtiesContext diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/WelcomePageMockMvcTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/WelcomePageMockMvcTests.java index 9e31c051e5..ef62e325ff 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/WelcomePageMockMvcTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/WelcomePageMockMvcTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2015 the original author or authors. + * Copyright 2012-2016 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,7 @@ import org.springframework.boot.context.embedded.MockEmbeddedServletContainerFac import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.ConfigurableWebApplicationContext; @@ -41,7 +41,7 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; /** - * Tests for welcome page using {@link MockMvc} and {@link SpringJUnit4ClassRunner}. + * Tests for welcome page using {@link MockMvc} and {@link SpringRunner}. * * @author Dave Syer */ diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringTestCompilerAutoConfiguration.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringTestCompilerAutoConfiguration.java index dc2ea2d64f..46cfbac18d 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringTestCompilerAutoConfiguration.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringTestCompilerAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2014 the original author or authors. + * Copyright 2012-2016 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. @@ -58,7 +58,7 @@ public class SpringTestCompilerAutoConfiguration extends CompilerAutoConfigurati if (!AstUtils.hasAtLeastOneAnnotation(classNode, "RunWith")) { AnnotationNode runWith = new AnnotationNode(ClassHelper.make("RunWith")); runWith.addMember("value", - new ClassExpression(ClassHelper.make("SpringJUnit4ClassRunner"))); + new ClassExpression(ClassHelper.make("SpringRunner"))); classNode.addAnnotation(runWith); } } diff --git a/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/integrationtest/HttpTunnelIntegrationTests.java b/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/integrationtest/HttpTunnelIntegrationTests.java index f39c932c37..901967499c 100644 --- a/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/integrationtest/HttpTunnelIntegrationTests.java +++ b/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/integrationtest/HttpTunnelIntegrationTests.java @@ -47,7 +47,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.http.client.SimpleClientHttpRequestFactory; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.SocketUtils; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -61,7 +61,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(HttpTunnelIntegrationTests.Config.class) @WebIntegrationTest public class HttpTunnelIntegrationTests { diff --git a/spring-boot-integration-tests/spring-boot-security-tests/spring-boot-security-test-web-helloworld/src/test/java/sample/HelloWebSecurityApplicationTests.java b/spring-boot-integration-tests/spring-boot-security-tests/spring-boot-security-test-web-helloworld/src/test/java/sample/HelloWebSecurityApplicationTests.java index 54f8c562f2..3976a3033c 100644 --- a/spring-boot-integration-tests/spring-boot-security-tests/spring-boot-security-test-web-helloworld/src/test/java/sample/HelloWebSecurityApplicationTests.java +++ b/spring-boot-integration-tests/spring-boot-security-tests/spring-boot-security-test-web-helloworld/src/test/java/sample/HelloWebSecurityApplicationTests.java @@ -30,11 +30,11 @@ import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.security.crypto.codec.Base64; import org.springframework.security.web.FilterChainProxy; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(HelloWebSecurityApplication.class) @WebIntegrationTest(randomPort = true) public class HelloWebSecurityApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-activemq/src/test/java/sample/activemq/SampleActiveMqTests.java b/spring-boot-samples/spring-boot-sample-activemq/src/test/java/sample/activemq/SampleActiveMqTests.java index d2cf5d5f66..50e811094f 100644 --- a/spring-boot-samples/spring-boot-sample-activemq/src/test/java/sample/activemq/SampleActiveMqTests.java +++ b/spring-boot-samples/spring-boot-sample-activemq/src/test/java/sample/activemq/SampleActiveMqTests.java @@ -25,7 +25,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.boot.test.rule.OutputCapture; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Eddú Meléndez */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleActiveMQApplication.class) public class SampleActiveMqTests { diff --git a/spring-boot-samples/spring-boot-sample-actuator-log4j2/src/test/java/sample/actuator/log4j2/SampleActuatorLog4J2ApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator-log4j2/src/test/java/sample/actuator/log4j2/SampleActuatorLog4J2ApplicationTests.java index cca2ec6a8d..fef9e135c9 100644 --- a/spring-boot-samples/spring-boot-sample-actuator-log4j2/src/test/java/sample/actuator/log4j2/SampleActuatorLog4J2ApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator-log4j2/src/test/java/sample/actuator/log4j2/SampleActuatorLog4J2ApplicationTests.java @@ -28,7 +28,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleActuatorLog4J2Application.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-actuator-noweb/src/test/java/sample/actuator/noweb/SampleActuatorNoWebApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator-noweb/src/test/java/sample/actuator/noweb/SampleActuatorNoWebApplicationTests.java index 67612de89f..e2e87c6581 100644 --- a/spring-boot-samples/spring-boot-sample-actuator-noweb/src/test/java/sample/actuator/noweb/SampleActuatorNoWebApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator-noweb/src/test/java/sample/actuator/noweb/SampleActuatorNoWebApplicationTests.java @@ -23,7 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.actuate.endpoint.MetricsEndpoint; import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleActuatorNoWebApplication.class) @DirtiesContext public class SampleActuatorNoWebApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationPortTests.java b/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationPortTests.java index 6ecec96945..5632218886 100644 --- a/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationPortTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationPortTests.java @@ -29,7 +29,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleActuatorUiApplication.class) @WebIntegrationTest(value = { "management.port:0" }, randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationTests.java index 08bd26673b..2249686264 100644 --- a/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationTests.java @@ -33,7 +33,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleActuatorUiApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/EndpointsPropertiesSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/EndpointsPropertiesSampleActuatorApplicationTests.java index 9098fd2fa8..1bf7ac7b5b 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/EndpointsPropertiesSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/EndpointsPropertiesSampleActuatorApplicationTests.java @@ -31,7 +31,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ActiveProfiles; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleActuatorApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/InsecureManagementPortAndPathSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/InsecureManagementPortAndPathSampleActuatorApplicationTests.java index ee1a32f2ee..c6988a9d7d 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/InsecureManagementPortAndPathSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/InsecureManagementPortAndPathSampleActuatorApplicationTests.java @@ -31,7 +31,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleActuatorApplication.class) @WebIntegrationTest(value = { "management.port=0", "management.context-path=/admin", "management.security.enabled=false" }, randomPort = true) diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/InsecureManagementSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/InsecureManagementSampleActuatorApplicationTests.java index a937b3f097..5d613c99fb 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/InsecureManagementSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/InsecureManagementSampleActuatorApplicationTests.java @@ -29,7 +29,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ActiveProfiles; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleActuatorApplication.class) @WebIntegrationTest(value = { "management.security.enabled:false" }, randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/InsecureSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/InsecureSampleActuatorApplicationTests.java index 2d3b84fecf..8390c3036d 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/InsecureSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/InsecureSampleActuatorApplicationTests.java @@ -28,7 +28,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleActuatorApplication.class) @WebIntegrationTest(value = { "security.basic.enabled:false" }, randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementAddressActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementAddressActuatorApplicationTests.java index 99a63d4d48..39c0eaa2b1 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementAddressActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementAddressActuatorApplicationTests.java @@ -29,7 +29,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleActuatorApplication.class) @WebIntegrationTest(value = { "management.port=0", "management.address=127.0.0.1", "management.context-path:/admin" }, randomPort = true) diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPathSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPathSampleActuatorApplicationTests.java index a1cfca5571..daa47982d7 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPathSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPathSampleActuatorApplicationTests.java @@ -28,7 +28,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleActuatorApplication.class) @WebIntegrationTest(value = { "management.context_path=/admin" }, randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortAndPathSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortAndPathSampleActuatorApplicationTests.java index 024772d46d..604b901528 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortAndPathSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortAndPathSampleActuatorApplicationTests.java @@ -31,7 +31,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleActuatorApplication.class) @WebIntegrationTest(value = { "management.port=0", "management.context-path=/admin" }, randomPort = true) diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortSampleActuatorApplicationTests.java index 57c35cf161..05b1a0a8cf 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortSampleActuatorApplicationTests.java @@ -31,7 +31,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleActuatorApplication.class) @WebIntegrationTest(value = { "management.port=0" }, randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/NoManagementSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/NoManagementSampleActuatorApplicationTests.java index 50a68e358a..68e1f3abb3 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/NoManagementSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/NoManagementSampleActuatorApplicationTests.java @@ -30,7 +30,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleActuatorApplication.class) @WebIntegrationTest(value = { "management.port=-1" }, randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/NonSensitiveHealthTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/NonSensitiveHealthTests.java index 3805348902..1c2eab9ec5 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/NonSensitiveHealthTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/NonSensitiveHealthTests.java @@ -26,7 +26,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleActuatorApplication.class) @WebIntegrationTest(value = { "endpoints.health.sensitive=false" }, randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/SampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/SampleActuatorApplicationTests.java index 4508eefcc0..4bcdcc447f 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/SampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/SampleActuatorApplicationTests.java @@ -37,7 +37,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -47,7 +47,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer * @author Stephane Nicoll */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleActuatorApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathInsecureSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathInsecureSampleActuatorApplicationTests.java index 1eafae0936..d0fa42325e 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathInsecureSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathInsecureSampleActuatorApplicationTests.java @@ -28,7 +28,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleActuatorApplication.class) @WebIntegrationTest(value = { "security.basic.enabled:false", "server.servletPath:/spring" }, randomPort = true) diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathSampleActuatorApplicationTests.java index ffb3621836..ace2c5d0d8 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ServletPathSampleActuatorApplicationTests.java @@ -28,7 +28,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleActuatorApplication.class) @WebIntegrationTest(value = { "server.servletPath=/spring" }, randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ShutdownSampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ShutdownSampleActuatorApplicationTests.java index e145bbfd5a..c863f625da 100644 --- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ShutdownSampleActuatorApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ShutdownSampleActuatorApplicationTests.java @@ -30,7 +30,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleActuatorApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/src/test/java/sample/atmosphere/SampleAtmosphereApplicationTests.java b/spring-boot-samples/spring-boot-sample-atmosphere/src/test/java/sample/atmosphere/SampleAtmosphereApplicationTests.java index eba176e469..7c50675916 100644 --- a/spring-boot-samples/spring-boot-sample-atmosphere/src/test/java/sample/atmosphere/SampleAtmosphereApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-atmosphere/src/test/java/sample/atmosphere/SampleAtmosphereApplicationTests.java @@ -36,7 +36,7 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.web.socket.TextMessage; import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.client.WebSocketConnectionManager; @@ -45,7 +45,7 @@ import org.springframework.web.socket.handler.TextWebSocketHandler; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleAtmosphereApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-cache/src/test/java/sample/cache/SampleCacheApplicationTests.java b/spring-boot-samples/spring-boot-sample-cache/src/test/java/sample/cache/SampleCacheApplicationTests.java index 2a6d987921..2d16ff6c41 100644 --- a/spring-boot-samples/spring-boot-sample-cache/src/test/java/sample/cache/SampleCacheApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-cache/src/test/java/sample/cache/SampleCacheApplicationTests.java @@ -23,11 +23,11 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.cache.Cache; import org.springframework.cache.CacheManager; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleCacheApplication.class) public class SampleCacheApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-data-cassandra/src/test/java/sample/data/cassandra/SampleCassandraApplicationTests.java b/spring-boot-samples/spring-boot-sample-data-cassandra/src/test/java/sample/data/cassandra/SampleCassandraApplicationTests.java index 89ddd8e704..e205fc41de 100644 --- a/spring-boot-samples/spring-boot-sample-data-cassandra/src/test/java/sample/data/cassandra/SampleCassandraApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-data-cassandra/src/test/java/sample/data/cassandra/SampleCassandraApplicationTests.java @@ -27,14 +27,14 @@ import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.boot.test.rule.OutputCapture; import org.springframework.test.context.TestExecutionListeners; import org.springframework.test.context.TestExecutionListeners.MergeMode; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; /** * Tests for {@link SampleCassandraApplication}. */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @TestExecutionListeners(mergeMode = MergeMode.MERGE_WITH_DEFAULTS, listeners = { OrderedCassandraTestExecutionListener.class }) @SpringApplicationConfiguration(SampleCassandraApplication.class) diff --git a/spring-boot-samples/spring-boot-sample-data-gemfire/src/test/java/sample/data/gemfire/SampleDataGemFireApplicationTests.java b/spring-boot-samples/spring-boot-sample-data-gemfire/src/test/java/sample/data/gemfire/SampleDataGemFireApplicationTests.java index 9af954d920..41adac09e5 100644 --- a/spring-boot-samples/spring-boot-sample-data-gemfire/src/test/java/sample/data/gemfire/SampleDataGemFireApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-data-gemfire/src/test/java/sample/data/gemfire/SampleDataGemFireApplicationTests.java @@ -27,7 +27,7 @@ import sample.data.gemfire.service.GemstoneServiceImpl.IllegalGemstoneException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringApplicationConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author John Blum */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleDataGemFireApplication.class) public class SampleDataGemFireApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/SampleDataJpaApplicationTests.java b/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/SampleDataJpaApplicationTests.java index 963cc79451..a1b97227cf 100644 --- a/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/SampleDataJpaApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/SampleDataJpaApplicationTests.java @@ -28,7 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -45,7 +45,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author Oliver Gierke * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleDataJpaApplication.class) @WebAppConfiguration // Enable JMX so we can test the MBeans (you can't do this in a properties file) diff --git a/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/service/CityRepositoryIntegrationTests.java b/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/service/CityRepositoryIntegrationTests.java index b96bb906ff..3599b8a1f4 100644 --- a/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/service/CityRepositoryIntegrationTests.java +++ b/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/service/CityRepositoryIntegrationTests.java @@ -24,7 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Oliver Gierke */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleDataJpaApplication.class) public class CityRepositoryIntegrationTests { diff --git a/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/service/HotelRepositoryIntegrationTests.java b/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/service/HotelRepositoryIntegrationTests.java index 022bc3dff7..7d79515057 100644 --- a/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/service/HotelRepositoryIntegrationTests.java +++ b/spring-boot-samples/spring-boot-sample-data-jpa/src/test/java/sample/data/jpa/service/HotelRepositoryIntegrationTests.java @@ -31,7 +31,7 @@ import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Sort.Direction; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Oliver Gierke */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleDataJpaApplication.class) public class HotelRepositoryIntegrationTests { diff --git a/spring-boot-samples/spring-boot-sample-data-mongodb/src/test/java/sample/data/mongo/SampleMongoApplicationTests.java b/spring-boot-samples/spring-boot-sample-data-mongodb/src/test/java/sample/data/mongo/SampleMongoApplicationTests.java index 240bb25eb7..ac0b8b8be9 100644 --- a/spring-boot-samples/spring-boot-sample-data-mongodb/src/test/java/sample/data/mongo/SampleMongoApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-data-mongodb/src/test/java/sample/data/mongo/SampleMongoApplicationTests.java @@ -23,7 +23,7 @@ import org.junit.runner.RunWith; import org.springframework.boot.test.context.IntegrationTest; import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.boot.test.rule.OutputCapture; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleMongoApplication.class) @IntegrationTest public class SampleMongoApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-data-rest/src/test/java/sample/data/rest/SampleDataRestApplicationTests.java b/spring-boot-samples/spring-boot-sample-data-rest/src/test/java/sample/data/rest/SampleDataRestApplicationTests.java index 3e949a43b9..57e641c72e 100644 --- a/spring-boot-samples/spring-boot-sample-data-rest/src/test/java/sample/data/rest/SampleDataRestApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-data-rest/src/test/java/sample/data/rest/SampleDataRestApplicationTests.java @@ -23,7 +23,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.test.context.ActiveProfiles; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -43,7 +43,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author Oliver Gierke * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleDataRestApplication.class) @WebAppConfiguration @ActiveProfiles("scratch") diff --git a/spring-boot-samples/spring-boot-sample-data-rest/src/test/java/sample/data/rest/service/CityRepositoryIntegrationTests.java b/spring-boot-samples/spring-boot-sample-data-rest/src/test/java/sample/data/rest/service/CityRepositoryIntegrationTests.java index 5cf0f2af6c..1a9c73f8b2 100644 --- a/spring-boot-samples/spring-boot-sample-data-rest/src/test/java/sample/data/rest/service/CityRepositoryIntegrationTests.java +++ b/spring-boot-samples/spring-boot-sample-data-rest/src/test/java/sample/data/rest/service/CityRepositoryIntegrationTests.java @@ -25,7 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Oliver Gierke * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleDataRestApplication.class) public class CityRepositoryIntegrationTests { diff --git a/spring-boot-samples/spring-boot-sample-flyway/src/test/java/sample/flyway/SampleFlywayApplicationTests.java b/spring-boot-samples/spring-boot-sample-flyway/src/test/java/sample/flyway/SampleFlywayApplicationTests.java index 337737ad44..fdd318c563 100644 --- a/spring-boot-samples/spring-boot-sample-flyway/src/test/java/sample/flyway/SampleFlywayApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-flyway/src/test/java/sample/flyway/SampleFlywayApplicationTests.java @@ -22,11 +22,11 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleFlywayApplication.class) public class SampleFlywayApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-hateoas/src/test/java/sample/hateoas/SampleHateoasApplicationTests.java b/spring-boot-samples/spring-boot-sample-hateoas/src/test/java/sample/hateoas/SampleHateoasApplicationTests.java index 3abc1114fc..179ad083c2 100644 --- a/spring-boot-samples/spring-boot-sample-hateoas/src/test/java/sample/hateoas/SampleHateoasApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-hateoas/src/test/java/sample/hateoas/SampleHateoasApplicationTests.java @@ -31,11 +31,11 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleHateoasApplication.class) @WebIntegrationTest(randomPort = true) public class SampleHateoasApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-hypermedia-gson/src/test/java/sample/hypermedia/gson/SampleHypermediaGsonApplicationTests.java b/spring-boot-samples/spring-boot-sample-hypermedia-gson/src/test/java/sample/hypermedia/gson/SampleHypermediaGsonApplicationTests.java index 3573aca8b5..2726e9a60c 100644 --- a/spring-boot-samples/spring-boot-sample-hypermedia-gson/src/test/java/sample/hypermedia/gson/SampleHypermediaGsonApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-hypermedia-gson/src/test/java/sample/hypermedia/gson/SampleHypermediaGsonApplicationTests.java @@ -24,7 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.http.MediaType; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -34,7 +34,7 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleHypermediaGsonApplication.class) @WebAppConfiguration @TestPropertySource(properties = "endpoints.hypermedia.enabled: true") diff --git a/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationIntegrationTests.java b/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationIntegrationTests.java index a82bc04d7a..afa14fa004 100644 --- a/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationIntegrationTests.java +++ b/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationIntegrationTests.java @@ -24,7 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.http.MediaType; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; @@ -36,7 +36,7 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleHypermediaJpaApplication.class) @WebAppConfiguration @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationTests.java b/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationTests.java index 4877384224..2781721bb5 100644 --- a/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationTests.java @@ -20,10 +20,10 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringApplicationConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleHypermediaJpaApplication.class) @WebAppConfiguration public class SampleHypermediaJpaApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-hypermedia-ui/src/test/java/sample/hypermedia/ui/SampleHypermediaUiApplicationTests.java b/spring-boot-samples/spring-boot-sample-hypermedia-ui/src/test/java/sample/hypermedia/ui/SampleHypermediaUiApplicationTests.java index 41cd92a49d..d65ff01f5e 100644 --- a/spring-boot-samples/spring-boot-sample-hypermedia-ui/src/test/java/sample/hypermedia/ui/SampleHypermediaUiApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-hypermedia-ui/src/test/java/sample/hypermedia/ui/SampleHypermediaUiApplicationTests.java @@ -31,11 +31,11 @@ import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleHypermediaUiApplication.class) @WebIntegrationTest(value = { "management.context-path=" }, randomPort = true) public class SampleHypermediaUiApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-hypermedia/src/test/java/sample/hypermedia/SampleHypermediaApplicationHomePageTests.java b/spring-boot-samples/spring-boot-sample-hypermedia/src/test/java/sample/hypermedia/SampleHypermediaApplicationHomePageTests.java index c0c4f499d3..971aeb9d1a 100644 --- a/spring-boot-samples/spring-boot-sample-hypermedia/src/test/java/sample/hypermedia/SampleHypermediaApplicationHomePageTests.java +++ b/spring-boot-samples/spring-boot-sample-hypermedia/src/test/java/sample/hypermedia/SampleHypermediaApplicationHomePageTests.java @@ -31,11 +31,11 @@ import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleHypermediaApplication.class) @WebIntegrationTest(randomPort = true) public class SampleHypermediaApplicationHomePageTests { diff --git a/spring-boot-samples/spring-boot-sample-jersey/src/test/java/sample/jersey/SampleJerseyApplicationTests.java b/spring-boot-samples/spring-boot-sample-jersey/src/test/java/sample/jersey/SampleJerseyApplicationTests.java index bed388c41e..87f7394699 100644 --- a/spring-boot-samples/spring-boot-sample-jersey/src/test/java/sample/jersey/SampleJerseyApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-jersey/src/test/java/sample/jersey/SampleJerseyApplicationTests.java @@ -25,12 +25,12 @@ import org.springframework.boot.test.context.web.WebIntegrationTest; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.web.client.RestTemplate; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleJerseyApplication.class) @WebIntegrationTest(randomPort = true) public class SampleJerseyApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-jersey1/src/test/java/sample/jersey1/SampleJersey1ApplicationTests.java b/spring-boot-samples/spring-boot-sample-jersey1/src/test/java/sample/jersey1/SampleJersey1ApplicationTests.java index 07cb6634e6..35e88497e4 100644 --- a/spring-boot-samples/spring-boot-sample-jersey1/src/test/java/sample/jersey1/SampleJersey1ApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-jersey1/src/test/java/sample/jersey1/SampleJersey1ApplicationTests.java @@ -23,11 +23,11 @@ import org.springframework.boot.context.web.LocalServerPort; import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.boot.test.context.web.WebIntegrationTest; import org.springframework.boot.test.web.client.TestRestTemplate; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleJersey1Application.class) @WebIntegrationTest(randomPort = true) public class SampleJersey1ApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-jetty-ssl/src/test/java/sample/jetty/ssl/SampleJettySslApplicationTests.java b/spring-boot-samples/spring-boot-sample-jetty-ssl/src/test/java/sample/jetty/ssl/SampleJettySslApplicationTests.java index cc1b069d81..c7b82211a3 100644 --- a/spring-boot-samples/spring-boot-sample-jetty-ssl/src/test/java/sample/jetty/ssl/SampleJettySslApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-jetty-ssl/src/test/java/sample/jetty/ssl/SampleJettySslApplicationTests.java @@ -32,7 +32,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -41,7 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleJettySslApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-jetty/src/test/java/sample/jetty/SampleJettyApplicationTests.java b/spring-boot-samples/spring-boot-sample-jetty/src/test/java/sample/jetty/SampleJettyApplicationTests.java index de1537b226..cec8724170 100644 --- a/spring-boot-samples/spring-boot-sample-jetty/src/test/java/sample/jetty/SampleJettyApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-jetty/src/test/java/sample/jetty/SampleJettyApplicationTests.java @@ -33,7 +33,7 @@ import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.StreamUtils; import org.springframework.web.client.RestTemplate; @@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleJettyApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-jetty8-ssl/src/test/java/sample/jetty8/ssl/SampleJetty8SslApplicationTests.java b/spring-boot-samples/spring-boot-sample-jetty8-ssl/src/test/java/sample/jetty8/ssl/SampleJetty8SslApplicationTests.java index feb9ba6a98..3282e6924a 100644 --- a/spring-boot-samples/spring-boot-sample-jetty8-ssl/src/test/java/sample/jetty8/ssl/SampleJetty8SslApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-jetty8-ssl/src/test/java/sample/jetty8/ssl/SampleJetty8SslApplicationTests.java @@ -32,7 +32,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -41,7 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleJetty8SslApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-jetty8/src/test/java/sample/jetty8/SampleJetty8ApplicationTests.java b/spring-boot-samples/spring-boot-sample-jetty8/src/test/java/sample/jetty8/SampleJetty8ApplicationTests.java index 7ebcde8799..a7952044b8 100644 --- a/spring-boot-samples/spring-boot-sample-jetty8/src/test/java/sample/jetty8/SampleJetty8ApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-jetty8/src/test/java/sample/jetty8/SampleJetty8ApplicationTests.java @@ -33,7 +33,7 @@ import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.StreamUtils; import org.springframework.web.client.RestTemplate; @@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleJetty8Application.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-jetty93/src/test/java/sample/jetty93/SampleJetty93ApplicationTests.java b/spring-boot-samples/spring-boot-sample-jetty93/src/test/java/sample/jetty93/SampleJetty93ApplicationTests.java index 8694350ba1..115aacb268 100644 --- a/spring-boot-samples/spring-boot-sample-jetty93/src/test/java/sample/jetty93/SampleJetty93ApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-jetty93/src/test/java/sample/jetty93/SampleJetty93ApplicationTests.java @@ -33,7 +33,7 @@ import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.StreamUtils; import org.springframework.web.client.RestTemplate; @@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleJetty93Application.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-jpa/src/test/java/sample/jpa/SampleJpaApplicationTests.java b/spring-boot-samples/spring-boot-sample-jpa/src/test/java/sample/jpa/SampleJpaApplicationTests.java index 203481c9c2..b844f04864 100644 --- a/spring-boot-samples/spring-boot-sample-jpa/src/test/java/sample/jpa/SampleJpaApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-jpa/src/test/java/sample/jpa/SampleJpaApplicationTests.java @@ -22,7 +22,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringApplicationConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -38,7 +38,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author Oliver Gierke * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleJpaApplication.class) @WebAppConfiguration public class SampleJpaApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-jpa/src/test/java/sample/jpa/repository/JpaNoteRepositoryIntegrationTests.java b/spring-boot-samples/spring-boot-sample-jpa/src/test/java/sample/jpa/repository/JpaNoteRepositoryIntegrationTests.java index a435bf0222..25808468fa 100644 --- a/spring-boot-samples/spring-boot-sample-jpa/src/test/java/sample/jpa/repository/JpaNoteRepositoryIntegrationTests.java +++ b/spring-boot-samples/spring-boot-sample-jpa/src/test/java/sample/jpa/repository/JpaNoteRepositoryIntegrationTests.java @@ -24,7 +24,7 @@ import sample.jpa.domain.Note; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringApplicationConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleJpaApplication.class) public class JpaNoteRepositoryIntegrationTests { diff --git a/spring-boot-samples/spring-boot-sample-jpa/src/test/java/sample/jpa/repository/JpaTagRepositoryIntegrationTests.java b/spring-boot-samples/spring-boot-sample-jpa/src/test/java/sample/jpa/repository/JpaTagRepositoryIntegrationTests.java index f99f2f1778..9f77dbb2f5 100644 --- a/spring-boot-samples/spring-boot-sample-jpa/src/test/java/sample/jpa/repository/JpaTagRepositoryIntegrationTests.java +++ b/spring-boot-samples/spring-boot-sample-jpa/src/test/java/sample/jpa/repository/JpaTagRepositoryIntegrationTests.java @@ -24,7 +24,7 @@ import sample.jpa.domain.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringApplicationConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleJpaApplication.class) public class JpaTagRepositoryIntegrationTests { diff --git a/spring-boot-samples/spring-boot-sample-metrics-dropwizard/src/test/java/sample/metrics/dropwizard/SampleDropwizardMetricsApplicationTests.java b/spring-boot-samples/spring-boot-sample-metrics-dropwizard/src/test/java/sample/metrics/dropwizard/SampleDropwizardMetricsApplicationTests.java index 9a931f51f0..5bbcd821cc 100644 --- a/spring-boot-samples/spring-boot-sample-metrics-dropwizard/src/test/java/sample/metrics/dropwizard/SampleDropwizardMetricsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-metrics-dropwizard/src/test/java/sample/metrics/dropwizard/SampleDropwizardMetricsApplicationTests.java @@ -25,7 +25,7 @@ import org.springframework.boot.actuate.metrics.GaugeService; import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.boot.test.context.web.WebIntegrationTest; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleDropwizardMetricsApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-metrics-opentsdb/src/test/java/sample/metrics/opentsdb/SampleOpenTsdbExportApplicationTests.java b/spring-boot-samples/spring-boot-sample-metrics-opentsdb/src/test/java/sample/metrics/opentsdb/SampleOpenTsdbExportApplicationTests.java index 5ef775d07e..69d3643ca0 100644 --- a/spring-boot-samples/spring-boot-sample-metrics-opentsdb/src/test/java/sample/metrics/opentsdb/SampleOpenTsdbExportApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-metrics-opentsdb/src/test/java/sample/metrics/opentsdb/SampleOpenTsdbExportApplicationTests.java @@ -22,14 +22,14 @@ import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.boot.test.context.web.WebIntegrationTest; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; /** * Basic integration tests for {@link SampleOpenTsdbExportApplication}. * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleOpenTsdbExportApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-metrics-redis/src/test/java/sample/metrics/redis/SampleRedisExportApplicationTests.java b/spring-boot-samples/spring-boot-sample-metrics-redis/src/test/java/sample/metrics/redis/SampleRedisExportApplicationTests.java index 779a9390e7..b90298fedd 100644 --- a/spring-boot-samples/spring-boot-sample-metrics-redis/src/test/java/sample/metrics/redis/SampleRedisExportApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-metrics-redis/src/test/java/sample/metrics/redis/SampleRedisExportApplicationTests.java @@ -22,14 +22,14 @@ import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.boot.test.context.web.WebIntegrationTest; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; /** * Basic integration tests for {@link SampleRedisExportApplication}. * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleRedisExportApplication.class) @WebIntegrationTest(value = { "spring.jmx.enabled=true" }, randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-secure-oauth2-resource/src/test/java/sample/secure/oauth2/resource/SampleSecureOAuth2ResourceApplicationTests.java b/spring-boot-samples/spring-boot-sample-secure-oauth2-resource/src/test/java/sample/secure/oauth2/resource/SampleSecureOAuth2ResourceApplicationTests.java index ba05483167..d14a892b3f 100644 --- a/spring-boot-samples/spring-boot-sample-secure-oauth2-resource/src/test/java/sample/secure/oauth2/resource/SampleSecureOAuth2ResourceApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-secure-oauth2-resource/src/test/java/sample/secure/oauth2/resource/SampleSecureOAuth2ResourceApplicationTests.java @@ -26,7 +26,7 @@ import org.springframework.boot.test.context.web.WebIntegrationTest; import org.springframework.hateoas.MediaTypes; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.web.FilterChainProxy; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import org.springframework.web.context.WebApplicationContext; @@ -41,7 +41,7 @@ import static org.springframework.test.web.servlet.setup.MockMvcBuilders.webAppC * * @author Greg Turnquist */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleSecureOAuth2ResourceApplication.class) @WebIntegrationTest(randomPort = true) public class SampleSecureOAuth2ResourceApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-secure-oauth2/src/test/java/sample/secure/oauth2/SampleSecureOAuth2ApplicationTests.java b/spring-boot-samples/spring-boot-sample-secure-oauth2/src/test/java/sample/secure/oauth2/SampleSecureOAuth2ApplicationTests.java index 241660a765..3ce301f5c6 100644 --- a/spring-boot-samples/spring-boot-sample-secure-oauth2/src/test/java/sample/secure/oauth2/SampleSecureOAuth2ApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-secure-oauth2/src/test/java/sample/secure/oauth2/SampleSecureOAuth2ApplicationTests.java @@ -30,7 +30,7 @@ import org.springframework.hateoas.MediaTypes; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.crypto.codec.Base64; import org.springframework.security.web.FilterChainProxy; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; import org.springframework.web.context.WebApplicationContext; @@ -49,7 +49,7 @@ import static org.springframework.test.web.servlet.setup.MockMvcBuilders.webAppC * * @author Greg Turnquist */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleSecureOAuth2Application.class) @WebIntegrationTest(randomPort = true) public class SampleSecureOAuth2ApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-secure/src/test/java/sample/secure/SampleSecureApplicationTests.java b/spring-boot-samples/spring-boot-sample-secure/src/test/java/sample/secure/SampleSecureApplicationTests.java index 61ee6d285d..45863f2dce 100644 --- a/spring-boot-samples/spring-boot-sample-secure/src/test/java/sample/secure/SampleSecureApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-secure/src/test/java/sample/secure/SampleSecureApplicationTests.java @@ -33,7 +33,7 @@ import org.springframework.security.authentication.UsernamePasswordAuthenticatio import org.springframework.security.core.Authentication; import org.springframework.security.core.AuthenticationException; import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration({ SampleSecureApplication.class, TestConfiguration.class }) public class SampleSecureApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-servlet/src/test/java/sample/servlet/SampleServletApplicationTests.java b/spring-boot-samples/spring-boot-sample-servlet/src/test/java/sample/servlet/SampleServletApplicationTests.java index 5d488664c2..d3347c500b 100644 --- a/spring-boot-samples/spring-boot-sample-servlet/src/test/java/sample/servlet/SampleServletApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-servlet/src/test/java/sample/servlet/SampleServletApplicationTests.java @@ -28,7 +28,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -37,7 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleServletApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-simple/src/test/java/sample/simple/SpringTestSampleSimpleApplicationTests.java b/spring-boot-samples/spring-boot-sample-simple/src/test/java/sample/simple/SpringTestSampleSimpleApplicationTests.java index 3b6cd078c3..65f292e1e1 100644 --- a/spring-boot-samples/spring-boot-sample-simple/src/test/java/sample/simple/SpringTestSampleSimpleApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-simple/src/test/java/sample/simple/SpringTestSampleSimpleApplicationTests.java @@ -22,7 +22,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.context.ApplicationContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleSimpleApplication.class) public class SpringTestSampleSimpleApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-tomcat-jsp/src/test/java/sample/tomcat/jsp/SampleWebJspApplicationTests.java b/spring-boot-samples/spring-boot-sample-tomcat-jsp/src/test/java/sample/tomcat/jsp/SampleWebJspApplicationTests.java index e6d20956fd..e8f7b5d831 100644 --- a/spring-boot-samples/spring-boot-sample-tomcat-jsp/src/test/java/sample/tomcat/jsp/SampleWebJspApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-tomcat-jsp/src/test/java/sample/tomcat/jsp/SampleWebJspApplicationTests.java @@ -26,7 +26,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleTomcatJspApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-tomcat-multi-connectors/src/test/java/sample/tomcat/multiconnector/SampleTomcatTwoConnectorsApplicationTests.java b/spring-boot-samples/spring-boot-sample-tomcat-multi-connectors/src/test/java/sample/tomcat/multiconnector/SampleTomcatTwoConnectorsApplicationTests.java index 938c35d220..164605e413 100644 --- a/spring-boot-samples/spring-boot-sample-tomcat-multi-connectors/src/test/java/sample/tomcat/multiconnector/SampleTomcatTwoConnectorsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-tomcat-multi-connectors/src/test/java/sample/tomcat/multiconnector/SampleTomcatTwoConnectorsApplicationTests.java @@ -39,7 +39,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.http.client.SimpleClientHttpRequestFactory; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.web.client.RestTemplate; import static org.assertj.core.api.Assertions.assertThat; @@ -50,7 +50,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Brock Mills * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleTomcatTwoConnectorsApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-tomcat-ssl/src/test/java/sample/tomcat/ssl/SampleTomcatSslApplicationTests.java b/spring-boot-samples/spring-boot-sample-tomcat-ssl/src/test/java/sample/tomcat/ssl/SampleTomcatSslApplicationTests.java index de53f91b56..2d44ecc29f 100644 --- a/spring-boot-samples/spring-boot-sample-tomcat-ssl/src/test/java/sample/tomcat/ssl/SampleTomcatSslApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-tomcat-ssl/src/test/java/sample/tomcat/ssl/SampleTomcatSslApplicationTests.java @@ -32,11 +32,11 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleTomcatSslApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-tomcat/src/test/java/sample/tomcat/NonAutoConfigurationSampleTomcatApplicationTests.java b/spring-boot-samples/spring-boot-sample-tomcat/src/test/java/sample/tomcat/NonAutoConfigurationSampleTomcatApplicationTests.java index 0c62ae10c4..6d42176c28 100644 --- a/spring-boot-samples/spring-boot-sample-tomcat/src/test/java/sample/tomcat/NonAutoConfigurationSampleTomcatApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-tomcat/src/test/java/sample/tomcat/NonAutoConfigurationSampleTomcatApplicationTests.java @@ -39,7 +39,7 @@ import org.springframework.context.annotation.Import; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -48,7 +48,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(NonAutoConfigurationSampleTomcatApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-tomcat/src/test/java/sample/tomcat/SampleTomcatApplicationTests.java b/spring-boot-samples/spring-boot-sample-tomcat/src/test/java/sample/tomcat/SampleTomcatApplicationTests.java index 27fadc94a5..9122a49c17 100644 --- a/spring-boot-samples/spring-boot-sample-tomcat/src/test/java/sample/tomcat/SampleTomcatApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-tomcat/src/test/java/sample/tomcat/SampleTomcatApplicationTests.java @@ -33,7 +33,7 @@ import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.StreamUtils; import org.springframework.web.client.RestTemplate; @@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleTomcatApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-tomcat7-jsp/src/test/java/sample/tomcat7/jsp/SampleWebJspApplicationTests.java b/spring-boot-samples/spring-boot-sample-tomcat7-jsp/src/test/java/sample/tomcat7/jsp/SampleWebJspApplicationTests.java index 35fc0f4786..375e17ca74 100644 --- a/spring-boot-samples/spring-boot-sample-tomcat7-jsp/src/test/java/sample/tomcat7/jsp/SampleWebJspApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-tomcat7-jsp/src/test/java/sample/tomcat7/jsp/SampleWebJspApplicationTests.java @@ -26,7 +26,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleTomcat7JspApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-traditional/src/test/java/sample/traditional/SampleTraditionalApplicationTests.java b/spring-boot-samples/spring-boot-sample-traditional/src/test/java/sample/traditional/SampleTraditionalApplicationTests.java index ef1923a269..42b32a4181 100644 --- a/spring-boot-samples/spring-boot-sample-traditional/src/test/java/sample/traditional/SampleTraditionalApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-traditional/src/test/java/sample/traditional/SampleTraditionalApplicationTests.java @@ -26,7 +26,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleTraditionalApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-undertow-ssl/src/test/java/sample/undertow/ssl/SampleUndertowSslApplicationTests.java b/spring-boot-samples/spring-boot-sample-undertow-ssl/src/test/java/sample/undertow/ssl/SampleUndertowSslApplicationTests.java index 88cf48e74d..21abc03e3d 100644 --- a/spring-boot-samples/spring-boot-sample-undertow-ssl/src/test/java/sample/undertow/ssl/SampleUndertowSslApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-undertow-ssl/src/test/java/sample/undertow/ssl/SampleUndertowSslApplicationTests.java @@ -32,7 +32,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -41,7 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Ivan Sopov */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleUndertowSslApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-undertow/src/test/java/sample/undertow/SampleUndertowApplicationTests.java b/spring-boot-samples/spring-boot-sample-undertow/src/test/java/sample/undertow/SampleUndertowApplicationTests.java index e72633edd1..123667f80f 100644 --- a/spring-boot-samples/spring-boot-sample-undertow/src/test/java/sample/undertow/SampleUndertowApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-undertow/src/test/java/sample/undertow/SampleUndertowApplicationTests.java @@ -33,7 +33,7 @@ import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.StreamUtils; import org.springframework.web.client.RestTemplate; @@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Ivan Sopov * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleUndertowApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-velocity/src/test/java/sample/velocity/SampleVelocityApplicationTests.java b/spring-boot-samples/spring-boot-sample-velocity/src/test/java/sample/velocity/SampleVelocityApplicationTests.java index da0a3842b7..7a7520fc0f 100644 --- a/spring-boot-samples/spring-boot-sample-velocity/src/test/java/sample/velocity/SampleVelocityApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-velocity/src/test/java/sample/velocity/SampleVelocityApplicationTests.java @@ -22,7 +22,7 @@ import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.boot.test.rule.OutputCapture; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleVelocityApplication.class) @SuppressWarnings("deprecation") public class SampleVelocityApplicationTests { diff --git a/spring-boot-samples/spring-boot-sample-web-freemarker/src/test/java/sample/freemarker/SampleWebFreeMarkerApplicationTests.java b/spring-boot-samples/spring-boot-sample-web-freemarker/src/test/java/sample/freemarker/SampleWebFreeMarkerApplicationTests.java index 1e083caa00..c2f045985f 100644 --- a/spring-boot-samples/spring-boot-sample-web-freemarker/src/test/java/sample/freemarker/SampleWebFreeMarkerApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-web-freemarker/src/test/java/sample/freemarker/SampleWebFreeMarkerApplicationTests.java @@ -32,7 +32,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Phillip Webb * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleWebFreeMarkerApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-web-groovy-templates/src/test/java/sample/groovytemplates/MessageControllerWebTests.java b/spring-boot-samples/spring-boot-sample-web-groovy-templates/src/test/java/sample/groovytemplates/MessageControllerWebTests.java index 3719b4cfc6..884b20f057 100755 --- a/spring-boot-samples/spring-boot-sample-web-groovy-templates/src/test/java/sample/groovytemplates/MessageControllerWebTests.java +++ b/spring-boot-samples/spring-boot-sample-web-groovy-templates/src/test/java/sample/groovytemplates/MessageControllerWebTests.java @@ -27,7 +27,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -46,7 +46,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author Biju Kunjummen * @author Doo-Hwan, Kwak */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @WebAppConfiguration @SpringApplicationConfiguration(SampleGroovyTemplateApplication.class) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-web-groovy-templates/src/test/java/sample/groovytemplates/SampleGroovyTemplateApplicationTests.java b/spring-boot-samples/spring-boot-sample-web-groovy-templates/src/test/java/sample/groovytemplates/SampleGroovyTemplateApplicationTests.java index 0767f0ed80..ae70238e92 100644 --- a/spring-boot-samples/spring-boot-sample-web-groovy-templates/src/test/java/sample/groovytemplates/SampleGroovyTemplateApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-web-groovy-templates/src/test/java/sample/groovytemplates/SampleGroovyTemplateApplicationTests.java @@ -28,7 +28,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; @@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleGroovyTemplateApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-web-jsp/src/test/java/sample/jsp/SampleWebJspApplicationTests.java b/spring-boot-samples/spring-boot-sample-web-jsp/src/test/java/sample/jsp/SampleWebJspApplicationTests.java index eaa2daa368..3fdf0b148a 100644 --- a/spring-boot-samples/spring-boot-sample-web-jsp/src/test/java/sample/jsp/SampleWebJspApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-web-jsp/src/test/java/sample/jsp/SampleWebJspApplicationTests.java @@ -26,7 +26,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleWebJspApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-web-method-security/src/test/java/sample/security/method/SampleMethodSecurityApplicationTests.java b/spring-boot-samples/spring-boot-sample-web-method-security/src/test/java/sample/security/method/SampleMethodSecurityApplicationTests.java index a92775155c..9da6629068 100644 --- a/spring-boot-samples/spring-boot-sample-web-method-security/src/test/java/sample/security/method/SampleMethodSecurityApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-web-method-security/src/test/java/sample/security/method/SampleMethodSecurityApplicationTests.java @@ -34,7 +34,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; @@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleMethodSecurityApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-web-mustache/src/test/java/sample/mustache/SampleWebMustacheApplicationTests.java b/spring-boot-samples/spring-boot-sample-web-mustache/src/test/java/sample/mustache/SampleWebMustacheApplicationTests.java index 3a1aa9dbc0..34741464a3 100644 --- a/spring-boot-samples/spring-boot-sample-web-mustache/src/test/java/sample/mustache/SampleWebMustacheApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-web-mustache/src/test/java/sample/mustache/SampleWebMustacheApplicationTests.java @@ -32,7 +32,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Phillip Webb * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleWebMustacheApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-web-secure-custom/src/test/java/sample/web/secure/custom/SampleWebSecureCustomApplicationTests.java b/spring-boot-samples/spring-boot-sample-web-secure-custom/src/test/java/sample/web/secure/custom/SampleWebSecureCustomApplicationTests.java index 085bae4fdd..9110a6ca44 100644 --- a/spring-boot-samples/spring-boot-sample-web-secure-custom/src/test/java/sample/web/secure/custom/SampleWebSecureCustomApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-web-secure-custom/src/test/java/sample/web/secure/custom/SampleWebSecureCustomApplicationTests.java @@ -34,7 +34,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; @@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleWebSecureCustomApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-web-secure-github/src/test/java/sample/web/secure/github/SampleGithubApplicationTests.java b/spring-boot-samples/spring-boot-sample-web-secure-github/src/test/java/sample/web/secure/github/SampleGithubApplicationTests.java index bbbcfe12ea..0fe441958f 100644 --- a/spring-boot-samples/spring-boot-sample-web-secure-github/src/test/java/sample/web/secure/github/SampleGithubApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-web-secure-github/src/test/java/sample/web/secure/github/SampleGithubApplicationTests.java @@ -28,7 +28,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleGithubSecureApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-web-secure-jdbc/src/test/java/sample/web/secure/jdbc/SampleWebSecureCustomApplicationTests.java b/spring-boot-samples/spring-boot-sample-web-secure-jdbc/src/test/java/sample/web/secure/jdbc/SampleWebSecureCustomApplicationTests.java index a53e6581db..7417bafdf1 100644 --- a/spring-boot-samples/spring-boot-sample-web-secure-jdbc/src/test/java/sample/web/secure/jdbc/SampleWebSecureCustomApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-web-secure-jdbc/src/test/java/sample/web/secure/jdbc/SampleWebSecureCustomApplicationTests.java @@ -34,7 +34,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; @@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleWebSecureCustomApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-web-secure/src/test/java/sample/web/secure/SampleSecureApplicationTests.java b/spring-boot-samples/spring-boot-sample-web-secure/src/test/java/sample/web/secure/SampleSecureApplicationTests.java index 985671efa2..299cc31ba5 100644 --- a/spring-boot-samples/spring-boot-sample-web-secure/src/test/java/sample/web/secure/SampleSecureApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-web-secure/src/test/java/sample/web/secure/SampleSecureApplicationTests.java @@ -34,7 +34,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; @@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleWebSecureApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-web-static/src/test/java/sample/web/staticcontent/SampleWebStaticApplicationTests.java b/spring-boot-samples/spring-boot-sample-web-static/src/test/java/sample/web/staticcontent/SampleWebStaticApplicationTests.java index 813ea4d7b5..7d1c2a18c8 100644 --- a/spring-boot-samples/spring-boot-sample-web-static/src/test/java/sample/web/staticcontent/SampleWebStaticApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-web-static/src/test/java/sample/web/staticcontent/SampleWebStaticApplicationTests.java @@ -27,7 +27,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -36,7 +36,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleWebStaticApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-web-ui/src/test/java/sample/web/ui/MessageControllerWebTests.java b/spring-boot-samples/spring-boot-sample-web-ui/src/test/java/sample/web/ui/MessageControllerWebTests.java index a882dcad94..007e52173e 100644 --- a/spring-boot-samples/spring-boot-sample-web-ui/src/test/java/sample/web/ui/MessageControllerWebTests.java +++ b/spring-boot-samples/spring-boot-sample-web-ui/src/test/java/sample/web/ui/MessageControllerWebTests.java @@ -26,7 +26,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -45,7 +45,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * @author Biju Kunjummen * @author Doo-Hwan, Kwak */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @WebAppConfiguration @ContextConfiguration(classes = SampleWebUiApplication.class) public class MessageControllerWebTests { diff --git a/spring-boot-samples/spring-boot-sample-web-ui/src/test/java/sample/web/ui/SampleWebUiApplicationTests.java b/spring-boot-samples/spring-boot-sample-web-ui/src/test/java/sample/web/ui/SampleWebUiApplicationTests.java index d87498e574..995b4130ee 100644 --- a/spring-boot-samples/spring-boot-sample-web-ui/src/test/java/sample/web/ui/SampleWebUiApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-web-ui/src/test/java/sample/web/ui/SampleWebUiApplicationTests.java @@ -28,7 +28,7 @@ import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; @@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleWebUiApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-web-velocity/src/test/java/sample/web/velocity/SampleWebVelocityApplicationTests.java b/spring-boot-samples/spring-boot-sample-web-velocity/src/test/java/sample/web/velocity/SampleWebVelocityApplicationTests.java index 993cb85e4d..984e61a3fc 100644 --- a/spring-boot-samples/spring-boot-sample-web-velocity/src/test/java/sample/web/velocity/SampleWebVelocityApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-web-velocity/src/test/java/sample/web/velocity/SampleWebVelocityApplicationTests.java @@ -32,7 +32,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Phillip Webb * @author Andy Wilkinson */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleWebVelocityApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/SampleWebSocketsApplicationTests.java b/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/SampleWebSocketsApplicationTests.java index 22cb3f7481..604c66d6e5 100644 --- a/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/SampleWebSocketsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/SampleWebSocketsApplicationTests.java @@ -39,13 +39,13 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.web.socket.client.WebSocketConnectionManager; import org.springframework.web.socket.client.standard.StandardWebSocketClient; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleJettyWebSocketsApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java b/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java index 4dd87ada5c..6b9d92b49f 100644 --- a/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java @@ -42,14 +42,14 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.SocketUtils; import org.springframework.web.socket.client.WebSocketConnectionManager; import org.springframework.web.socket.client.standard.StandardWebSocketClient; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration({ SampleJettyWebSocketsApplication.class, CustomContainerConfiguration.class }) @WebIntegrationTest diff --git a/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/SampleWebSocketsApplicationTests.java b/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/SampleWebSocketsApplicationTests.java index 694d198ebf..6a3b853016 100644 --- a/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/SampleWebSocketsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/SampleWebSocketsApplicationTests.java @@ -39,13 +39,13 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.web.socket.client.WebSocketConnectionManager; import org.springframework.web.socket.client.standard.StandardWebSocketClient; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleTomcatWebSocketApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/echo/CustomContainerWebSocketsApplicationTests.java b/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/echo/CustomContainerWebSocketsApplicationTests.java index 4fc1cadcb1..4bff42ae55 100644 --- a/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/echo/CustomContainerWebSocketsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/echo/CustomContainerWebSocketsApplicationTests.java @@ -42,14 +42,14 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.SocketUtils; import org.springframework.web.socket.client.WebSocketConnectionManager; import org.springframework.web.socket.client.standard.StandardWebSocketClient; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration({ SampleTomcatWebSocketApplication.class, CustomContainerConfiguration.class }) @WebIntegrationTest diff --git a/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/SampleWebSocketsApplicationTests.java b/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/SampleWebSocketsApplicationTests.java index bfccaf545c..0e0707d116 100644 --- a/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/SampleWebSocketsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/SampleWebSocketsApplicationTests.java @@ -40,13 +40,13 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.web.socket.client.WebSocketConnectionManager; import org.springframework.web.socket.client.standard.StandardWebSocketClient; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleUndertowWebSocketsApplication.class) @WebIntegrationTest(randomPort = true) @DirtiesContext diff --git a/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/echo/CustomContainerWebSocketsApplicationTests.java b/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/echo/CustomContainerWebSocketsApplicationTests.java index d4493c0e4a..978462085c 100644 --- a/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/echo/CustomContainerWebSocketsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/echo/CustomContainerWebSocketsApplicationTests.java @@ -43,14 +43,14 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.SocketUtils; import org.springframework.web.socket.client.WebSocketConnectionManager; import org.springframework.web.socket.client.standard.StandardWebSocketClient; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration({ SampleUndertowWebSocketsApplication.class, CustomContainerConfiguration.class }) @WebIntegrationTest diff --git a/spring-boot-samples/spring-boot-sample-ws/src/test/java/sample/ws/SampleWsApplicationTests.java b/spring-boot-samples/spring-boot-sample-ws/src/test/java/sample/ws/SampleWsApplicationTests.java index 159720dfc7..88a7b132ec 100644 --- a/spring-boot-samples/spring-boot-sample-ws/src/test/java/sample/ws/SampleWsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-ws/src/test/java/sample/ws/SampleWsApplicationTests.java @@ -30,12 +30,12 @@ import org.springframework.boot.context.web.LocalServerPort; import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.boot.test.context.web.WebIntegrationTest; import org.springframework.boot.test.rule.OutputCapture; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.ws.client.core.WebServiceTemplate; import static org.assertj.core.api.Assertions.assertThat; -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @SpringApplicationConfiguration(SampleWsApplication.class) @WebIntegrationTest(randomPort = true) public class SampleWsApplicationTests { diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/ConfigFileApplicationContextInitializerTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/ConfigFileApplicationContextInitializerTests.java index 9ac116859f..a9c176a6ba 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/ConfigFileApplicationContextInitializerTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/ConfigFileApplicationContextInitializerTests.java @@ -24,7 +24,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @ContextConfiguration(classes = ConfigFileApplicationContextInitializerTests.Config.class, initializers = ConfigFileApplicationContextInitializer.class) @Deprecated diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationActiveProfileTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationActiveProfileTests.java index de5e9422b3..e63c1b7cd8 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationActiveProfileTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationActiveProfileTests.java @@ -24,7 +24,7 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ActiveProfiles; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration @IntegrationTest("spring.config.name=enableother") diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationDefaultConfigurationTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationDefaultConfigurationTests.java index 01607f3ca3..be37216202 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationDefaultConfigurationTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationDefaultConfigurationTests.java @@ -22,7 +22,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration @Deprecated diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationGroovyConfigurationTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationGroovyConfigurationTests.java index ad599231cf..220ab7b9ae 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationGroovyConfigurationTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationGroovyConfigurationTests.java @@ -21,7 +21,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -30,7 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(locations = "classpath:test.groovy") @Deprecated diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationGroovyConventionConfigurationTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationGroovyConventionConfigurationTests.java index ce93ce3f88..7ade573a4f 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationGroovyConventionConfigurationTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationGroovyConventionConfigurationTests.java @@ -21,7 +21,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -30,7 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration @Deprecated diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationJmxTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationJmxTests.java index 977f452de2..08892ff3a3 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationJmxTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationJmxTests.java @@ -25,7 +25,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Config.class) @IntegrationTest diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationMixedConfigurationTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationMixedConfigurationTests.java index 710e1e8c6a..e3ef4766f4 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationMixedConfigurationTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationMixedConfigurationTests.java @@ -23,7 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.SpringApplicationConfigurationMixedConfigurationTests.Config; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(classes = Config.class, locations = "classpath:test.groovy") @Deprecated diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationXmlConventionConfigurationTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationXmlConventionConfigurationTests.java index 0cdf924002..b4d63ed520 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationXmlConventionConfigurationTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationConfigurationXmlConventionConfigurationTests.java @@ -21,7 +21,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -30,7 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration @Deprecated diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationIntegrationTestPropertyLocationTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationIntegrationTestPropertyLocationTests.java index 877b658337..2e8abb386b 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationIntegrationTestPropertyLocationTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationIntegrationTestPropertyLocationTests.java @@ -29,7 +29,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import static org.assertj.core.api.Assertions.assertThat; @@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration({ Config.class, MoreConfig.class }) @WebAppConfiguration diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationIntegrationTestTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationIntegrationTestTests.java index de1907cbb2..936a18855e 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationIntegrationTestTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationIntegrationTestTests.java @@ -31,7 +31,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -48,7 +48,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Config.class) @WebAppConfiguration diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationMockMvcTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationMockMvcTests.java index 38149617a5..8113bdac56 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationMockMvcTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationMockMvcTests.java @@ -26,7 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.SpringApplicationMockMvcTests.Config; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -46,7 +46,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * * @author Stephane Nicoll */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(classes = Config.class) @WebAppConfiguration diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationWebIntegrationTestTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationWebIntegrationTestTests.java index debab7f779..033b6cbafb 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationWebIntegrationTestTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringApplicationWebIntegrationTestTests.java @@ -31,7 +31,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate; @@ -47,7 +47,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Config.class) @WebIntegrationTest({ "server.port=0", "value=123" }) diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringBootMockServletContextTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringBootMockServletContextTests.java index c1ebe916a6..265f973157 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/SpringBootMockServletContextTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/SpringBootMockServletContextTests.java @@ -29,7 +29,7 @@ import org.junit.runner.RunWith; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.web.context.ServletContextAware; @@ -41,7 +41,7 @@ import static org.hamcrest.Matchers.nullValue; * * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(SpringBootMockServletContextTests.Config.class) @WebAppConfiguration("src/test/webapp") diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/context/ConfigFileApplicationContextInitializerTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/context/ConfigFileApplicationContextInitializerTests.java index 60f732ae85..a40736f393 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/context/ConfigFileApplicationContextInitializerTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/context/ConfigFileApplicationContextInitializerTests.java @@ -24,7 +24,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @ContextConfiguration(classes = ConfigFileApplicationContextInitializerTests.Config.class, initializers = ConfigFileApplicationContextInitializer.class) public class ConfigFileApplicationContextInitializerTests { diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationActiveProfileTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationActiveProfileTests.java index 39c2695819..267e20af4f 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationActiveProfileTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationActiveProfileTests.java @@ -24,7 +24,7 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ActiveProfiles; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration @IntegrationTest("spring.config.name=enableother") diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationDefaultConfigurationTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationDefaultConfigurationTests.java index 34d175f411..f8549f8512 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationDefaultConfigurationTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationDefaultConfigurationTests.java @@ -22,7 +22,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -31,7 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration public class SpringApplicationConfigurationDefaultConfigurationTests { diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationGroovyConfigurationTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationGroovyConfigurationTests.java index ffde9a38fe..a5bb3c2e7b 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationGroovyConfigurationTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationGroovyConfigurationTests.java @@ -21,7 +21,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -30,7 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(locations = "classpath:test.groovy") public class SpringApplicationConfigurationGroovyConfigurationTests { diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationGroovyConventionConfigurationTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationGroovyConventionConfigurationTests.java index 7ba3ebd704..1df1905e56 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationGroovyConventionConfigurationTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationGroovyConventionConfigurationTests.java @@ -21,7 +21,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -30,7 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration public class SpringApplicationConfigurationGroovyConventionConfigurationTests { diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationJmxTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationJmxTests.java index 7503567f3d..919382a0a8 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationJmxTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationJmxTests.java @@ -25,7 +25,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Config.class) @IntegrationTest diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationMixedConfigurationTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationMixedConfigurationTests.java index 319991fa93..c4c3597ae3 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationMixedConfigurationTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationMixedConfigurationTests.java @@ -23,7 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringApplicationConfigurationMixedConfigurationTests.Config; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -32,7 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(classes = Config.class, locations = "classpath:test.groovy") public class SpringApplicationConfigurationMixedConfigurationTests { diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationXmlConventionConfigurationTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationXmlConventionConfigurationTests.java index 5b50822382..2334f366cd 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationXmlConventionConfigurationTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationConfigurationXmlConventionConfigurationTests.java @@ -21,7 +21,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -30,7 +30,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration public class SpringApplicationConfigurationXmlConventionConfigurationTests { diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationIntegrationTestPropertyLocationTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationIntegrationTestPropertyLocationTests.java index 99ad9d2dae..a43619fcce 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationIntegrationTestPropertyLocationTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationIntegrationTestPropertyLocationTests.java @@ -29,7 +29,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import static org.assertj.core.api.Assertions.assertThat; @@ -39,7 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration({ Config.class, MoreConfig.class }) @WebAppConfiguration diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationIntegrationTestTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationIntegrationTestTests.java index 9346b8b787..44aec2ba70 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationIntegrationTestTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/context/SpringApplicationIntegrationTestTests.java @@ -30,7 +30,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -47,7 +47,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Config.class) @WebAppConfiguration diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/context/web/SpringApplicationMockMvcTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/context/web/SpringApplicationMockMvcTests.java index 707d7a13bf..fc7cb64370 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/context/web/SpringApplicationMockMvcTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/context/web/SpringApplicationMockMvcTests.java @@ -27,7 +27,7 @@ import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.boot.test.context.web.SpringApplicationMockMvcTests.Config; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; @@ -47,7 +47,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. * * @author Stephane Nicoll */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(classes = Config.class) @WebAppConfiguration diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/context/web/SpringApplicationWebIntegrationTestTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/context/web/SpringApplicationWebIntegrationTestTests.java index d170894e40..e72c7f43ca 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/context/web/SpringApplicationWebIntegrationTestTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/context/web/SpringApplicationWebIntegrationTestTests.java @@ -34,7 +34,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate; @@ -50,7 +50,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Config.class) @WebIntegrationTest({ "server.port=0", "value=123" }) diff --git a/spring-boot-test/src/test/java/org/springframework/boot/test/mock/web/SpringBootMockServletContextTests.java b/spring-boot-test/src/test/java/org/springframework/boot/test/mock/web/SpringBootMockServletContextTests.java index 8693299b67..38cfca8149 100644 --- a/spring-boot-test/src/test/java/org/springframework/boot/test/mock/web/SpringBootMockServletContextTests.java +++ b/spring-boot-test/src/test/java/org/springframework/boot/test/mock/web/SpringBootMockServletContextTests.java @@ -31,7 +31,7 @@ import org.springframework.boot.test.context.SpringApplicationConfiguration; import org.springframework.boot.test.mock.web.SpringBootMockServletContextTests.Config; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.web.context.ServletContextAware; @@ -43,7 +43,7 @@ import static org.hamcrest.Matchers.nullValue; * * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @SpringApplicationConfiguration(Config.class) @WebAppConfiguration("src/test/webapp") diff --git a/spring-boot/src/test/java/org/springframework/boot/bind/ConverterBindingTests.java b/spring-boot/src/test/java/org/springframework/boot/bind/ConverterBindingTests.java index 0f72abae1c..ba840ce17a 100644 --- a/spring-boot/src/test/java/org/springframework/boot/bind/ConverterBindingTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/bind/ConverterBindingTests.java @@ -37,7 +37,7 @@ import org.springframework.core.convert.converter.GenericConverter; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -47,7 +47,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer * @author Stephane Nicoll */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @ContextConfiguration(classes = TestConfig.class, loader = SpringApplicationBindContextLoader.class) @TestPropertySource(properties = { "foo=one", "bar=two" }) diff --git a/spring-boot/src/test/java/org/springframework/boot/bind/PropertySourcesBindingTests.java b/spring-boot/src/test/java/org/springframework/boot/bind/PropertySourcesBindingTests.java index 6a72dacb3f..d83fb73395 100644 --- a/spring-boot/src/test/java/org/springframework/boot/bind/PropertySourcesBindingTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/bind/PropertySourcesBindingTests.java @@ -32,7 +32,7 @@ import org.springframework.context.annotation.PropertySources; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -41,7 +41,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @ContextConfiguration(classes = TestConfig.class, loader = SpringApplicationBindContextLoader.class) public class PropertySourcesBindingTests { diff --git a/spring-boot/src/test/java/org/springframework/boot/bind/SimplerPropertySourcesBindingTests.java b/spring-boot/src/test/java/org/springframework/boot/bind/SimplerPropertySourcesBindingTests.java index 0e9c8b5f4f..c5d7185226 100644 --- a/spring-boot/src/test/java/org/springframework/boot/bind/SimplerPropertySourcesBindingTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/bind/SimplerPropertySourcesBindingTests.java @@ -31,7 +31,7 @@ import org.springframework.context.annotation.PropertySources; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; @@ -40,7 +40,7 @@ import static org.assertj.core.api.Assertions.assertThat; * * @author Dave Syer */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @ContextConfiguration(classes = TestConfig.class, loader = SpringApplicationBindContextLoader.class) public class SimplerPropertySourcesBindingTests { diff --git a/spring-boot/src/test/java/org/springframework/boot/context/web/ErrorPageFilterIntegrationTests.java b/spring-boot/src/test/java/org/springframework/boot/context/web/ErrorPageFilterIntegrationTests.java index 8c4455dad5..41bef0711b 100644 --- a/spring-boot/src/test/java/org/springframework/boot/context/web/ErrorPageFilterIntegrationTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/context/web/ErrorPageFilterIntegrationTests.java @@ -43,7 +43,7 @@ import org.springframework.stereotype.Controller; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.MergedContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.support.AbstractContextLoader; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; @@ -64,7 +64,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Dave Syer * @author Phillip Webb */ -@RunWith(SpringJUnit4ClassRunner.class) +@RunWith(SpringRunner.class) @DirtiesContext @ContextConfiguration(classes = TomcatConfig.class, loader = EmbeddedWebContextLoader.class) public class ErrorPageFilterIntegrationTests {