Replace QL with Ql for consistency with Spring naming

This commit is contained in:
Rossen Stoyanchev
2021-05-14 21:32:54 +01:00
parent 731417eb3f
commit 484fb932ef
46 changed files with 402 additions and 404 deletions

View File

@@ -21,8 +21,8 @@ import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.graphql.web.WebGraphQLHandler;
import org.springframework.graphql.test.tester.GraphQLTester;
import org.springframework.graphql.web.WebGraphQlHandler;
import org.springframework.graphql.test.tester.GraphQlTester;
/**
* GraphQL query tests directly via {@link GraphQL}.
@@ -30,19 +30,19 @@ import org.springframework.graphql.test.tester.GraphQLTester;
@SpringBootTest
public class QueryTests {
private GraphQLTester graphQLTester;
private GraphQlTester graphQlTester;
@BeforeEach
public void setUp(@Autowired WebGraphQLHandler handler) {
this.graphQLTester = GraphQLTester.create(webInput ->
public void setUp(@Autowired WebGraphQlHandler handler) {
this.graphQlTester = GraphQlTester.create(webInput ->
handler.handle(webInput).contextWrite(context -> context.put("name", "James")));
}
@Test
void greetingMono() {
this.graphQLTester.query("{greetingMono}")
this.graphQlTester.query("{greetingMono}")
.execute()
.path("greetingMono")
.entity(String.class)
@@ -51,7 +51,7 @@ public class QueryTests {
@Test
void greetingsFlux() {
this.graphQLTester.query("{greetingsFlux}")
this.graphQlTester.query("{greetingsFlux}")
.execute()
.path("greetingsFlux")
.entityList(String.class)

View File

@@ -23,8 +23,8 @@ import reactor.test.StepVerifier;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.graphql.web.WebGraphQLHandler;
import org.springframework.graphql.test.tester.GraphQLTester;
import org.springframework.graphql.web.WebGraphQlHandler;
import org.springframework.graphql.test.tester.GraphQlTester;
/**
* GraphQL subscription tests directly via {@link GraphQL}.
@@ -32,12 +32,12 @@ import org.springframework.graphql.test.tester.GraphQLTester;
@SpringBootTest
public class SubscriptionTests {
private GraphQLTester graphQLTester;
private GraphQlTester graphQlTester;
@BeforeEach
public void setUp(@Autowired WebGraphQLHandler handler) {
this.graphQLTester = GraphQLTester.create(webInput ->
public void setUp(@Autowired WebGraphQlHandler handler) {
this.graphQlTester = GraphQlTester.create(webInput ->
handler.handle(webInput).contextWrite(context -> context.put("name", "James")));
}
@@ -46,7 +46,7 @@ public class SubscriptionTests {
void subscriptionWithEntityPath() {
String query = "subscription { greetings }";
Flux<String> result = this.graphQLTester.query(query)
Flux<String> result = this.graphQlTester.query(query)
.executeSubscription()
.toFlux("greetings", String.class);
@@ -63,7 +63,7 @@ public class SubscriptionTests {
void subscriptionWithResponseSpec() {
String query = "subscription { greetings }";
Flux<GraphQLTester.ResponseSpec> result = this.graphQLTester.query(query)
Flux<GraphQlTester.ResponseSpec> result = this.graphQlTester.query(query)
.executeSubscription()
.toFlux();

View File

@@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.graphql.test.tester.GraphQLTester;
import org.springframework.graphql.test.tester.GraphQlTester;
import org.springframework.test.web.reactive.server.WebTestClient;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.client.MockMvcWebTestClient;
@@ -33,15 +33,15 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
@SpringBootTest
@AutoConfigureMockMvc
public class MockMvcGraphQLTests {
public class MockMvcGraphQlTests {
private GraphQLTester graphQLTester;
private GraphQlTester graphQlTester;
@BeforeEach
public void setUp(@Autowired MockMvc mockMvc) {
WebTestClient client = MockMvcWebTestClient.bindTo(mockMvc).baseUrl("/graphql").build();
this.graphQLTester = GraphQLTester.create(client);
this.graphQlTester = GraphQlTester.create(client);
}
@@ -55,7 +55,7 @@ public class MockMvcGraphQLTests {
" }" +
"}";
this.graphQLTester.query(query)
this.graphQlTester.query(query)
.execute()
.path("project.releases[*].version")
.entityList(String.class)
@@ -71,7 +71,7 @@ public class MockMvcGraphQLTests {
" }" +
"}";
this.graphQLTester.query(query)
this.graphQlTester.query(query)
.execute()
.path("project")
.matchesJson("{\"repositoryUrl\":\"http://github.com/spring-projects/spring-framework\"}");
@@ -87,7 +87,7 @@ public class MockMvcGraphQLTests {
" }" +
"}";
this.graphQLTester.query(query)
this.graphQlTester.query(query)
.execute()
.path("project")
.entity(Project.class)