Rework test slice annotation javadoc to reflect JUnit 5 default

Closes gh-18178
pull/18270/head
Andy Wilkinson 5 years ago
parent 0a2ae89470
commit 6534047fcf

@ -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 <strong>only</strong> on
* Annotation that can be used for a Data JDBC test that focuses <strong>only</strong> on
* Data JDBC components.
* <p>
* 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.
* <p>
* When using JUnit 4, this annotation should be used in combination with
* {@code @RunWith(SpringRunner.class)}.
*
* @author Andy Wilkinson
* @since 2.1.0

@ -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 <strong>only</strong> on LDAP
* Annotation that can be used for an LDAP test that focuses <strong>only</strong> on LDAP
* components.
* <p>
* Using this annotation will disable full auto-configuration and instead apply only
@ -46,6 +45,9 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
* <p>
* By default, tests annotated with {@code @DataLdapTest} will use an embedded in-memory
* LDAP process (if available).
* <p>
* When using JUnit 4, this annotation should be used in combination with
* {@code @RunWith(SpringRunner.class)}.
*
* @author Eddú Meléndez
* @author Artsiom Yudovin

@ -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 <strong>only</strong> on
* Annotation that can be used for a MongoDB test that focuses <strong>only</strong> on
* MongoDB components.
* <p>
* Using this annotation will disable full auto-configuration and instead apply only
@ -46,6 +45,9 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
* <p>
* By default, tests annotated with {@code @DataMongoTest} will use an embedded in-memory
* MongoDB process (if available).
* <p>
* When using JUnit 4, this annotation should be used in combination with
* {@code @RunWith(SpringRunner.class)}.
*
* @author Michael Simons
* @author Stephane Nicoll

@ -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 <strong>only</strong> on
* Annotation that can be used for a Neo4j test that focuses <strong>only</strong> on
* Neo4j components.
* <p>
* 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).
* <p>
* When using JUnit 4, this annotation should be used in combination with
* {@code @RunWith(SpringRunner.class)}.
*
* @author Eddú Meléndez
* @author Stephane Nicoll

@ -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 <strong>only</strong> on
* Redis components.
* Annotation for a Data Redis test that focuses <strong>only</strong> on Redis
* components.
* <p>
* Using this annotation will disable full auto-configuration and instead apply only
* configuration relevant to Redis tests.
* <p>
* When using JUnit 4, this annotation should be used in combination with
* {@code @RunWith(SpringRunner.class)}.
*
* @author Jayaram Pradhan
* @author Artsiom Yudovin

@ -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 <strong>only</strong> on
* jdbc-based components.
* Annotation for a JDBC test that focuses <strong>only</strong> on JDBC-based components.
* <p>
* Using this annotation will disable full auto-configuration and instead apply only
* configuration relevant to jdbc tests.
* configuration relevant to JDBC tests.
* <p>
* 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.
* <p>
* When using JUnit 4, this annotation should be used in combination with
* {@code @RunWith(SpringRunner.class)}.
*
* @author Stephane Nicoll
* @author Artsiom Yudovin

@ -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 <strong>only</strong> on
* jOOQ-based components.
* Annotation for a jOOQ test that focuses <strong>only</strong> on jOOQ-based components.
* <p>
* 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.
* <p>
* When using JUnit 4, this annotation should be used in combination with
* {@code @RunWith(SpringRunner.class)}.
*
* @author Michael Simons
* @author Stephane Nicoll

@ -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 <strong>only</strong> on JSON
* serialization.
* Annotation for a JSON test that focuses <strong>only</strong> on JSON serialization.
* <p>
* 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.
* <p>
* When using JUnit 4, this annotation should be used in combination with
* {@code @RunWith(SpringRunner.class)}.
*
* @author Phillip Webb
* @author Artsiom Yudovin

@ -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 <strong>only</strong> on JPA
* components.
* Annotation for a JPA test that focuses <strong>only</strong> on JPA components.
* <p>
* 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.
* <p>
* When using JUnit 4, this annotation should be used in combination with
* {@code @RunWith(SpringRunner.class)}.
*
* @author Phillip Webb
* @author Artsiom Yudovin

@ -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
* <strong>only</strong> on beans that use {@link RestTemplateBuilder}.
* Annotation for a Spring rest client test that focuses <strong>only</strong> on beans
* that use {@link RestTemplateBuilder}.
* <p>
* 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)}.
* <p>
* When using JUnit 4, this annotation should be used in combination with
* {@code @RunWith(SpringRunner.class)}.
*
* @author Stephane Nicoll
* @author Phillip Webb

@ -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
* <strong>only</strong> on Spring WebFlux components.
* <p>
* 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.
* <p>
* When using JUnit 4, this annotation should be used in combination with
* {@code @RunWith(SpringRunner.class)}.
*
* @author Stephane Nicoll
* @author Artsiom Yudovin

@ -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 <strong>only</strong> on
* Annotation that can be used for a Spring MVC test that focuses <strong>only</strong> on
* Spring MVC components.
* <p>
* 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.
* <p>
* When using JUnit 4, this annotation should be used in combination with
* {@code @RunWith(SpringRunner.class)}.
*
* @author Phillip Webb
* @author Artsiom Yudovin

Loading…
Cancel
Save