-
@Target({METHOD,PARAMETER}) @Retention(RUNTIME) @Documented @ArgumentsSource(JsonFileSourceArgumentsProvider.class) public @interface JsonFileSource@JsonFileSourceis anArgumentsSourcethat loads JSON from a file, parses it, and passes it as arguments to a parametrized test.This annotation can be used on a method parameter, to make it usable with
CartesianTest. If used withParameterizedTest, the annotation has to be on the method itself as any otherArgumentsSource.Note that this extension requires a JSON parser to be available at run time, which may include adding it to the module graph with
--add-modules. For details on that as well as how to use this extension, see the documentation on JSON tests.- Since:
- 1.7.0
- See Also:
ArgumentsSource,ParameterizedTest,CartesianTest,Property,JsonSource,JsonClasspathSource