@@ -248,3 +248,27 @@ function dataProviderServerSideCacheWithDynamicResponse() returns map<[string, s
248
248
};
249
249
return dataSet ;
250
250
}
251
+
252
+ @test :Config {
253
+ groups : [" server_cache" ],
254
+ dataProvider : dataProviderServerCacheWithListInput
255
+ }
256
+ isolated function testServerCacheWithListInput(string documentFile , string [] resourceFileNames , json variables = (), string [] operationNames = []) returns error ? {
257
+ string url = " http://localhost:9091/cache_with_list_input" ;
258
+ string document = check getGraphqlDocumentFromFile (" server_cache_with_list_input" );
259
+
260
+ foreach int i in 0 ..< resourceFileNames .length () {
261
+ json actualPayload = check getJsonPayloadFromService (url , document , variables , operationNames [i ]);
262
+ json expectedPayload = check getJsonContentFromFile (resourceFileNames [i ]);
263
+ assertJsonValuesWithOrder (actualPayload , expectedPayload );
264
+ }
265
+ }
266
+
267
+ function dataProviderServerCacheWithListInput() returns map < [string , string [], json , string []]> {
268
+ map < [string , string [], json , string []]> dataSet = {
269
+ " 1" : [" server_cache_with_list_input" , [" server_cache_with_list_input_1" , " server_cache_with_list_input_2" , " server_cache_with_list_input_3" , " server_cache_with_list_input_1" ], (), [" A" , " B" , " G" , " A" ]],
270
+ " 2" : [" server_cache_with_list_input" , [" server_cache_with_list_input_4" , " server_cache_with_list_input_5" , " server_cache_with_list_input_6" , " server_cache_with_list_input_4" ], (), [" D" , " H" , " E" , " D" ]],
271
+ " 3" : [" server_cache_with_list_input" , [" server_cache_with_list_input_7" , " server_cache_with_list_input_8" , " server_cache_with_list_input_7" ], (), [" F" , " I" , " F" ]]
272
+ };
273
+ return dataSet ;
274
+ }
0 commit comments