Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
6534047f
Commit
6534047f
authored
Sep 17, 2019
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rework test slice annotation javadoc to reflect JUnit 5 default
Closes gh-18178
parent
0a2ae894
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
51 additions
and
31 deletions
+51
-31
DataJdbcTest.java
...ework/boot/test/autoconfigure/data/jdbc/DataJdbcTest.java
+4
-2
DataLdapTest.java
...ework/boot/test/autoconfigure/data/ldap/DataLdapTest.java
+4
-2
DataMongoTest.java
...ork/boot/test/autoconfigure/data/mongo/DataMongoTest.java
+4
-2
DataNeo4jTest.java
...ork/boot/test/autoconfigure/data/neo4j/DataNeo4jTest.java
+4
-2
DataRedisTest.java
...ork/boot/test/autoconfigure/data/redis/DataRedisTest.java
+5
-3
JdbcTest.java
...pringframework/boot/test/autoconfigure/jdbc/JdbcTest.java
+5
-4
JooqTest.java
...pringframework/boot/test/autoconfigure/jooq/JooqTest.java
+4
-3
JsonTest.java
...pringframework/boot/test/autoconfigure/json/JsonTest.java
+4
-3
DataJpaTest.java
...ramework/boot/test/autoconfigure/orm/jpa/DataJpaTest.java
+4
-3
RestClientTest.java
...rk/boot/test/autoconfigure/web/client/RestClientTest.java
+5
-3
WebFluxTest.java
...ork/boot/test/autoconfigure/web/reactive/WebFluxTest.java
+4
-2
WebMvcTest.java
...ework/boot/test/autoconfigure/web/servlet/WebMvcTest.java
+4
-2
No files found.
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/jdbc/DataJdbcTest.java
View file @
6534047f
...
...
@@ -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
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/ldap/DataLdapTest.java
View file @
6534047f
...
...
@@ -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
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTest.java
View file @
6534047f
...
...
@@ -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
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/neo4j/DataNeo4jTest.java
View file @
6534047f
...
...
@@ -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
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/redis/DataRedisTest.java
View file @
6534047f
...
...
@@ -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
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/JdbcTest.java
View file @
6534047f
...
...
@@ -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
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jooq/JooqTest.java
View file @
6534047f
...
...
@@ -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
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/json/JsonTest.java
View file @
6534047f
...
...
@@ -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
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/orm/jpa/DataJpaTest.java
View file @
6534047f
...
...
@@ -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
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/client/RestClientTest.java
View file @
6534047f
...
...
@@ -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
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/reactive/WebFluxTest.java
View file @
6534047f
...
...
@@ -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
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTest.java
View file @
6534047f
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment