File tree 12 files changed +51
-31
lines changed
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure
12 files changed +51
-31
lines changed Original file line number Diff line number Diff line change 40
40
import org .springframework .transaction .annotation .Transactional ;
41
41
42
42
/**
43
- * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)}
44
- * for a typical Data JDBC test. Can be used when a test focuses <strong>only</strong> on
43
+ * Annotation that can be used for a Data JDBC test that focuses <strong>only</strong> on
45
44
* Data JDBC components.
46
45
* <p>
47
46
* Using this annotation will disable full auto-configuration and instead apply only
57
56
* database, you should consider {@link SpringBootTest @SpringBootTest} combined with
58
57
* {@link AutoConfigureTestDatabase @AutoConfigureTestDatabase} rather than this
59
58
* annotation.
59
+ * <p>
60
+ * When using JUnit 4, this annotation should be used in combination with
61
+ * {@code @RunWith(SpringRunner.class)}.
60
62
*
61
63
* @author Andy Wilkinson
62
64
* @since 2.1.0
Original file line number Diff line number Diff line change 37
37
import org .springframework .test .context .junit .jupiter .SpringExtension ;
38
38
39
39
/**
40
- * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)}
41
- * for a typical LDAP test. Can be used when a test focuses <strong>only</strong> on LDAP
40
+ * Annotation that can be used for an LDAP test that focuses <strong>only</strong> on LDAP
42
41
* components.
43
42
* <p>
44
43
* Using this annotation will disable full auto-configuration and instead apply only
45
44
* configuration relevant to LDAP tests.
46
45
* <p>
47
46
* By default, tests annotated with {@code @DataLdapTest} will use an embedded in-memory
48
47
* LDAP process (if available).
48
+ * <p>
49
+ * When using JUnit 4, this annotation should be used in combination with
50
+ * {@code @RunWith(SpringRunner.class)}.
49
51
*
50
52
* @author Eddú Meléndez
51
53
* @author Artsiom Yudovin
Original file line number Diff line number Diff line change 37
37
import org .springframework .test .context .junit .jupiter .SpringExtension ;
38
38
39
39
/**
40
- * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)}
41
- * for a typical MongoDB test. Can be used when a test focuses <strong>only</strong> on
40
+ * Annotation that can be used for a MongoDB test that focuses <strong>only</strong> on
42
41
* MongoDB components.
43
42
* <p>
44
43
* Using this annotation will disable full auto-configuration and instead apply only
45
44
* configuration relevant to MongoDB tests.
46
45
* <p>
47
46
* By default, tests annotated with {@code @DataMongoTest} will use an embedded in-memory
48
47
* MongoDB process (if available).
48
+ * <p>
49
+ * When using JUnit 4, this annotation should be used in combination with
50
+ * {@code @RunWith(SpringRunner.class)}.
49
51
*
50
52
* @author Michael Simons
51
53
* @author Stephane Nicoll
Original file line number Diff line number Diff line change 38
38
import org .springframework .transaction .annotation .Transactional ;
39
39
40
40
/**
41
- * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)}
42
- * for a typical Neo4j test. Can be used when a test focuses <strong>only</strong> on
41
+ * Annotation that can be used for a Neo4j test that focuses <strong>only</strong> on
43
42
* Neo4j components.
44
43
* <p>
45
44
* Using this annotation will disable full auto-configuration and instead apply only
48
47
* By default, tests annotated with {@code @DataNeo4jTest} will use an embedded in-memory
49
48
* Neo4j process (if available). They will also be transactional with the usual
50
49
* test-related semantics (i.e. rollback by default).
50
+ * <p>
51
+ * When using JUnit 4, this annotation should be used in combination with
52
+ * {@code @RunWith(SpringRunner.class)}.
51
53
*
52
54
* @author Eddú Meléndez
53
55
* @author Stephane Nicoll
Original file line number Diff line number Diff line change 37
37
import org .springframework .test .context .junit .jupiter .SpringExtension ;
38
38
39
39
/**
40
- * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)}
41
- * for a typical Data Redis test. Can be used when a test focuses <strong>only</strong> on
42
- * Redis components.
40
+ * Annotation for a Data Redis test that focuses <strong>only</strong> on Redis
41
+ * components.
43
42
* <p>
44
43
* Using this annotation will disable full auto-configuration and instead apply only
45
44
* configuration relevant to Redis tests.
45
+ * <p>
46
+ * When using JUnit 4, this annotation should be used in combination with
47
+ * {@code @RunWith(SpringRunner.class)}.
46
48
*
47
49
* @author Jayaram Pradhan
48
50
* @author Artsiom Yudovin
Original file line number Diff line number Diff line change 39
39
import org .springframework .transaction .annotation .Transactional ;
40
40
41
41
/**
42
- * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)}
43
- * for a typical jdbc test. Can be used when a test focuses <strong>only</strong> on
44
- * jdbc-based components.
42
+ * Annotation for a JDBC test that focuses <strong>only</strong> on JDBC-based components.
45
43
* <p>
46
44
* Using this annotation will disable full auto-configuration and instead apply only
47
- * configuration relevant to jdbc tests.
45
+ * configuration relevant to JDBC tests.
48
46
* <p>
49
47
* By default, tests annotated with {@code @JdbcTest} are transactional and roll back at
50
48
* the end of each test. They also use an embedded in-memory database (replacing any
56
54
* database, you should consider {@link SpringBootTest @SpringBootTest} combined with
57
55
* {@link AutoConfigureTestDatabase @AutoConfigureTestDatabase} rather than this
58
56
* annotation.
57
+ * <p>
58
+ * When using JUnit 4, this annotation should be used in combination with
59
+ * {@code @RunWith(SpringRunner.class)}.
59
60
*
60
61
* @author Stephane Nicoll
61
62
* @author Artsiom Yudovin
Original file line number Diff line number Diff line change 39
39
import org .springframework .transaction .annotation .Transactional ;
40
40
41
41
/**
42
- * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)}
43
- * for a typical jOOQ test. Can be used when a test focuses <strong>only</strong> on
44
- * jOOQ-based components.
42
+ * Annotation for a jOOQ test that focuses <strong>only</strong> on jOOQ-based components.
45
43
* <p>
46
44
* Using this annotation will disable full auto-configuration and instead apply only
47
45
* configuration relevant to jOOQ tests.
50
48
* want to replace any explicit or usually auto-configured DataSource by an embedded
51
49
* in-memory database, the {@link AutoConfigureTestDatabase @AutoConfigureTestDatabase}
52
50
* annotation can be used to override these settings.
51
+ * <p>
52
+ * When using JUnit 4, this annotation should be used in combination with
53
+ * {@code @RunWith(SpringRunner.class)}.
53
54
*
54
55
* @author Michael Simons
55
56
* @author Stephane Nicoll
Original file line number Diff line number Diff line change 40
40
import org .springframework .test .context .junit .jupiter .SpringExtension ;
41
41
42
42
/**
43
- * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)}
44
- * for a typical JSON test. Can be used when a test focuses <strong>only</strong> on JSON
45
- * serialization.
43
+ * Annotation for a JSON test that focuses <strong>only</strong> on JSON serialization.
46
44
* <p>
47
45
* Using this annotation will disable full auto-configuration and instead apply only
48
46
* configuration relevant to JSON tests (i.e. {@code @JsonComponent}, Jackson
52
50
* {@link JacksonTester}, {@link JsonbTester} and {@link GsonTester} fields. More
53
51
* fine-grained control can be provided via the
54
52
* {@link AutoConfigureJsonTesters @AutoConfigureJsonTesters} annotation.
53
+ * <p>
54
+ * When using JUnit 4, this annotation should be used in combination with
55
+ * {@code @RunWith(SpringRunner.class)}.
55
56
*
56
57
* @author Phillip Webb
57
58
* @author Artsiom Yudovin
Original file line number Diff line number Diff line change 41
41
import org .springframework .transaction .annotation .Transactional ;
42
42
43
43
/**
44
- * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)}
45
- * for a typical JPA test. Can be used when a test focuses <strong>only</strong> on JPA
46
- * components.
44
+ * Annotation for a JPA test that focuses <strong>only</strong> on JPA components.
47
45
* <p>
48
46
* Using this annotation will disable full auto-configuration and instead apply only
49
47
* configuration relevant to JPA tests.
58
56
* database, you should consider {@link SpringBootTest @SpringBootTest} combined with
59
57
* {@link AutoConfigureTestDatabase @AutoConfigureTestDatabase} rather than this
60
58
* annotation.
59
+ * <p>
60
+ * When using JUnit 4, this annotation should be used in combination with
61
+ * {@code @RunWith(SpringRunner.class)}.
61
62
*
62
63
* @author Phillip Webb
63
64
* @author Artsiom Yudovin
Original file line number Diff line number Diff line change 41
41
import org .springframework .web .client .RestTemplate ;
42
42
43
43
/**
44
- * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)}
45
- * for a typical Spring rest client test. Can be used when a test focuses
46
- * <strong>only</strong> on beans that use {@link RestTemplateBuilder}.
44
+ * Annotation for a Spring rest client test that focuses <strong>only</strong> on beans
45
+ * that use {@link RestTemplateBuilder}.
47
46
* <p>
48
47
* Using this annotation will disable full auto-configuration and instead apply only
49
48
* configuration relevant to rest client tests (i.e. Jackson or GSON auto-configuration
57
56
* If you are testing a bean that doesn't use {@link RestTemplateBuilder} but instead
58
57
* injects a {@link RestTemplate} directly, you can add
59
58
* {@code @AutoConfigureWebClient(registerRestTemplate=true)}.
59
+ * <p>
60
+ * When using JUnit 4, this annotation should be used in combination with
61
+ * {@code @RunWith(SpringRunner.class)}.
60
62
*
61
63
* @author Stephane Nicoll
62
64
* @author Phillip Webb
Original file line number Diff line number Diff line change 42
42
import org .springframework .test .web .reactive .server .WebTestClient ;
43
43
44
44
/**
45
- * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)}
46
- * for a typical Spring WebFlux test. Can be used when a test focuses
45
+ * Annotation that can be used for a Spring WebFlux test that focuses
47
46
* <strong>only</strong> on Spring WebFlux components.
48
47
* <p>
49
48
* Using this annotation will disable full auto-configuration and instead apply only
64
63
* you should consider {@link SpringBootTest @SpringBootTest} combined with
65
64
* {@link AutoConfigureWebTestClient @AutoConfigureWebTestClient} rather than this
66
65
* annotation.
66
+ * <p>
67
+ * When using JUnit 4, this annotation should be used in combination with
68
+ * {@code @RunWith(SpringRunner.class)}.
67
69
*
68
70
* @author Stephane Nicoll
69
71
* @author Artsiom Yudovin
Original file line number Diff line number Diff line change 41
41
import org .springframework .test .web .servlet .MockMvc ;
42
42
43
43
/**
44
- * Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)}
45
- * for a typical Spring MVC test. Can be used when a test focuses <strong>only</strong> on
44
+ * Annotation that can be used for a Spring MVC test that focuses <strong>only</strong> on
46
45
* Spring MVC components.
47
46
* <p>
48
47
* Using this annotation will disable full auto-configuration and instead apply only
64
63
* If you are looking to load your full application configuration and use MockMVC, you
65
64
* should consider {@link SpringBootTest @SpringBootTest} combined with
66
65
* {@link AutoConfigureMockMvc @AutoConfigureMockMvc} rather than this annotation.
66
+ * <p>
67
+ * When using JUnit 4, this annotation should be used in combination with
68
+ * {@code @RunWith(SpringRunner.class)}.
67
69
*
68
70
* @author Phillip Webb
69
71
* @author Artsiom Yudovin
You can’t perform that action at this time.
0 commit comments