Class TestDataGenerator


  • public class TestDataGenerator
    extends Object
    • 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