File tree 3 files changed +18
-1
lines changed
spring-boot-project/spring-boot-autoconfigure
src/test/java/org/springframework/boot/autoconfigure/graphql/data
3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,6 @@ dependencies {
217
217
testImplementation(" com.ibm.db2:jcc" )
218
218
testImplementation(" com.jayway.jsonpath:json-path" )
219
219
testImplementation(" com.mysql:mysql-connector-j" )
220
- testImplementation(" com.querydsl:querydsl-core" )
221
220
testImplementation(" com.squareup.okhttp3:mockwebserver" )
222
221
testImplementation(" com.sun.xml.messaging.saaj:saaj-impl" )
223
222
testImplementation(" io.projectreactor:reactor-test" )
Original file line number Diff line number Diff line change 23
23
import org .springframework .boot .autoconfigure .AutoConfigurations ;
24
24
import org .springframework .boot .autoconfigure .graphql .Book ;
25
25
import org .springframework .boot .autoconfigure .graphql .GraphQlAutoConfiguration ;
26
+ import org .springframework .boot .test .context .FilteredClassLoader ;
26
27
import org .springframework .boot .test .context .runner .WebApplicationContextRunner ;
27
28
import org .springframework .context .annotation .Bean ;
28
29
import org .springframework .context .annotation .Configuration ;
33
34
import org .springframework .graphql .test .tester .ExecutionGraphQlServiceTester ;
34
35
import org .springframework .graphql .test .tester .GraphQlTester ;
35
36
37
+ import static org .assertj .core .api .Assertions .assertThat ;
36
38
import static org .mockito .ArgumentMatchers .any ;
37
39
import static org .mockito .BDDMockito .given ;
38
40
import static org .mockito .Mockito .mock ;
@@ -65,6 +67,13 @@ void shouldRegisterDataFetcherForQueryDslRepositories() {
65
67
});
66
68
}
67
69
70
+ @ Test
71
+ void shouldBackOffWithoutQueryDsl () {
72
+ this .contextRunner .withClassLoader (new FilteredClassLoader ("com.querydsl.core" ))
73
+ .run ((context ) -> assertThat (context ).doesNotHaveBean ("querydslRegistrar" )
74
+ .doesNotHaveBean (GraphQlQuerydslAutoConfiguration .class ));
75
+ }
76
+
68
77
@ Configuration (proxyBeanMethods = false )
69
78
static class MockRepositoryConfig {
70
79
Original file line number Diff line number Diff line change 22
22
import org .springframework .boot .autoconfigure .AutoConfigurations ;
23
23
import org .springframework .boot .autoconfigure .graphql .Book ;
24
24
import org .springframework .boot .autoconfigure .graphql .GraphQlAutoConfiguration ;
25
+ import org .springframework .boot .test .context .FilteredClassLoader ;
25
26
import org .springframework .boot .test .context .runner .ReactiveWebApplicationContextRunner ;
26
27
import org .springframework .context .annotation .Bean ;
27
28
import org .springframework .context .annotation .Configuration ;
32
33
import org .springframework .graphql .test .tester .ExecutionGraphQlServiceTester ;
33
34
import org .springframework .graphql .test .tester .GraphQlTester ;
34
35
36
+ import static org .assertj .core .api .Assertions .assertThat ;
35
37
import static org .mockito .ArgumentMatchers .any ;
36
38
import static org .mockito .BDDMockito .given ;
37
39
import static org .mockito .Mockito .mock ;
@@ -64,6 +66,13 @@ void shouldRegisterDataFetcherForQueryDslRepositories() {
64
66
});
65
67
}
66
68
69
+ @ Test
70
+ void shouldBackOffWithoutQueryDsl () {
71
+ this .contextRunner .withClassLoader (new FilteredClassLoader ("com.querydsl.core" ))
72
+ .run ((context ) -> assertThat (context ).doesNotHaveBean ("querydslRegistrar" )
73
+ .doesNotHaveBean (GraphQlReactiveQuerydslAutoConfiguration .class ));
74
+ }
75
+
67
76
@ Configuration (proxyBeanMethods = false )
68
77
static class MockRepositoryConfig {
69
78
You can’t perform that action at this time.
0 commit comments