Search in sources :

Example 1 with ScriptAccessor

use of org.junit.jupiter.engine.script.ScriptAccessor in project junit5 by junit-team.

the class ScriptExecutionEvaluator method createBindings.

private Bindings createBindings(ExtensionContext context) {
    ScriptAccessor configurationParameterAccessor = new ScriptAccessor.ConfigurationParameterAccessor(context);
    Bindings bindings = new SimpleBindings();
    bindings.put(Script.BIND_JUNIT_TAGS, context.getTags());
    bindings.put(Script.BIND_JUNIT_UNIQUE_ID, context.getUniqueId());
    bindings.put(Script.BIND_JUNIT_DISPLAY_NAME, context.getDisplayName());
    bindings.put(Script.BIND_JUNIT_CONFIGURATION_PARAMETER, configurationParameterAccessor);
    return bindings;
}
Also used : SimpleBindings(javax.script.SimpleBindings) ScriptAccessor(org.junit.jupiter.engine.script.ScriptAccessor) Bindings(javax.script.Bindings) SimpleBindings(javax.script.SimpleBindings)

Aggregations

Bindings (javax.script.Bindings)1 SimpleBindings (javax.script.SimpleBindings)1 ScriptAccessor (org.junit.jupiter.engine.script.ScriptAccessor)1