File tree Expand file tree Collapse file tree 6 files changed +12
-12
lines changed
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/data
spring-boot-docs/src/docs/asciidoc/features
spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/graphql/tester Expand file tree Collapse file tree 6 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 30
30
import org .springframework .data .repository .query .QueryByExampleExecutor ;
31
31
import org .springframework .graphql .ExecutionGraphQlService ;
32
32
import org .springframework .graphql .data .GraphQlRepository ;
33
- import org .springframework .graphql .test .tester .GraphQlServiceTester ;
33
+ import org .springframework .graphql .test .tester .ExecutionGraphQlServiceTester ;
34
34
35
35
import static org .mockito .ArgumentMatchers .any ;
36
36
import static org .mockito .BDDMockito .given ;
@@ -55,7 +55,7 @@ class GraphQlQueryByExampleAutoConfigurationTests {
55
55
void shouldRegisterDataFetcherForQueryByExampleRepositories () {
56
56
this .contextRunner .run ((context ) -> {
57
57
ExecutionGraphQlService graphQlService = context .getBean (ExecutionGraphQlService .class );
58
- GraphQlServiceTester graphQlTester = GraphQlServiceTester .create (graphQlService );
58
+ ExecutionGraphQlServiceTester graphQlTester = ExecutionGraphQlServiceTester .create (graphQlService );
59
59
graphQlTester .document ("{ bookById(id: 1) {name}}" ).execute ().path ("bookById.name" ).entity (String .class )
60
60
.isEqualTo ("Test title" );
61
61
});
Original file line number Diff line number Diff line change 30
30
import org .springframework .data .repository .CrudRepository ;
31
31
import org .springframework .graphql .ExecutionGraphQlService ;
32
32
import org .springframework .graphql .data .GraphQlRepository ;
33
- import org .springframework .graphql .test .tester .GraphQlServiceTester ;
33
+ import org .springframework .graphql .test .tester .ExecutionGraphQlServiceTester ;
34
34
import org .springframework .graphql .test .tester .GraphQlTester ;
35
35
36
36
import static org .mockito .ArgumentMatchers .any ;
@@ -56,7 +56,7 @@ class GraphQlQuerydslAutoConfigurationTests {
56
56
void shouldRegisterDataFetcherForQueryDslRepositories () {
57
57
this .contextRunner .run ((context ) -> {
58
58
ExecutionGraphQlService graphQlService = context .getBean (ExecutionGraphQlService .class );
59
- GraphQlTester graphQlTester = GraphQlServiceTester .create (graphQlService );
59
+ GraphQlTester graphQlTester = ExecutionGraphQlServiceTester .create (graphQlService );
60
60
graphQlTester .document ("{ bookById(id: 1) {name}}" ).execute ().path ("bookById.name" ).entity (String .class )
61
61
.isEqualTo ("Test title" );
62
62
});
Original file line number Diff line number Diff line change 29
29
import org .springframework .data .repository .reactive .ReactiveCrudRepository ;
30
30
import org .springframework .graphql .ExecutionGraphQlService ;
31
31
import org .springframework .graphql .data .GraphQlRepository ;
32
- import org .springframework .graphql .test .tester .GraphQlServiceTester ;
32
+ import org .springframework .graphql .test .tester .ExecutionGraphQlServiceTester ;
33
33
import org .springframework .graphql .test .tester .GraphQlTester ;
34
34
35
35
import static org .mockito .ArgumentMatchers .any ;
@@ -55,7 +55,7 @@ class GraphQlReactiveQueryByExampleAutoConfigurationTests {
55
55
void shouldRegisterDataFetcherForQueryByExampleRepositories () {
56
56
this .contextRunner .run ((context ) -> {
57
57
ExecutionGraphQlService graphQlService = context .getBean (ExecutionGraphQlService .class );
58
- GraphQlTester graphQlTester = GraphQlServiceTester .create (graphQlService );
58
+ GraphQlTester graphQlTester = ExecutionGraphQlServiceTester .create (graphQlService );
59
59
graphQlTester .document ("{ bookById(id: 1) {name}}" ).execute ().path ("bookById.name" ).entity (String .class )
60
60
.isEqualTo ("Test title" );
61
61
});
Original file line number Diff line number Diff line change 29
29
import org .springframework .data .repository .reactive .ReactiveCrudRepository ;
30
30
import org .springframework .graphql .ExecutionGraphQlService ;
31
31
import org .springframework .graphql .data .GraphQlRepository ;
32
- import org .springframework .graphql .test .tester .GraphQlServiceTester ;
32
+ import org .springframework .graphql .test .tester .ExecutionGraphQlServiceTester ;
33
33
import org .springframework .graphql .test .tester .GraphQlTester ;
34
34
35
35
import static org .mockito .ArgumentMatchers .any ;
@@ -55,7 +55,7 @@ class GraphQlReactiveQuerydslAutoConfigurationTests {
55
55
void shouldRegisterDataFetcherForQueryDslRepositories () {
56
56
this .contextRunner .run ((context ) -> {
57
57
ExecutionGraphQlService graphQlService = context .getBean (ExecutionGraphQlService .class );
58
- GraphQlTester graphQlTester = GraphQlServiceTester .create (graphQlService );
58
+ GraphQlTester graphQlTester = ExecutionGraphQlServiceTester .create (graphQlService );
59
59
graphQlTester .document ("{ bookById(id: 1) {name}}" ).execute ().path ("bookById.name" ).entity (String .class )
60
60
.isEqualTo ("Test title" );
61
61
});
Original file line number Diff line number Diff line change @@ -439,7 +439,7 @@ This testing module ships the {spring-graphql-docs}/#testing-graphqltester[Graph
439
439
The tester is heavily used in test, so be sure to become familiar with using it.
440
440
There are `GraphQlTester` variants and Spring Boot will auto-configure them depending on the type of tests:
441
441
442
- * the `GraphQlServiceTester ` performs tests on the server side, without a client nor a transport
442
+ * the `ExecutionGraphQlServiceTester ` performs tests on the server side, without a client nor a transport
443
443
* the `HttpGraphQlTester` performs tests with a client that connects to a server, with or without a live server
444
444
445
445
Spring Boot helps you to test your {spring-graphql-docs}#controllers[Spring GraphQL Controllers] with the `@GraphQlTest` annotation.
Original file line number Diff line number Diff line change 25
25
import org .springframework .boot .autoconfigure .graphql .GraphQlAutoConfiguration ;
26
26
import org .springframework .context .annotation .Bean ;
27
27
import org .springframework .graphql .ExecutionGraphQlService ;
28
- import org .springframework .graphql .test .tester .GraphQlServiceTester ;
28
+ import org .springframework .graphql .test .tester .ExecutionGraphQlServiceTester ;
29
29
import org .springframework .graphql .test .tester .GraphQlTester ;
30
30
31
31
/**
@@ -41,8 +41,8 @@ public class GraphQlTesterAutoConfiguration {
41
41
@ Bean
42
42
@ ConditionalOnBean (ExecutionGraphQlService .class )
43
43
@ ConditionalOnMissingBean
44
- public GraphQlServiceTester graphQlTester (ExecutionGraphQlService graphQlService ) {
45
- return GraphQlServiceTester .create (graphQlService );
44
+ public ExecutionGraphQlServiceTester graphQlTester (ExecutionGraphQlService graphQlService ) {
45
+ return ExecutionGraphQlServiceTester .create (graphQlService );
46
46
}
47
47
48
48
}
You can’t perform that action at this time.
0 commit comments