Fix assumption in ScriptItemProcessorTests.testItemBinding

This test fails on Java 15 because the Javascript engine
has been removed in Java 15 (JEP 372).

This commit updates the test to assume that the JavaScript
engine is provided to the JVM through a factory (similar
to other tests).
This commit is contained in:
Mahmoud Ben Hassine
2021-02-02 13:49:12 +01:00
parent edc13ee0f0
commit ee282ab97f

View File

@@ -154,6 +154,8 @@ public class ScriptItemProcessorTests {
@Test
public void testItemBinding() throws Exception {
assumeTrue(languageExists("javascript"));
ScriptItemProcessor<String, Object> scriptItemProcessor = new ScriptItemProcessor<>();
scriptItemProcessor.setScriptSource("foo.contains('World');", "javascript");
scriptItemProcessor.setItemBindingVariableName("foo");