Interface ScriptEvaluator

All Known Implementing Classes:
ScriptEngineScriptEvaluator

@Incubating public interface ScriptEvaluator
Used to evaluate script expressions for ScriptAssert and ParameterScriptAssert constraints.

The default implementation ScriptEngineScriptEvaluator is a wrapper around JSR 223 ScriptEngines. It can also be any user specific implementation.

Since:
6.0.3
Author:
Marko Bekhta
  • Method Summary

    Modifier and Type
    Method
    Description
    evaluate(String script, Map<String,Object> bindings)
    Evaluates a script expression and returns the result of this evaluation.
  • Method Details

    • evaluate

      Object evaluate(String script, Map<String,Object> bindings) throws ScriptEvaluationException
      Evaluates a script expression and returns the result of this evaluation.
      Parameters:
      script - a script to evaluate
      bindings - the bindings to be used
      Returns:
      the result of script evaluation
      Throws:
      ScriptEvaluationException - in case an error occurred during the script evaluation