java.lang.Object
de.hamstersimulator.objectsfirst.config.HamsterTestConfig

public class HamsterTestConfig extends Object
Class representing the config needed for testing
  • Method Details

    • getTestClasses

      public List<String> getTestClasses()
      Returns the list of test classes to be used to verify the exercises
      Returns:
      An unmodifiable version of the list of class names
    • load

      public static HamsterTestConfig load() throws IOException
      Loads the test config from the default file: config.tests.json
      Returns:
      A new instance of HamsterTestConfig with the data loaded from the JSON-file
      Throws:
      IOException - If the loading of the JSON-file fails (e.g. because the file doesn't exist or isn't readable)
    • load

      public static HamsterTestConfig load(String path) throws IOException
      Loads the test config from the specified JSON-file and returns a new instance
      Parameters:
      path - The absolute or relative path to the JSON-file to be loaded as test config This can't be null or empty
      Returns:
      A new instance of HamsterTestConfig with the data loaded from the JSON-file
      Throws:
      IOException - If the loading of the JSON-file fails (e.g. because the file doesn't exist or isn't readable)