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;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SpringBootHypermediaApplication.class)
@SpringApplicationConfiguration(SpringBootHypermediaApplication.class)
@WebAppConfiguration
@TestPropertySource(properties = { "spring.jackson.serialization.indent_output=true",
"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;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SpringBootHypermediaApplication.class)
@SpringApplicationConfiguration(SpringBootHypermediaApplication.class)
@WebAppConfiguration
@TestPropertySource(properties = { "spring.jackson.serialization.indent_output=true",
"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;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SpringBootHypermediaApplication.class)
@SpringApplicationConfiguration(SpringBootHypermediaApplication.class)
@WebAppConfiguration
@TestPropertySource(properties = "spring.jackson.serialization.indent_output=true")
@DirtiesContext

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -61,7 +61,7 @@ import static org.junit.Assert.assertEquals;
* @author Phillip Webb
*/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = HttpTunnelIntegrationTest.Config.class)
@SpringApplicationConfiguration(HttpTunnelIntegrationTest.Config.class)
@WebIntegrationTest
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"]
----
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleDataJpaApplication.class)
@SpringApplicationConfiguration(SampleDataJpaApplication.class)
@WebIntegrationTest("server.port:0")
public class CityRepositoryIntegrationTests {

@ -3462,7 +3462,7 @@ For example:
[source,java,indent=0,subs="verbatim,quotes,attributes"]
----
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleDataJpaApplication.class)
@SpringApplicationConfiguration(SampleDataJpaApplication.class)
public class CityRepositoryIntegrationTests {
@Autowired
@ -3487,7 +3487,7 @@ interaction. For example:
[source,java,indent=0,subs="verbatim,quotes,attributes"]
----
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleDataJpaApplication.class)
@SpringApplicationConfiguration(SampleDataJpaApplication.class)
@WebIntegrationTest
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"]
----
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = MyApplication.class)
@SpringApplicationConfiguration(MyApplication.class)
@WebIntegrationTest({"server.port=0", "management.port=0"})
public class SomeIntegrationTests {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -35,7 +35,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleHypermediaGsonApplication.class)
@SpringApplicationConfiguration(SampleHypermediaGsonApplication.class)
@WebAppConfiguration
@TestPropertySource(properties = "endpoints.health.sensitive: false")
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;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleHypermediaJpaApplication.class)
@SpringApplicationConfiguration(SampleHypermediaJpaApplication.class)
@WebAppConfiguration
@DirtiesContext
public class SampleHypermediaJpaApplicationIntegrationTests {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save