Add test for evaluating all reactor scripts
This commit is contained in:
@@ -41,6 +41,10 @@ public class ScriptEvaluationTest {
|
|||||||
return getScriptFilePaths("quest");
|
return getScriptFilePaths("quest");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static List<String> reactorScriptFilePaths() throws IOException {
|
||||||
|
return getScriptFilePaths("reactor");
|
||||||
|
}
|
||||||
|
|
||||||
private static List<String> getScriptFilePaths(final String scriptsSubdirectory) throws IOException {
|
private static List<String> getScriptFilePaths(final String scriptsSubdirectory) throws IOException {
|
||||||
Path scriptDirectory = Path.of("scripts", scriptsSubdirectory);
|
Path scriptDirectory = Path.of("scripts", scriptsSubdirectory);
|
||||||
try (Stream<Path> pathStream = Files.walk(scriptDirectory)) {
|
try (Stream<Path> pathStream = Files.walk(scriptDirectory)) {
|
||||||
@@ -90,4 +94,12 @@ public class ScriptEvaluationTest {
|
|||||||
|
|
||||||
assertNotNull(scriptEngine);
|
assertNotNull(scriptEngine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ParameterizedTest
|
||||||
|
@MethodSource("reactorScriptFilePaths")
|
||||||
|
void reactorScriptShouldEvaluate(String reactorScriptPath) {
|
||||||
|
ScriptEngine scriptEngine = scriptManager.getInvocableScriptEngine(reactorScriptPath);
|
||||||
|
|
||||||
|
assertNotNull(scriptEngine);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user