@@ -134,8 +134,7 @@ public void ConnectionFieldDoesntReturnPaginatedData_tryToBuildSchema_getExcepti
134
134
@ Test
135
135
public void validDatafetcher_queryForCursors_getValidCursors () throws Exception {
136
136
//Arrange
137
- ExecutionInput executionInput = new ExecutionInput ("{ objs(first:2) { edges { cursor } } }" ,
138
- null , "CONTEXT" , null , new HashMap <>());
137
+ ExecutionInput executionInput = ExecutionInput .newExecutionInput ().query ("{ objs(first:2) { edges { cursor } } }" ).build ();
139
138
//Act
140
139
ExecutionResult result = graphQL .execute (executionInput );
141
140
Map <String , Map <String , List <Map <String , Map <String , Object >>>>> data = result .getData ();
@@ -149,8 +148,7 @@ public void validDatafetcher_queryForCursors_getValidCursors() throws Exception
149
148
@ Test
150
149
public void fetchConnectionAsync () throws Exception {
151
150
//Arrange
152
- ExecutionInput executionInput = new ExecutionInput ("{ objsAsync(first:2) { edges { cursor } } }" ,
153
- null , "CONTEXT" , null , new HashMap <>());
151
+ ExecutionInput executionInput = ExecutionInput .newExecutionInput ().query ("{ objsAsync(first:2) { edges { cursor } } }" ).build ();
154
152
//Act
155
153
ExecutionResult result = graphQL .execute (executionInput );
156
154
Map <String , Map <String , List <Map <String , Map <String , Object >>>>> data = result .getData ();
@@ -164,8 +162,9 @@ public void fetchConnectionAsync() throws Exception {
164
162
@ Test
165
163
public void validDatafetcher_queryForValues_returnsValidValues () throws Exception {
166
164
//Arrange
167
- ExecutionInput executionInput = new ExecutionInput ("{ objs(first:2) { edges { cursor node { id, val } } } }" ,
168
- null , "CONTEXT" , null , new HashMap <>());
165
+ ExecutionInput executionInput = ExecutionInput .newExecutionInput ().query ("{ objs(first:2) { edges { cursor node { id, val } } } }" )
166
+ .context ("CONTEXT" ).root (null ).operationName (null ).variables (new HashMap <>())
167
+ .build ();
169
168
170
169
//Act
171
170
ExecutionResult result = graphQL .execute (executionInput );
@@ -181,8 +180,7 @@ public void validDatafetcher_queryForValues_returnsValidValues() throws Exceptio
181
180
public void validDatafetcher_queryForHasPreviousPage_returnsFalse () throws Exception {
182
181
183
182
//Arrange
184
- ExecutionInput executionInput = new ExecutionInput ("{ objs(first:2) { pageInfo { hasPreviousPage } } }" ,
185
- null , "CONTEXT" , null , new HashMap <>());
183
+ ExecutionInput executionInput = ExecutionInput .newExecutionInput ().query ("{ objs(first:2) { pageInfo { hasPreviousPage } } }" ).build ();
186
184
187
185
//Act
188
186
ExecutionResult result = graphQL .execute (executionInput );
@@ -196,8 +194,7 @@ public void validDatafetcher_queryForHasPreviousPage_returnsFalse() throws Excep
196
194
public void validDatafetcher_queryForHasNextPage_returnsTrue () throws Exception {
197
195
198
196
//Arrange
199
- ExecutionInput executionInput = new ExecutionInput ("{ objs(first:2) { pageInfo { hasNextPage } } }" ,
200
- null , "CONTEXT" , null , new HashMap <>());
197
+ ExecutionInput executionInput = ExecutionInput .newExecutionInput ().query ("{ objs(first:2) { pageInfo { hasNextPage } } }" ).build ();
201
198
202
199
//Act
203
200
ExecutionResult result = graphQL .execute (executionInput );
0 commit comments