Module org.junitpioneer
Package org.junitpioneer.jupiter.json
Provides parameterized test arguments from JSON (inline or file).
Note that these extensions require 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, see
the documentation on the JSON argument source.
Check out the following types for details on providing values for parameterized tests:
-
Interface Summary Interface Description AbstractJsonSourceBasedArgumentsProvider.Source JsonConverter A JSON Converter which parses an input stream into a Node.Node A node representing a JSON structure.ObjectMapperProvider Service interface for providing a customObjectMapperinstance at runtime. -
Class Summary Class Description AbstractJsonArgumentsProvider<A extends java.lang.annotation.Annotation> Provides arguments from JSON files specified withJsonFileSource.AbstractJsonSourceBasedArgumentsProvider<A extends java.lang.annotation.Annotation> DefaultObjectMapperProvider JacksonJsonConverter AJsonConverterusing Jackson 2ObjectMapperto perform the conversionJacksonNode ANodeimplementation for Jackson 2.JsonClasspathSourceArgumentsProvider Provides arguments from JSON files specified withJsonClasspathSource.JsonConverterProvider JsonFileSourceArgumentsProvider Provides arguments from JSON files specified withJsonFileSource.JsonInlineArgumentsProvider Provides arguments from inline JSON specified withJsonSource. -
Exception Summary Exception Description NoJsonParserConfiguredException Indicates that no supported JSON parsing library was found at run time. -
Annotation Types Summary Annotation Type Description JsonClasspathSource @JsonClasspathSourceis anArgumentsSourcethat loads JSON from a classpath resource, parses it, and passes it as arguments to a parametrized test.JsonFileSource @JsonFileSourceis anArgumentsSourcethat loads JSON from a file, parses it, and passes it as arguments to a parametrized test.JsonSource @JsonSourceis anArgumentsSourcethat parses inline JSON and passes it as arguments to a parametrized test.Property An annotation indicating the name of the JSON property that should be extracted into the method parameter.UseObjectMapper