Decouple GraphQlTester from Web details

Closes gh-65
This commit is contained in:
Rossen Stoyanchev
2021-06-14 14:21:02 +01:00
parent 17bf9ee287
commit de234c94c4
10 changed files with 589 additions and 383 deletions

View File

@@ -22,6 +22,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.graphql.test.tester.GraphQlTester;
import org.springframework.graphql.test.tester.WebGraphQlTester;
import org.springframework.graphql.web.WebGraphQlHandler;
// @formatter:off
@@ -36,7 +37,7 @@ public class QueryTests {
@BeforeEach
public void setUp(@Autowired WebGraphQlHandler handler) {
this.graphQlTester = GraphQlTester.create(webInput ->
this.graphQlTester = WebGraphQlTester.create(webInput ->
handler.handle(webInput).contextWrite(context -> context.put("name", "James")));
}

View File

@@ -24,6 +24,7 @@ import reactor.test.StepVerifier;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.graphql.test.tester.GraphQlTester;
import org.springframework.graphql.test.tester.WebGraphQlTester;
import org.springframework.graphql.web.WebGraphQlHandler;
// @formatter:off
@@ -38,7 +39,7 @@ public class SubscriptionTests {
@BeforeEach
public void setUp(@Autowired WebGraphQlHandler handler) {
this.graphQlTester = GraphQlTester.create(webInput ->
this.graphQlTester = WebGraphQlTester.create(webInput ->
handler.handle(webInput).contextWrite(context -> context.put("name", "James")));
}