Class HamsterTestConfig
java.lang.Object
de.hamstersimulator.objectsfirst.config.HamsterTestConfig
Class representing the config needed for testing
-
Method Summary
Modifier and TypeMethodDescriptionReturns the list of test classes to be used to verify the exercisesstatic HamsterTestConfig
load()
Loads the test config from the default file:config.tests.json
static HamsterTestConfig
Loads the test config from the specified JSON-file and returns a new instance
-
Method Details
-
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
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
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)
-