@@ -134,8 +134,7 @@ public void ConnectionFieldDoesntReturnPaginatedData_tryToBuildSchema_getExcepti
134134 @ Test
135135 public void validDatafetcher_queryForCursors_getValidCursors () throws Exception {
136136 //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 ();
139138 //Act
140139 ExecutionResult result = graphQL .execute (executionInput );
141140 Map <String , Map <String , List <Map <String , Map <String , Object >>>>> data = result .getData ();
@@ -149,8 +148,7 @@ public void validDatafetcher_queryForCursors_getValidCursors() throws Exception
149148 @ Test
150149 public void fetchConnectionAsync () throws Exception {
151150 //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 ();
154152 //Act
155153 ExecutionResult result = graphQL .execute (executionInput );
156154 Map <String , Map <String , List <Map <String , Map <String , Object >>>>> data = result .getData ();
@@ -164,8 +162,9 @@ public void fetchConnectionAsync() throws Exception {
164162 @ Test
165163 public void validDatafetcher_queryForValues_returnsValidValues () throws Exception {
166164 //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 ();
169168
170169 //Act
171170 ExecutionResult result = graphQL .execute (executionInput );
@@ -181,8 +180,7 @@ public void validDatafetcher_queryForValues_returnsValidValues() throws Exceptio
181180 public void validDatafetcher_queryForHasPreviousPage_returnsFalse () throws Exception {
182181
183182 //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 ();
186184
187185 //Act
188186 ExecutionResult result = graphQL .execute (executionInput );
@@ -196,8 +194,7 @@ public void validDatafetcher_queryForHasPreviousPage_returnsFalse() throws Excep
196194 public void validDatafetcher_queryForHasNextPage_returnsTrue () throws Exception {
197195
198196 //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 ();
201198
202199 //Act
203200 ExecutionResult result = graphQL .execute (executionInput );
0 commit comments