When using @JsonFileSource if the file contains an array of object the argument provider will always generate a stream with individual json objects and the test will be executed once per element, that's is fine and useful, but a common is to have the actual json array, e.g.
@ParameterizedTest
@JsonFileSource(resources = "/array-of-objects.json")
void jsonArray(JsonArray jsonArray ) {
}
In the base above, I would like to have access to the full json object and not to each item in multiple iterations, another example would be:
@ParameterizedTest
@JsonFileSource(resources = "/array-of-objects.json")
void jsonArray(List<JsonObject> jsonArray ) {
}
Where then I would like a list with all the json elements at once instead of one element per test execution.