Add value alias for SpringApplicationConfiguration

Given that Spring Boot uses java config accross the board, a new `value`
attribute is now aliased to the existing `classes` attribute such that
one could write the following:

@SpringApplicationConfiguration(MyConfig.class)
public class MyTest {}

Closes gh-3635
pull/3785/merge
Stephane Nicoll 9 years ago
parent 87d214e61d
commit 7c0c953f81

@ -58,7 +58,7 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SpringBootHypermediaApplication.class) @SpringApplicationConfiguration(SpringBootHypermediaApplication.class)
@WebAppConfiguration @WebAppConfiguration
@TestPropertySource(properties = { "spring.jackson.serialization.indent_output=true", @TestPropertySource(properties = { "spring.jackson.serialization.indent_output=true",
"endpoints.health.sensitive=true", "endpoints.actuator.enabled=false" }) "endpoints.health.sensitive=true", "endpoints.actuator.enabled=false" })

@ -40,7 +40,7 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SpringBootHypermediaApplication.class) @SpringApplicationConfiguration(SpringBootHypermediaApplication.class)
@WebAppConfiguration @WebAppConfiguration
@TestPropertySource(properties = { "spring.jackson.serialization.indent_output=true", @TestPropertySource(properties = { "spring.jackson.serialization.indent_output=true",
"endpoints.health.sensitive=false" }) "endpoints.health.sensitive=false" })

@ -40,7 +40,7 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SpringBootHypermediaApplication.class) @SpringApplicationConfiguration(SpringBootHypermediaApplication.class)
@WebAppConfiguration @WebAppConfiguration
@TestPropertySource(properties = "spring.jackson.serialization.indent_output=true") @TestPropertySource(properties = "spring.jackson.serialization.indent_output=true")
@DirtiesContext @DirtiesContext

@ -48,7 +48,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SpringBootHypermediaApplication.class) @SpringApplicationConfiguration(SpringBootHypermediaApplication.class)
@WebAppConfiguration @WebAppConfiguration
@TestPropertySource(properties = "endpoints.actuator.path=/actuator") @TestPropertySource(properties = "endpoints.actuator.path=/actuator")
@DirtiesContext @DirtiesContext

@ -72,7 +72,7 @@ import static org.junit.Assert.assertTrue;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Application.class) @SpringApplicationConfiguration(Application.class)
@IntegrationTest("server.port=0") @IntegrationTest("server.port=0")
@WebAppConfiguration @WebAppConfiguration
@DirtiesContext @DirtiesContext

@ -51,7 +51,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SpringBootHypermediaApplication.class) @SpringApplicationConfiguration(SpringBootHypermediaApplication.class)
@WebAppConfiguration @WebAppConfiguration
@TestPropertySource(properties = "management.contextPath:/admin") @TestPropertySource(properties = "management.contextPath:/admin")
@DirtiesContext @DirtiesContext

