Fix cyclic dependencies and polishing

This commit is contained in:
rstoyanchev
2022-05-16 09:50:36 +01:00
parent c2c6ae6547
commit ed8c27923f
7 changed files with 81 additions and 42 deletions

View File

@@ -126,7 +126,7 @@ public class RSocketGraphQlTesterBuilderTests {
private Closeable server;
public BuilderSetup() {
this.graphQlService.setDefaultDataAsJson("{}");
this.graphQlService.setDefaultResponse("{}");
}
public RSocketGraphQlTester.Builder<?> initBuilder() {

View File

@@ -45,6 +45,7 @@ import org.springframework.http.codec.ClientCodecConfigurer;
import org.springframework.http.codec.json.Jackson2JsonDecoder;
import org.springframework.lang.Nullable;
import org.springframework.test.web.reactive.server.WebTestClient;
import org.springframework.util.Assert;
import org.springframework.util.MimeType;
import org.springframework.web.reactive.function.server.RouterFunction;
import org.springframework.web.reactive.function.server.ServerResponse;
@@ -205,12 +206,13 @@ public class WebGraphQlTesterBuilderTests {
private static class WebBuilderSetup implements TesterBuilderSetup {
@Nullable
private WebGraphQlRequest request;
private final MockExecutionGraphQlService graphQlService = new MockExecutionGraphQlService();
public WebBuilderSetup() {
this.graphQlService.setDefaultDataAsJson("{}");
this.graphQlService.setDefaultResponse("{}");
}
@Override
@@ -234,6 +236,7 @@ public class WebGraphQlTesterBuilderTests {
@Override
public WebGraphQlRequest getWebGraphQlRequest() {
Assert.state(this.request != null, "No saved WebGraphQlRequest");
return this.request;
}