JsonParameterSet

public class JsonParameterSet(source)

A set of test parameters that are stored in a json file.

Constructors

Link copied to clipboard
public void JsonParameterSet(JsonNode rootNode, ObjectMapper objectMapper, Map<String, Function<JsonNode, ? extends Object>> customConverters)
Creates a new JsonParameterSet.

Properties

Link copied to clipboard
public final ObjectMapper objectMapper
The object mapper that is used to convert the json nodes to java objects.
Link copied to clipboard
public final JsonNode rootNode
The root node of the json file.

Functions

Link copied to clipboard
Returns a list of all available keys in the json file.
Link copied to clipboard
public T get<T>(String key)
Retrieves the value of the given key from the json file.
public T get<T>(String key, Class<T> type)
Retrieves the value of the given key from the json file and converts it to the given type.
Link copied to clipboard
public boolean getBoolean(String key)
Retrieves the value of the given key from the json file and converts it to a boolean.
Link copied to clipboard
public byte getByte(String key)
Retrieves the value of the given key from the json file and converts it to a byte.
Link copied to clipboard
public char getChar(String key)
Retrieves the value of the given key from the json file and converts it to a char.
Link copied to clipboard
public double getDouble(String key)
Retrieves the value of the given key from the json file and converts it to a double.
Link copied to clipboard
public float getFloat(String key)
Retrieves the value of the given key from the json file and converts it to a float.
Link copied to clipboard
public int getInt(String key)
Retrieves the value of the given key from the json file and converts it to an int.
Link copied to clipboard
public long getLong(String key)
Retrieves the value of the given key from the json file and converts it to a long.
Link copied to clipboard
public ObjectMapper getObjectMapper()
Returns the ObjectMapper that is used to convert the json nodes to java objects.
Link copied to clipboard
public JsonNode getRootNode()
Returns the root node of the json file.
Link copied to clipboard
public short getShort(String key)
Retrieves the value of the given key from the json file and converts it to a short.
Link copied to clipboard
public String getString(String key)
Retrieves the value of the given key from the json file and converts it to a String.
Link copied to clipboard
public Context toContext(Array<String> ignoreKeys)
Returns a Context containing all available keys and their values.