@ -51,7 +51,7 @@ import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo;
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SpringBootHypermediaApplication.class) @SpringApplicationConfiguration(SpringBootHypermediaApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest({ "server.port=0", "server.contextPath=/spring" }) @IntegrationTest({ "server.port=0", "server.contextPath=/spring" })
@DirtiesContext @DirtiesContext

@ -51,7 +51,7 @@ import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo;
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SpringBootHypermediaApplication.class) @SpringApplicationConfiguration(SpringBootHypermediaApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest({ "server.port=0", "management.port=0" }) @IntegrationTest({ "server.port=0", "management.port=0" })
@DirtiesContext @DirtiesContext

@ -48,7 +48,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SpringBootHypermediaApplication.class) @SpringApplicationConfiguration(SpringBootHypermediaApplication.class)
@WebAppConfiguration @WebAppConfiguration
@DirtiesContext @DirtiesContext
public class VanillaHypermediaIntegrationTests { public class VanillaHypermediaIntegrationTests {

@ -52,7 +52,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = { TestConfiguration.class }) @SpringApplicationConfiguration(TestConfiguration.class)
@WebAppConfiguration @WebAppConfiguration
public class EnvironmentMvcEndpointTests { public class EnvironmentMvcEndpointTests {

@ -57,7 +57,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = { Config.class }) @SpringApplicationConfiguration(Config.class)
@WebAppConfiguration @WebAppConfiguration
public class JolokiaMvcEndpointTests { public class JolokiaMvcEndpointTests {

@ -56,7 +56,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Sergei Egorov * @author Sergei Egorov
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = { TestConfiguration.class }) @SpringApplicationConfiguration(TestConfiguration.class)
@WebAppConfiguration @WebAppConfiguration
public class MetricsMvcEndpointTests { public class MetricsMvcEndpointTests {

@ -39,7 +39,7 @@ import static org.junit.Assert.assertTrue;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = TestConfiguration.class) @SpringApplicationConfiguration(TestConfiguration.class)
@IntegrationTest("spring.jmx.enabled=true") @IntegrationTest("spring.jmx.enabled=true")
@DirtiesContext @DirtiesContext
public class SpringIntegrationMetricReaderTests { public class SpringIntegrationMetricReaderTests {

@ -35,7 +35,7 @@ import static org.junit.Assert.assertEquals;
* *
* @author Dave Syer * @author Dave Syer
*/ */
@SpringApplicationConfiguration(classes = { Config.class, @SpringApplicationConfiguration({ Config.class,
MessageSourceAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class }) MessageSourceAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class })
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@IntegrationTest("spring.messages.basename:test/messages") @IntegrationTest("spring.messages.basename:test/messages")

@ -35,7 +35,7 @@ import static org.junit.Assert.assertEquals;
* *
* @author Dave Syer * @author Dave Syer
*/ */
@SpringApplicationConfiguration(classes = { Config.class, @SpringApplicationConfiguration({ Config.class,
MessageSourceAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class }) MessageSourceAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class })
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@ActiveProfiles("switch-messages") @ActiveProfiles("switch-messages")

@ -34,7 +34,7 @@ import static org.junit.Assert.assertNotNull;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = TestConfiguration.class) @SpringApplicationConfiguration(TestConfiguration.class)
public class SpringJUnitTests { public class SpringJUnitTests {
@Autowired @Autowired

@ -53,7 +53,7 @@ import static org.junit.Assert.assertEquals;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Application.class) @SpringApplicationConfiguration(Application.class)
@IntegrationTest({ "server.port=0", "spring.jersey.type=filter", @IntegrationTest({ "server.port=0", "spring.jersey.type=filter",
"server.contextPath=/app" }) "server.contextPath=/app" })
@WebAppConfiguration @WebAppConfiguration

@ -53,7 +53,7 @@ import static org.junit.Assert.assertEquals;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Application.class) @SpringApplicationConfiguration(Application.class)
@IntegrationTest({ "server.port=0", "spring.jersey.type=filter" }) @IntegrationTest({ "server.port=0", "spring.jersey.type=filter" })
@WebAppConfiguration @WebAppConfiguration
public class JerseyAutoConfigurationCustomFilterPathTests { public class JerseyAutoConfigurationCustomFilterPathTests {

@ -53,7 +53,7 @@ import static org.junit.Assert.assertEquals;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Application.class) @SpringApplicationConfiguration(Application.class)
@IntegrationTest({ "server.port=0", "server.contextPath=/app" }) @IntegrationTest({ "server.port=0", "server.contextPath=/app" })
@WebAppConfiguration @WebAppConfiguration
public class JerseyAutoConfigurationCustomServletContextPathTests { public class JerseyAutoConfigurationCustomServletContextPathTests {

@ -53,7 +53,7 @@ import static org.junit.Assert.assertEquals;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Application.class) @SpringApplicationConfiguration(Application.class)
@IntegrationTest("server.port=0") @IntegrationTest("server.port=0")
@WebAppConfiguration @WebAppConfiguration
public class JerseyAutoConfigurationCustomServletPathTests { public class JerseyAutoConfigurationCustomServletPathTests {

@ -52,7 +52,7 @@ import static org.junit.Assert.assertEquals;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Application.class) @SpringApplicationConfiguration(Application.class)
@IntegrationTest({ "server.port=0", "spring.jersey.type=filter" }) @IntegrationTest({ "server.port=0", "spring.jersey.type=filter" })
@WebAppConfiguration @WebAppConfiguration
public class JerseyAutoConfigurationDefaultFilterPathTests { public class JerseyAutoConfigurationDefaultFilterPathTests {

@ -52,7 +52,7 @@ import static org.junit.Assert.assertEquals;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Application.class) @SpringApplicationConfiguration(Application.class)
@IntegrationTest("server.port=0") @IntegrationTest("server.port=0")
@WebAppConfiguration @WebAppConfiguration
public class JerseyAutoConfigurationDefaultServletPathTests { public class JerseyAutoConfigurationDefaultServletPathTests {

@ -53,7 +53,7 @@ import static org.junit.Assert.assertTrue;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Application.class) @SpringApplicationConfiguration(Application.class)
@IntegrationTest({ "server.port:0", @IntegrationTest({ "server.port:0",
"spring.mustache.prefix:classpath:/mustache-templates/" }) "spring.mustache.prefix:classpath:/mustache-templates/" })
@WebAppConfiguration @WebAppConfiguration

@ -39,7 +39,7 @@ import static org.junit.Assert.assertEquals;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Application.class) @SpringApplicationConfiguration(Application.class)
@IntegrationTest({ "spring.main.web_environment=false", "env.foo=Heaven", "foo=World" }) @IntegrationTest({ "spring.main.web_environment=false", "env.foo=Heaven", "foo=World" })
public class MustacheStandaloneIntegrationTests { public class MustacheStandaloneIntegrationTests {

@ -64,7 +64,7 @@ import static org.junit.Assert.assertTrue;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Application.class) @SpringApplicationConfiguration(Application.class)
@IntegrationTest("server.port:0") @IntegrationTest("server.port:0")
@WebAppConfiguration @WebAppConfiguration
public class MustacheWebIntegrationTests { public class MustacheWebIntegrationTests {

@ -40,7 +40,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = JpaUserDetailsTests.Main.class) @SpringApplicationConfiguration(JpaUserDetailsTests.Main.class)
@DirtiesContext @DirtiesContext
public class JpaUserDetailsTests { public class JpaUserDetailsTests {

@ -46,7 +46,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = TestConfiguration.class) @SpringApplicationConfiguration(TestConfiguration.class)
@WebAppConfiguration @WebAppConfiguration
@TestPropertySource(properties = { "security.oauth2.client.clientId=client", @TestPropertySource(properties = { "security.oauth2.client.clientId=client",
"security.oauth2.client.clientSecret=secret", "security.oauth2.client.clientSecret=secret",

@ -52,7 +52,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = TestConfiguration.class) @SpringApplicationConfiguration(TestConfiguration.class)
@WebAppConfiguration @WebAppConfiguration
@TestPropertySource(properties = { "security.oauth2.client.clientId=client", @TestPropertySource(properties = { "security.oauth2.client.clientId=client",
"security.oauth2.client.clientSecret=secret", "security.oauth2.client.clientSecret=secret",

@ -59,7 +59,7 @@ import static org.junit.Assert.assertThat;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = TestConfiguration.class) @SpringApplicationConfiguration(TestConfiguration.class)
@WebAppConfiguration @WebAppConfiguration
@DirtiesContext @DirtiesContext
@IntegrationTest("server.port=0") @IntegrationTest("server.port=0")

@ -67,7 +67,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* *
* @author Dave Syer * @author Dave Syer
*/ */
@SpringApplicationConfiguration(classes = TestConfiguration.class) @SpringApplicationConfiguration(TestConfiguration.class)
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration @WebAppConfiguration
@DirtiesContext @DirtiesContext

@ -48,7 +48,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
/** /**
* @author Dave Syer * @author Dave Syer
*/ */
@SpringApplicationConfiguration(classes = TestConfiguration.class) @SpringApplicationConfiguration(TestConfiguration.class)
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration @WebAppConfiguration
@DirtiesContext @DirtiesContext

@ -42,7 +42,7 @@ import static org.junit.Assert.assertTrue;
/** /**
* @author Dave Syer * @author Dave Syer
*/ */
@SpringApplicationConfiguration(classes = TestConfiguration.class) @SpringApplicationConfiguration(TestConfiguration.class)
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest({ "server.servletPath:/spring/*", "server.port:0" }) @IntegrationTest({ "server.servletPath:/spring/*", "server.port:0" })

@ -1,4 +1,4 @@
@SpringApplicationConfiguration(classes=Application) @SpringApplicationConfiguration(Application)
@IntegrationTest @IntegrationTest
class BookTests { class BookTests {
@Autowired @Autowired

@ -1,4 +1,4 @@
@SpringApplicationConfiguration(classes=Application) @SpringApplicationConfiguration(Application)
@IntegrationTest('server.port:0') @IntegrationTest('server.port:0')
@WebAppConfiguration @WebAppConfiguration
@DirtiesContext @DirtiesContext

@ -1,4 +1,4 @@
@SpringApplicationConfiguration(classes=ReactorApplication) @SpringApplicationConfiguration(ReactorApplication)
@IntegrationTest('server.port:0') @IntegrationTest('server.port:0')
class RestTests { class RestTests {

@ -61,7 +61,7 @@ import static org.junit.Assert.assertEquals;
* @author Phillip Webb * @author Phillip Webb
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = HttpTunnelIntegrationTest.Config.class) @SpringApplicationConfiguration(HttpTunnelIntegrationTest.Config.class)
@WebIntegrationTest @WebIntegrationTest
public class HttpTunnelIntegrationTest { public class HttpTunnelIntegrationTest {

@ -422,7 +422,7 @@ and then inject the actual ('`local`') port as a `@Value`. For example:
[source,java,indent=0,subs="verbatim,quotes,attributes"] [source,java,indent=0,subs="verbatim,quotes,attributes"]
---- ----
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleDataJpaApplication.class) @SpringApplicationConfiguration(SampleDataJpaApplication.class)
@WebIntegrationTest("server.port:0") @WebIntegrationTest("server.port:0")
public class CityRepositoryIntegrationTests { public class CityRepositoryIntegrationTests {

@ -3462,7 +3462,7 @@ For example:
[source,java,indent=0,subs="verbatim,quotes,attributes"] [source,java,indent=0,subs="verbatim,quotes,attributes"]
---- ----
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleDataJpaApplication.class) @SpringApplicationConfiguration(SampleDataJpaApplication.class)
public class CityRepositoryIntegrationTests { public class CityRepositoryIntegrationTests {
@Autowired @Autowired
@ -3487,7 +3487,7 @@ interaction. For example:
[source,java,indent=0,subs="verbatim,quotes,attributes"] [source,java,indent=0,subs="verbatim,quotes,attributes"]
---- ----
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleDataJpaApplication.class) @SpringApplicationConfiguration(SampleDataJpaApplication.class)
@WebIntegrationTest @WebIntegrationTest
public class CityRepositoryIntegrationTests { public class CityRepositoryIntegrationTests {
@ -3514,7 +3514,7 @@ in order to run your integration tests using random ports. For example:
[source,java,indent=0,subs="verbatim,quotes,attributes"] [source,java,indent=0,subs="verbatim,quotes,attributes"]
---- ----
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = MyApplication.class) @SpringApplicationConfiguration(MyApplication.class)
@WebIntegrationTest({"server.port=0", "management.port=0"}) @WebIntegrationTest({"server.port=0", "management.port=0"})
public class SomeIntegrationTests { public class SomeIntegrationTests {

@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat; import static org.junit.Assert.assertThat;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = HelloWebSecurityApplication.class) @SpringApplicationConfiguration(HelloWebSecurityApplication.class)
@WebIntegrationTest(randomPort = true) @WebIntegrationTest(randomPort = true)
public class HelloWebSecurityApplicationTests { public class HelloWebSecurityApplicationTests {

@ -34,7 +34,7 @@ import static org.junit.Assert.assertTrue;
* @author Eddú Meléndez * @author Eddú Meléndez
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = { SampleActiveMQApplication.class }) @SpringApplicationConfiguration(SampleActiveMQApplication.class)
public class SampleActiveMqTests { public class SampleActiveMqTests {
@Rule @Rule

@ -39,7 +39,7 @@ import static org.junit.Assert.assertNotNull;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleActuatorLog4JApplication.class) @SpringApplicationConfiguration(SampleActuatorLog4JApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port=0") @IntegrationTest("server.port=0")
@DirtiesContext @DirtiesContext

@ -38,7 +38,7 @@ import static org.junit.Assert.assertEquals;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleActuatorLog4J2Application.class) @SpringApplicationConfiguration(SampleActuatorLog4J2Application.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port=0") @IntegrationTest("server.port=0")
@DirtiesContext @DirtiesContext

@ -33,7 +33,7 @@ import static org.junit.Assert.assertNotNull;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleActuatorNoWebApplication.class) @SpringApplicationConfiguration(SampleActuatorNoWebApplication.class)
@DirtiesContext @DirtiesContext
public class SampleActuatorNoWebApplicationTests { public class SampleActuatorNoWebApplicationTests {

@ -38,7 +38,7 @@ import static org.junit.Assert.assertEquals;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleActuatorUiApplication.class) @SpringApplicationConfiguration(SampleActuatorUiApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest({ "server.port=0", "management.port:0" }) @IntegrationTest({ "server.port=0", "management.port:0" })
@DirtiesContext @DirtiesContext

@ -44,7 +44,7 @@ import static org.junit.Assert.assertTrue;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleActuatorUiApplication.class) @SpringApplicationConfiguration(SampleActuatorUiApplication.class)
@IntegrationTest("server.port=0") @IntegrationTest("server.port=0")
@WebAppConfiguration @WebAppConfiguration
@DirtiesContext @DirtiesContext

@ -42,7 +42,7 @@ import static org.junit.Assert.assertTrue;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleActuatorApplication.class) @SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port=0") @IntegrationTest("server.port=0")
@DirtiesContext @DirtiesContext

@ -41,7 +41,7 @@ import static org.junit.Assert.assertTrue;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleActuatorApplication.class) @SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest({ "server.port=0", "management.port=0", "management.address=127.0.0.1", @IntegrationTest({ "server.port=0", "management.port=0", "management.address=127.0.0.1",
"management.context-path:/admin" }) "management.context-path:/admin" })

@ -40,7 +40,7 @@ import static org.junit.Assert.assertTrue;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleActuatorApplication.class) @SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest({ "server.port=0", "management.context_path=/admin" }) @IntegrationTest({ "server.port=0", "management.context_path=/admin" })
@DirtiesContext @DirtiesContext

@ -41,7 +41,7 @@ import static org.junit.Assert.assertTrue;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleActuatorApplication.class) @SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest({ "server.port=0", "management.port=0" }) @IntegrationTest({ "server.port=0", "management.port=0" })
@DirtiesContext @DirtiesContext

@ -40,7 +40,7 @@ import static org.junit.Assert.assertEquals;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleActuatorApplication.class) @SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest({ "server.port=0", "management.port=-1" }) @IntegrationTest({ "server.port=0", "management.port=-1" })
@DirtiesContext @DirtiesContext

@ -37,7 +37,7 @@ import static org.junit.Assert.assertFalse;
* @author Phillip Webb * @author Phillip Webb
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleActuatorApplication.class) @SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest({ "server.port=0", "endpoints.health.sensitive=false" }) @IntegrationTest({ "server.port=0", "endpoints.health.sensitive=false" })
@DirtiesContext @DirtiesContext

@ -49,7 +49,7 @@ import static org.junit.Assert.assertTrue;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleActuatorApplication.class) @SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port=0") @IntegrationTest("server.port=0")
@DirtiesContext @DirtiesContext

@ -40,7 +40,7 @@ import static org.junit.Assert.assertTrue;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleActuatorApplication.class) @SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest({ "server.port=0", "server.servletPath=/spring" }) @IntegrationTest({ "server.port=0", "server.servletPath=/spring" })
@DirtiesContext @DirtiesContext

@ -40,7 +40,7 @@ import static org.junit.Assert.assertFalse;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleActuatorApplication.class) @SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest({ "server.port:0", "security.basic.enabled:false", @IntegrationTest({ "server.port:0", "security.basic.enabled:false",
"server.servletPath:/spring" }) "server.servletPath:/spring" })

@ -41,7 +41,7 @@ import static org.junit.Assert.assertTrue;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleActuatorApplication.class) @SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port=0") @IntegrationTest("server.port=0")
@DirtiesContext @DirtiesContext

@ -42,7 +42,7 @@ import static org.junit.Assert.assertTrue;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleActuatorApplication.class) @SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest({ "server.port:0", "management.security.enabled:false" }) @IntegrationTest({ "server.port:0", "management.security.enabled:false" })
@DirtiesContext @DirtiesContext

@ -40,7 +40,7 @@ import static org.junit.Assert.assertFalse;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleActuatorApplication.class) @SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest({ "server.port:0", "security.basic.enabled:false" }) @IntegrationTest({ "server.port:0", "security.basic.enabled:false" })
@DirtiesContext @DirtiesContext

@ -47,7 +47,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat; import static org.junit.Assert.assertThat;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleAtmosphereApplication.class) @SpringApplicationConfiguration(SampleAtmosphereApplication.class)
@WebIntegrationTest(randomPort = true) @WebIntegrationTest(randomPort = true)
@DirtiesContext @DirtiesContext
public class SampleAtmosphereApplicationTests { public class SampleAtmosphereApplicationTests {

@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.is;
import static org.hamcrest.core.IsNull.notNullValue; import static org.hamcrest.core.IsNull.notNullValue;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = { SampleCacheApplication.class }) @SpringApplicationConfiguration(SampleCacheApplication.class)
public class SampleCacheApplicationTests { public class SampleCacheApplicationTests {
@Autowired @Autowired

@ -42,7 +42,7 @@ import static org.junit.Assert.assertTrue;
* @author John Blum * @author John Blum
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleDataGemFireApplication.class) @SpringApplicationConfiguration(SampleDataGemFireApplication.class)
public class SampleDataGemFireApplicationTests { public class SampleDataGemFireApplicationTests {
@Autowired @Autowired

@ -45,7 +45,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleDataJpaApplication.class) @SpringApplicationConfiguration(SampleDataJpaApplication.class)
@WebAppConfiguration @WebAppConfiguration
// Enable JMX so we can test the MBeans (you can't do this in a properties file) // Enable JMX so we can test the MBeans (you can't do this in a properties file)
@TestPropertySource(properties = { "spring.jmx.enabled:true", @TestPropertySource(properties = { "spring.jmx.enabled:true",

@ -36,7 +36,7 @@ import static org.junit.Assert.assertThat;
* @author Oliver Gierke * @author Oliver Gierke
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleDataJpaApplication.class) @SpringApplicationConfiguration(SampleDataJpaApplication.class)
public class CityRepositoryIntegrationTests { public class CityRepositoryIntegrationTests {
@Autowired @Autowired

@ -44,7 +44,7 @@ import static org.junit.Assert.assertThat;
* @author Oliver Gierke * @author Oliver Gierke
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleDataJpaApplication.class) @SpringApplicationConfiguration(SampleDataJpaApplication.class)
public class HotelRepositoryIntegrationTests { public class HotelRepositoryIntegrationTests {
@Autowired @Autowired

@ -33,7 +33,7 @@ import static org.junit.Assert.assertTrue;
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleMongoApplication.class) @SpringApplicationConfiguration(SampleMongoApplication.class)
@IntegrationTest @IntegrationTest
public class SampleMongoApplicationTests { public class SampleMongoApplicationTests {

@ -44,7 +44,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleDataRestApplication.class) @SpringApplicationConfiguration(SampleDataRestApplication.class)
@WebAppConfiguration @WebAppConfiguration
@ActiveProfiles("scratch") @ActiveProfiles("scratch")
// Separate profile for web tests to avoid clashing databases // Separate profile for web tests to avoid clashing databases

@ -40,7 +40,7 @@ import static org.junit.Assert.assertThat;
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleDataRestApplication.class) @SpringApplicationConfiguration(SampleDataRestApplication.class)
public class CityRepositoryIntegrationTests { public class CityRepositoryIntegrationTests {
@Autowired @Autowired

@ -26,7 +26,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleFlywayApplication.class) @SpringApplicationConfiguration(SampleFlywayApplication.class)
public class SampleFlywayApplicationTests { public class SampleFlywayApplicationTests {
@Autowired @Autowired

@ -35,7 +35,7 @@ import static org.hamcrest.Matchers.startsWith;
import static org.junit.Assert.assertThat; import static org.junit.Assert.assertThat;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleHateoasApplication.class) @SpringApplicationConfiguration(SampleHateoasApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port:0") @IntegrationTest("server.port:0")
@DirtiesContext @DirtiesContext

@ -35,7 +35,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleHypermediaGsonApplication.class) @SpringApplicationConfiguration(SampleHypermediaGsonApplication.class)
@WebAppConfiguration @WebAppConfiguration
@TestPropertySource(properties = "endpoints.health.sensitive: false") @TestPropertySource(properties = "endpoints.health.sensitive: false")
public class SampleHypermediaGsonApplicationTests { public class SampleHypermediaGsonApplicationTests {

@ -37,7 +37,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleHypermediaJpaApplication.class) @SpringApplicationConfiguration(SampleHypermediaJpaApplication.class)
@WebAppConfiguration @WebAppConfiguration
@DirtiesContext @DirtiesContext
public class SampleHypermediaJpaApplicationIntegrationTests { public class SampleHypermediaJpaApplicationIntegrationTests {

@ -23,7 +23,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.context.web.WebAppConfiguration;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleHypermediaJpaApplication.class) @SpringApplicationConfiguration(SampleHypermediaJpaApplication.class)
@WebAppConfiguration @WebAppConfiguration
public class SampleHypermediaJpaApplicationTests { public class SampleHypermediaJpaApplicationTests {

@ -36,7 +36,7 @@ import org.springframework.test.context.web.WebAppConfiguration;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleHypermediaUiApplication.class) @SpringApplicationConfiguration(SampleHypermediaUiApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest({ "management.context-path=", "server.port=0" }) @IntegrationTest({ "management.context-path=", "server.port=0" })
public class SampleHypermediaUiApplicationTests { public class SampleHypermediaUiApplicationTests {

@ -36,7 +36,7 @@ import org.springframework.test.context.web.WebAppConfiguration;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleHypermediaApplication.class) @SpringApplicationConfiguration(SampleHypermediaApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port=0") @IntegrationTest("server.port=0")
public class SampleHypermediaApplicationHomePageTests { public class SampleHypermediaApplicationHomePageTests {

@ -31,7 +31,7 @@ import org.springframework.web.client.RestTemplate;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleJerseyApplication.class) @SpringApplicationConfiguration(SampleJerseyApplication.class)
@IntegrationTest("server.port=0") @IntegrationTest("server.port=0")
@WebAppConfiguration @WebAppConfiguration
public class SampleJerseyApplicationTests { public class SampleJerseyApplicationTests {

@ -28,7 +28,7 @@ import org.springframework.test.context.web.WebAppConfiguration;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleJersey1Application.class) @SpringApplicationConfiguration(SampleJersey1Application.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port:0") @IntegrationTest("server.port:0")
public class SampleJersey1ApplicationTests { public class SampleJersey1ApplicationTests {

@ -42,7 +42,7 @@ import static org.junit.Assert.assertEquals;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleJettySslApplication.class) @SpringApplicationConfiguration(SampleJettySslApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port:0") @IntegrationTest("server.port:0")
@DirtiesContext @DirtiesContext

@ -46,7 +46,7 @@ import static org.junit.Assert.assertEquals;
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleJettyApplication.class) @SpringApplicationConfiguration(SampleJettyApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port:0") @IntegrationTest("server.port:0")
@DirtiesContext @DirtiesContext

@ -42,7 +42,7 @@ import static org.junit.Assert.assertEquals;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleJetty8SslApplication.class) @SpringApplicationConfiguration(SampleJetty8SslApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port:0") @IntegrationTest("server.port:0")
@DirtiesContext @DirtiesContext

@ -46,7 +46,7 @@ import static org.junit.Assert.assertEquals;
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleJetty8Application.class) @SpringApplicationConfiguration(SampleJetty8Application.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port:0") @IntegrationTest("server.port:0")
@DirtiesContext @DirtiesContext

@ -46,7 +46,7 @@ import static org.junit.Assert.assertEquals;
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleJetty93Application.class) @SpringApplicationConfiguration(SampleJetty93Application.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port:0") @IntegrationTest("server.port:0")
@DirtiesContext @DirtiesContext

@ -38,7 +38,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleJpaApplication.class) @SpringApplicationConfiguration(SampleJpaApplication.class)
@WebAppConfiguration @WebAppConfiguration
public class SampleJpaApplicationTests { public class SampleJpaApplicationTests {

@ -34,7 +34,7 @@ import static org.junit.Assert.assertEquals;
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleJpaApplication.class) @SpringApplicationConfiguration(SampleJpaApplication.class)
public class JpaNoteRepositoryIntegrationTests { public class JpaNoteRepositoryIntegrationTests {
@Autowired @Autowired

@ -34,7 +34,7 @@ import static org.junit.Assert.assertEquals;
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleJpaApplication.class) @SpringApplicationConfiguration(SampleJpaApplication.class)
public class JpaTagRepositoryIntegrationTests { public class JpaTagRepositoryIntegrationTests {
@Autowired @Autowired

@ -36,7 +36,7 @@ import static org.junit.Assert.assertEquals;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleDropwizardMetricsApplication.class) @SpringApplicationConfiguration(SampleDropwizardMetricsApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port=0") @IntegrationTest("server.port=0")
@DirtiesContext @DirtiesContext

@ -30,7 +30,7 @@ import org.springframework.test.context.web.WebAppConfiguration;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleOpenTsdbExportApplication.class) @SpringApplicationConfiguration(SampleOpenTsdbExportApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port=0") @IntegrationTest("server.port=0")
@DirtiesContext @DirtiesContext

@ -30,7 +30,7 @@ import org.springframework.test.context.web.WebAppConfiguration;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleRedisExportApplication.class) @SpringApplicationConfiguration(SampleRedisExportApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest({ "server.port=0", "spring.jmx.enabled=true" }) @IntegrationTest({ "server.port=0", "spring.jmx.enabled=true" })
@DirtiesContext @DirtiesContext

@ -41,7 +41,7 @@ import static org.springframework.test.web.servlet.setup.MockMvcBuilders.webAppC
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration @WebAppConfiguration
@SpringApplicationConfiguration(classes = SampleSecureOAuth2Application.class) @SpringApplicationConfiguration(SampleSecureOAuth2Application.class)
@IntegrationTest("server.port:0") @IntegrationTest("server.port:0")
public class SampleSecureOAuth2ApplicationTests { public class SampleSecureOAuth2ApplicationTests {

@ -43,7 +43,7 @@ import static org.junit.Assert.assertEquals;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = { SampleSecureApplication.class, @SpringApplicationConfiguration({ SampleSecureApplication.class,
TestConfiguration.class }) TestConfiguration.class })
public class SampleSecureApplicationTests { public class SampleSecureApplicationTests {

@ -38,7 +38,7 @@ import static org.junit.Assert.assertEquals;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleServletApplication.class) @SpringApplicationConfiguration(SampleServletApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port:0") @IntegrationTest("server.port:0")
@DirtiesContext @DirtiesContext

@ -32,7 +32,7 @@ import static org.junit.Assert.assertTrue;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleSimpleApplication.class) @SpringApplicationConfiguration(SampleSimpleApplication.class)
public class SpringTestSampleSimpleApplicationTests { public class SpringTestSampleSimpleApplicationTests {
@Autowired @Autowired

@ -34,7 +34,7 @@ import static org.testng.Assert.assertEquals;
* *
* @author Phillip Webb * @author Phillip Webb
*/ */
@SpringApplicationConfiguration(classes = SampleTestNGApplication.class) @SpringApplicationConfiguration(SampleTestNGApplication.class)
@WebIntegrationTest("server.port:0") @WebIntegrationTest("server.port:0")
@DirtiesContext @DirtiesContext
public class SampleTestNGApplicationTests extends AbstractTestNGSpringContextTests { public class SampleTestNGApplicationTests extends AbstractTestNGSpringContextTests {

@ -38,7 +38,7 @@ import static org.junit.Assert.assertTrue;
* @author Phillip Webb * @author Phillip Webb
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleTomcatJspApplication.class) @SpringApplicationConfiguration(SampleTomcatJspApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port:0") @IntegrationTest("server.port:0")
@DirtiesContext @DirtiesContext

@ -51,7 +51,7 @@ import static org.junit.Assert.assertEquals;
* @author Brock Mills * @author Brock Mills
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleTomcatTwoConnectorsApplication.class) @SpringApplicationConfiguration(SampleTomcatTwoConnectorsApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port=0") @IntegrationTest("server.port=0")
@DirtiesContext @DirtiesContext

@ -39,7 +39,7 @@ import sample.tomcat.ssl.SampleTomcatSslApplication;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleTomcatSslApplication.class) @SpringApplicationConfiguration(SampleTomcatSslApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port:0") @IntegrationTest("server.port:0")
@DirtiesContext @DirtiesContext

@ -50,7 +50,7 @@ import static org.junit.Assert.assertEquals;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = NonAutoConfigurationSampleTomcatApplication.class) @SpringApplicationConfiguration(NonAutoConfigurationSampleTomcatApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port=0") @IntegrationTest("server.port=0")
@DirtiesContext @DirtiesContext

@ -45,7 +45,7 @@ import static org.junit.Assert.assertEquals;
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleTomcatApplication.class) @SpringApplicationConfiguration(SampleTomcatApplication.class)
@WebIntegrationTest(randomPort = true) @WebIntegrationTest(randomPort = true)
@DirtiesContext @DirtiesContext
public class SampleTomcatApplicationTests { public class SampleTomcatApplicationTests {

@ -38,7 +38,7 @@ import static org.junit.Assert.assertTrue;
* @author Phillip Webb * @author Phillip Webb
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleTomcat7JspApplication.class) @SpringApplicationConfiguration(SampleTomcat7JspApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port:0") @IntegrationTest("server.port:0")
@DirtiesContext @DirtiesContext

@ -37,7 +37,7 @@ import static org.junit.Assert.assertTrue;
* @author Dave Syer * @author Dave Syer
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleTraditionalApplication.class) @SpringApplicationConfiguration(SampleTraditionalApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port:0") @IntegrationTest("server.port:0")
@DirtiesContext @DirtiesContext

@ -42,7 +42,7 @@ import static org.junit.Assert.assertEquals;
* @author Ivan Sopov * @author Ivan Sopov
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleUndertowSslApplication.class) @SpringApplicationConfiguration(SampleUndertowSslApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port:0") @IntegrationTest("server.port:0")
@DirtiesContext @DirtiesContext

@ -46,7 +46,7 @@ import static org.junit.Assert.assertEquals;
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleUndertowApplication.class) @SpringApplicationConfiguration(SampleUndertowApplication.class)
@WebAppConfiguration @WebAppConfiguration
@IntegrationTest("server.port:0") @IntegrationTest("server.port:0")
@DirtiesContext @DirtiesContext

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save