use of org.springframework.scripting.support.ResourceScriptSource in project spring-framework by spring-projects.
the class GroovyScriptEvaluatorTests method testGroovyScriptFromFile.
@Test
public void testGroovyScriptFromFile() {
ScriptEvaluator evaluator = new GroovyScriptEvaluator();
Object result = evaluator.evaluate(new ResourceScriptSource(new ClassPathResource("simple.groovy", getClass())));
assertEquals(6, result);
}
use of org.springframework.scripting.support.ResourceScriptSource in project spring-framework by spring-projects.
the class GroovyScriptEvaluatorTests method testGroovyScriptFromFileUsingJsr223.
@Test
public void testGroovyScriptFromFileUsingJsr223() {
ScriptEvaluator evaluator = new StandardScriptEvaluator();
Object result = evaluator.evaluate(new ResourceScriptSource(new ClassPathResource("simple.groovy", getClass())));
assertEquals(6, result);
}
use of org.springframework.scripting.support.ResourceScriptSource in project spring-framework by spring-projects.
the class BshScriptEvaluatorTests method testBshScriptFromFile.
@Test
public void testBshScriptFromFile() {
ScriptEvaluator evaluator = new BshScriptEvaluator();
Object result = evaluator.evaluate(new ResourceScriptSource(new ClassPathResource("simple.bsh", getClass())));
assertEquals(6, result);
}
Aggregations