use of com.twosigma.beakerx.groovy.kernel.GroovyDefaultVariables in project beakerx by twosigma.
the class GroovyEvaluatorTest method initClassStubData.
@BeforeClass
public static void initClassStubData() throws IOException {
GroovyDefaultVariables var = new GroovyDefaultVariables();
HashMap<String, Object> params = new HashMap<>();
params.put(IMPORTS, var.getImports());
params.put(CLASSPATH, var.getClassPath());
EvaluatorParameters kernelParameters = new EvaluatorParameters(params);
GroovyEvaluator groovyEvaluator = new GroovyEvaluator("123", "345", cellExecutor(), getTestTempFolderFactory(), kernelParameters);
groovyEvaluator.setShellOptions(kernelParameters);
groovyClassLoader = newEvaluator(groovyEvaluator.getImports(), groovyEvaluator.getClasspath(), groovyEvaluator.getOutDir(), icz, newParentClassLoader(groovyEvaluator.getClasspath()));
scriptBinding = new Binding();
scriptBinding.setVariable("beaker", NamespaceClient.getBeaker("345"));
groovyKernel = new GroovyKernelMock("groovyEvaluatorTest", groovyEvaluator);
KernelManager.register(groovyKernel);
}
Aggregations