Skip to content

Commit 53464f2

Browse files
committed
Polish "Introduce TestSliceTestContextBootstrapper for test slices"
See gh-44354
1 parent a42ba82 commit 53464f2

20 files changed

+25
-24
lines changed
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.test.context;
17+
package org.springframework.boot.test.autoconfigure;
1818

1919
import java.lang.annotation.Annotation;
2020

21+
import org.springframework.boot.test.context.SpringBootTestContextBootstrapper;
2122
import org.springframework.core.ResolvableType;
2223
import org.springframework.core.annotation.MergedAnnotation;
2324
import org.springframework.core.annotation.MergedAnnotations;
@@ -27,18 +28,18 @@
2728
import org.springframework.util.Assert;
2829

2930
/**
30-
* {@link TestContextBootstrapper} for test slices support.
31+
* Base class for test slice {@link TestContextBootstrapper test context bootstrappers}.
3132
*
3233
* @param <T> the test slice annotation
3334
* @author Yanming Zhou
34-
* @since 3.5.0
35+
* @since 4.0.0
3536
*/
36-
public class TestSliceTestContextBootstrapper<T extends Annotation> extends SpringBootTestContextBootstrapper {
37+
public abstract class TestSliceTestContextBootstrapper<T extends Annotation> extends SpringBootTestContextBootstrapper {
3738

3839
private final Class<T> annotationType;
3940

4041
@SuppressWarnings("unchecked")
41-
public TestSliceTestContextBootstrapper() {
42+
protected TestSliceTestContextBootstrapper() {
4243
this.annotationType = (Class<T>) ResolvableType.forClass(getClass())
4344
.as(TestSliceTestContextBootstrapper.class)
4445
.getGeneric(0)

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/cassandra/DataCassandraTestContextBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.test.autoconfigure.data.cassandra;
1818

19-
import org.springframework.boot.test.context.TestSliceTestContextBootstrapper;
19+
import org.springframework.boot.test.autoconfigure.TestSliceTestContextBootstrapper;
2020
import org.springframework.test.context.TestContextBootstrapper;
2121

2222
/**

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/couchbase/DataCouchbaseTestContextBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.test.autoconfigure.data.couchbase;
1818

19-
import org.springframework.boot.test.context.TestSliceTestContextBootstrapper;
19+
import org.springframework.boot.test.autoconfigure.TestSliceTestContextBootstrapper;
2020
import org.springframework.test.context.TestContextBootstrapper;
2121

2222
/**

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/elasticsearch/DataElasticsearchTestContextBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.test.autoconfigure.data.elasticsearch;
1818

19-
import org.springframework.boot.test.context.TestSliceTestContextBootstrapper;
19+
import org.springframework.boot.test.autoconfigure.TestSliceTestContextBootstrapper;
2020
import org.springframework.test.context.TestContextBootstrapper;
2121

2222
/**

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/jdbc/DataJdbcTestContextBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.test.autoconfigure.data.jdbc;
1818

19-
import org.springframework.boot.test.context.TestSliceTestContextBootstrapper;
19+
import org.springframework.boot.test.autoconfigure.TestSliceTestContextBootstrapper;
2020
import org.springframework.test.context.TestContextBootstrapper;
2121

2222
/**

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/ldap/DataLdapTestContextBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.test.autoconfigure.data.ldap;
1818

19-
import org.springframework.boot.test.context.TestSliceTestContextBootstrapper;
19+
import org.springframework.boot.test.autoconfigure.TestSliceTestContextBootstrapper;
2020
import org.springframework.test.context.TestContextBootstrapper;
2121

2222
/**

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTestContextBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.test.autoconfigure.data.mongo;
1818

19-
import org.springframework.boot.test.context.TestSliceTestContextBootstrapper;
19+
import org.springframework.boot.test.autoconfigure.TestSliceTestContextBootstrapper;
2020
import org.springframework.test.context.TestContextBootstrapper;
2121

2222
/**

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/neo4j/DataNeo4jTestContextBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.test.autoconfigure.data.neo4j;
1818

19-
import org.springframework.boot.test.context.TestSliceTestContextBootstrapper;
19+
import org.springframework.boot.test.autoconfigure.TestSliceTestContextBootstrapper;
2020
import org.springframework.test.context.TestContextBootstrapper;
2121

2222
/**

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/r2dbc/DataR2dbcTestContextBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.test.autoconfigure.data.r2dbc;
1818

19-
import org.springframework.boot.test.context.TestSliceTestContextBootstrapper;
19+
import org.springframework.boot.test.autoconfigure.TestSliceTestContextBootstrapper;
2020
import org.springframework.test.context.TestContextBootstrapper;
2121

2222
/**

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/redis/DataRedisTestContextBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.test.autoconfigure.data.redis;
1818

19-
import org.springframework.boot.test.context.TestSliceTestContextBootstrapper;
19+
import org.springframework.boot.test.autoconfigure.TestSliceTestContextBootstrapper;
2020
import org.springframework.test.context.TestContextBootstrapper;
2121

2222
/**

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/graphql/GraphQlTestContextBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.test.autoconfigure.graphql;
1818

19-
import org.springframework.boot.test.context.TestSliceTestContextBootstrapper;
19+
import org.springframework.boot.test.autoconfigure.TestSliceTestContextBootstrapper;
2020
import org.springframework.test.context.TestContextBootstrapper;
2121

2222
/**

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/JdbcTestContextBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.test.autoconfigure.jdbc;
1818

19-
import org.springframework.boot.test.context.TestSliceTestContextBootstrapper;
19+
import org.springframework.boot.test.autoconfigure.TestSliceTestContextBootstrapper;
2020
import org.springframework.test.context.TestContextBootstrapper;
2121

2222
/**

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jooq/JooqTestContextBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.test.autoconfigure.jooq;
1818

19-
import org.springframework.boot.test.context.TestSliceTestContextBootstrapper;
19+
import org.springframework.boot.test.autoconfigure.TestSliceTestContextBootstrapper;
2020
import org.springframework.test.context.TestContextBootstrapper;
2121

2222
/**

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/json/JsonTestContextBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.test.autoconfigure.json;
1818

19-
import org.springframework.boot.test.context.TestSliceTestContextBootstrapper;
19+
import org.springframework.boot.test.autoconfigure.TestSliceTestContextBootstrapper;
2020
import org.springframework.test.context.TestContextBootstrapper;
2121

2222
/**

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/orm/jpa/DataJpaTestContextBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.test.autoconfigure.orm.jpa;
1818

19-
import org.springframework.boot.test.context.TestSliceTestContextBootstrapper;
19+
import org.springframework.boot.test.autoconfigure.TestSliceTestContextBootstrapper;
2020
import org.springframework.test.context.TestContextBootstrapper;
2121

2222
/**

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/client/RestClientTestContextBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.test.autoconfigure.web.client;
1818

19-
import org.springframework.boot.test.context.TestSliceTestContextBootstrapper;
19+
import org.springframework.boot.test.autoconfigure.TestSliceTestContextBootstrapper;
2020
import org.springframework.test.context.TestContextBootstrapper;
2121

2222
/**

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/reactive/WebFluxTestContextBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
package org.springframework.boot.test.autoconfigure.web.reactive;
1818

19+
import org.springframework.boot.test.autoconfigure.TestSliceTestContextBootstrapper;
1920
import org.springframework.boot.test.context.ReactiveWebMergedContextConfiguration;
20-
import org.springframework.boot.test.context.TestSliceTestContextBootstrapper;
2121
import org.springframework.test.context.MergedContextConfiguration;
2222
import org.springframework.test.context.TestContextBootstrapper;
2323

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/web/servlet/WebMvcTestContextBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.test.autoconfigure.web.servlet;
1818

19-
import org.springframework.boot.test.context.TestSliceTestContextBootstrapper;
19+
import org.springframework.boot.test.autoconfigure.TestSliceTestContextBootstrapper;
2020
import org.springframework.test.context.MergedContextConfiguration;
2121
import org.springframework.test.context.TestContextBootstrapper;
2222
import org.springframework.test.context.web.WebMergedContextConfiguration;

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/webservices/client/WebServiceClientTestContextBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.test.autoconfigure.webservices.client;
1818

19-
import org.springframework.boot.test.context.TestSliceTestContextBootstrapper;
19+
import org.springframework.boot.test.autoconfigure.TestSliceTestContextBootstrapper;
2020
import org.springframework.test.context.TestContextBootstrapper;
2121

2222
/**

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/webservices/server/WebServiceServerTestContextBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.boot.test.autoconfigure.webservices.server;
1818

19-
import org.springframework.boot.test.context.TestSliceTestContextBootstrapper;
19+
import org.springframework.boot.test.autoconfigure.TestSliceTestContextBootstrapper;
2020
import org.springframework.test.context.MergedContextConfiguration;
2121
import org.springframework.test.context.TestContextBootstrapper;
2222
import org.springframework.test.context.web.WebMergedContextConfiguration;

0 commit comments

Comments
 (0)