Package com.github.rabend
Class TestDataGenerator
- java.lang.Object
-
- com.github.rabend.TestDataGenerator
-
public class TestDataGenerator extends Object
-
-
Constructor Summary
Constructors Constructor Description TestDataGenerator(URL schemaUrl)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgenerateJsonString()Generates a json string with random values for the keys defined in the json schema.
-
-
-
Constructor Detail
-
TestDataGenerator
public TestDataGenerator(URL schemaUrl)
Constructor- Parameters:
schemaUrl- URL to a valid json schema
-
-
Method Detail
-
generateJsonString
public String generateJsonString() throws IOException
Generates a json string with random values for the keys defined in the json schema. Values will be generated according to any restrictions in the schema, if present.- Returns:
- a json string
- Throws:
IOException- in case the schema cannot be read
-
-