diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/jdbc/DataJdbcTest.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/jdbc/DataJdbcTest.java index b50c2ca0e3..be7d58b20b 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/jdbc/DataJdbcTest.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/jdbc/DataJdbcTest.java @@ -40,8 +40,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.transaction.annotation.Transactional; /** - * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)} - * for a typical Data JDBC test. Can be used when a test focuses only on + * Annotation that can be used for a Data JDBC test that focuses only on * Data JDBC components. *
* Using this annotation will disable full auto-configuration and instead apply only @@ -57,6 +56,9 @@ import org.springframework.transaction.annotation.Transactional; * database, you should consider {@link SpringBootTest @SpringBootTest} combined with * {@link AutoConfigureTestDatabase @AutoConfigureTestDatabase} rather than this * annotation. + *
+ * When using JUnit 4, this annotation should be used in combination with + * {@code @RunWith(SpringRunner.class)}. * * @author Andy Wilkinson * @since 2.1.0 diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/ldap/DataLdapTest.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/ldap/DataLdapTest.java index d9e1c8645c..5f27b47072 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/ldap/DataLdapTest.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/ldap/DataLdapTest.java @@ -37,8 +37,7 @@ import org.springframework.test.context.BootstrapWith; import org.springframework.test.context.junit.jupiter.SpringExtension; /** - * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)} - * for a typical LDAP test. Can be used when a test focuses only on LDAP + * Annotation that can be used for an LDAP test that focuses only on LDAP * components. *
* Using this annotation will disable full auto-configuration and instead apply only @@ -46,6 +45,9 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; *
* By default, tests annotated with {@code @DataLdapTest} will use an embedded in-memory * LDAP process (if available). + *
+ * When using JUnit 4, this annotation should be used in combination with + * {@code @RunWith(SpringRunner.class)}. * * @author Eddú Meléndez * @author Artsiom Yudovin diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTest.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTest.java index 5c4eaa2dbb..ea3308db0b 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTest.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTest.java @@ -37,8 +37,7 @@ import org.springframework.test.context.BootstrapWith; import org.springframework.test.context.junit.jupiter.SpringExtension; /** - * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)} - * for a typical MongoDB test. Can be used when a test focuses only on + * Annotation that can be used for a MongoDB test that focuses only on * MongoDB components. *
* Using this annotation will disable full auto-configuration and instead apply only @@ -46,6 +45,9 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; *
* By default, tests annotated with {@code @DataMongoTest} will use an embedded in-memory * MongoDB process (if available). + *
+ * When using JUnit 4, this annotation should be used in combination with + * {@code @RunWith(SpringRunner.class)}. * * @author Michael Simons * @author Stephane Nicoll diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/neo4j/DataNeo4jTest.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/neo4j/DataNeo4jTest.java index 22b1094936..24e980506b 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/neo4j/DataNeo4jTest.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/neo4j/DataNeo4jTest.java @@ -38,8 +38,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.transaction.annotation.Transactional; /** - * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)} - * for a typical Neo4j test. Can be used when a test focuses only on + * Annotation that can be used for a Neo4j test that focuses only on * Neo4j components. *
* Using this annotation will disable full auto-configuration and instead apply only @@ -48,6 +47,9 @@ import org.springframework.transaction.annotation.Transactional; * By default, tests annotated with {@code @DataNeo4jTest} will use an embedded in-memory * Neo4j process (if available). They will also be transactional with the usual * test-related semantics (i.e. rollback by default). + *
+ * When using JUnit 4, this annotation should be used in combination with + * {@code @RunWith(SpringRunner.class)}. * * @author Eddú Meléndez * @author Stephane Nicoll diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/redis/DataRedisTest.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/redis/DataRedisTest.java index 8ffb5d6803..c15520ae96 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/redis/DataRedisTest.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/redis/DataRedisTest.java @@ -37,12 +37,14 @@ import org.springframework.test.context.BootstrapWith; import org.springframework.test.context.junit.jupiter.SpringExtension; /** - * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)} - * for a typical Data Redis test. Can be used when a test focuses only on - * Redis components. + * Annotation for a Data Redis test that focuses only on Redis + * components. *
* Using this annotation will disable full auto-configuration and instead apply only * configuration relevant to Redis tests. + *
+ * When using JUnit 4, this annotation should be used in combination with + * {@code @RunWith(SpringRunner.class)}. * * @author Jayaram Pradhan * @author Artsiom Yudovin diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/JdbcTest.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/JdbcTest.java index 12fc220676..fa92db4e51 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/JdbcTest.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/JdbcTest.java @@ -39,12 +39,10 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.transaction.annotation.Transactional; /** - * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)} - * for a typical jdbc test. Can be used when a test focuses only on - * jdbc-based components. + * Annotation for a JDBC test that focuses only on JDBC-based components. *
* Using this annotation will disable full auto-configuration and instead apply only - * configuration relevant to jdbc tests. + * configuration relevant to JDBC tests. *
* By default, tests annotated with {@code @JdbcTest} are transactional and roll back at * the end of each test. They also use an embedded in-memory database (replacing any @@ -56,6 +54,9 @@ import org.springframework.transaction.annotation.Transactional; * database, you should consider {@link SpringBootTest @SpringBootTest} combined with * {@link AutoConfigureTestDatabase @AutoConfigureTestDatabase} rather than this * annotation. + *
+ * When using JUnit 4, this annotation should be used in combination with + * {@code @RunWith(SpringRunner.class)}. * * @author Stephane Nicoll * @author Artsiom Yudovin diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jooq/JooqTest.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jooq/JooqTest.java index 0daa7646a4..67e09df207 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jooq/JooqTest.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jooq/JooqTest.java @@ -39,9 +39,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.transaction.annotation.Transactional; /** - * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)} - * for a typical jOOQ test. Can be used when a test focuses only on - * jOOQ-based components. + * Annotation for a jOOQ test that focuses only on jOOQ-based components. *
* Using this annotation will disable full auto-configuration and instead apply only * configuration relevant to jOOQ tests. @@ -50,6 +48,9 @@ import org.springframework.transaction.annotation.Transactional; * want to replace any explicit or usually auto-configured DataSource by an embedded * in-memory database, the {@link AutoConfigureTestDatabase @AutoConfigureTestDatabase} * annotation can be used to override these settings. + *
+ * When using JUnit 4, this annotation should be used in combination with + * {@code @RunWith(SpringRunner.class)}. * * @author Michael Simons * @author Stephane Nicoll diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/json/JsonTest.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/json/JsonTest.java index 818142fff8..638a66c8d5 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/json/JsonTest.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/json/JsonTest.java @@ -40,9 +40,7 @@ import org.springframework.test.context.BootstrapWith; import org.springframework.test.context.junit.jupiter.SpringExtension; /** - * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)} - * for a typical JSON test. Can be used when a test focuses only on JSON - * serialization. + * Annotation for a JSON test that focuses only on JSON serialization. *
* Using this annotation will disable full auto-configuration and instead apply only * configuration relevant to JSON tests (i.e. {@code @JsonComponent}, Jackson @@ -52,6 +50,9 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; * {@link JacksonTester}, {@link JsonbTester} and {@link GsonTester} fields. More * fine-grained control can be provided via the * {@link AutoConfigureJsonTesters @AutoConfigureJsonTesters} annotation. + *
+ * When using JUnit 4, this annotation should be used in combination with + * {@code @RunWith(SpringRunner.class)}. * * @author Phillip Webb * @author Artsiom Yudovin diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/orm/jpa/DataJpaTest.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/orm/jpa/DataJpaTest.java index e9e2961a5b..7534c4fc5e 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/orm/jpa/DataJpaTest.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/orm/jpa/DataJpaTest.java @@ -41,9 +41,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.transaction.annotation.Transactional; /** - * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)} - * for a typical JPA test. Can be used when a test focuses only on JPA - * components. + * Annotation for a JPA test that focuses only on JPA components. *
* Using this annotation will disable full auto-configuration and instead apply only * configuration relevant to JPA tests. @@ -58,6 +56,9 @@ import org.springframework.transaction.annotation.Transactional; * database, you should consider {@link SpringBootTest @SpringBootTest} combined with * {@link AutoConfigureTestDatabase @AutoConfigureTestDatabase} rather than this * annotation. + *
+ * When using JUnit 4, this annotation should be used in combination with + * {@code @RunWith(SpringRunner.class)}. * * @author Phillip Webb * @author Artsiom Yudovin diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/client/RestClientTest.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/client/RestClientTest.java index a9beeca7ee..b013d82804 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/client/RestClientTest.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/client/RestClientTest.java @@ -41,9 +41,8 @@ import org.springframework.test.web.client.MockRestServiceServer; import org.springframework.web.client.RestTemplate; /** - * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)} - * for a typical Spring rest client test. Can be used when a test focuses - * only on beans that use {@link RestTemplateBuilder}. + * Annotation for a Spring rest client test that focuses only on beans + * that use {@link RestTemplateBuilder}. *
* Using this annotation will disable full auto-configuration and instead apply only * configuration relevant to rest client tests (i.e. Jackson or GSON auto-configuration @@ -57,6 +56,9 @@ import org.springframework.web.client.RestTemplate; * If you are testing a bean that doesn't use {@link RestTemplateBuilder} but instead * injects a {@link RestTemplate} directly, you can add * {@code @AutoConfigureWebClient(registerRestTemplate=true)}. + *
+ * When using JUnit 4, this annotation should be used in combination with + * {@code @RunWith(SpringRunner.class)}. * * @author Stephane Nicoll * @author Phillip Webb diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/reactive/WebFluxTest.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/reactive/WebFluxTest.java index 1b16edcc84..ce45b2c8df 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/reactive/WebFluxTest.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/reactive/WebFluxTest.java @@ -42,8 +42,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.web.reactive.server.WebTestClient; /** - * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)} - * for a typical Spring WebFlux test. Can be used when a test focuses + * Annotation that can be used for a Spring WebFlux test that focuses * only on Spring WebFlux components. *
* Using this annotation will disable full auto-configuration and instead apply only @@ -64,6 +63,9 @@ import org.springframework.test.web.reactive.server.WebTestClient; * you should consider {@link SpringBootTest @SpringBootTest} combined with * {@link AutoConfigureWebTestClient @AutoConfigureWebTestClient} rather than this * annotation. + *
+ * When using JUnit 4, this annotation should be used in combination with + * {@code @RunWith(SpringRunner.class)}. * * @author Stephane Nicoll * @author Artsiom Yudovin diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTest.java b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTest.java index 29f3bc7a1f..a65b2c56cc 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTest.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTest.java @@ -41,8 +41,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.web.servlet.MockMvc; /** - * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)} - * for a typical Spring MVC test. Can be used when a test focuses only on + * Annotation that can be used for a Spring MVC test that focuses only on * Spring MVC components. *
* Using this annotation will disable full auto-configuration and instead apply only @@ -64,6 +63,9 @@ import org.springframework.test.web.servlet.MockMvc; * If you are looking to load your full application configuration and use MockMVC, you * should consider {@link SpringBootTest @SpringBootTest} combined with * {@link AutoConfigureMockMvc @AutoConfigureMockMvc} rather than this annotation. + *
+ * When using JUnit 4, this annotation should be used in combination with + * {@code @RunWith(SpringRunner.class)}. * * @author Phillip Webb * @author Artsiom Yudovin