use of org.mvel2.tests.core.res.Ship in project mvel by mvel.
the class CoreConfidenceTests method testMVEL190.
public void testMVEL190() {
ParserContext context = new ParserContext();
context.addImport(Ship.class);
context.addImport(MapObject.class);
context.addInput("obj", MapObject.class);
Object compiled = MVEL.compileExpression("((Ship) obj).getName()", context);
Map<String, Object> vars = new HashMap<String, Object>();
vars.put("obj", new Ship());
VariableResolverFactory varsResolver = new MapVariableResolverFactory(vars);
System.out.println(executeExpression(compiled, varsResolver));
}
use of org.mvel2.tests.core.res.Ship in project mvel by mikebrock.
the class CoreConfidenceTests method testMVEL190.
public void testMVEL190() {
ParserContext context = new ParserContext();
context.addImport(Ship.class);
context.addImport(MapObject.class);
context.addInput("obj", MapObject.class);
Object compiled = MVEL.compileExpression("((Ship) obj).getName()", context);
Map<String, Object> vars = new HashMap<String, Object>();
vars.put("obj", new Ship());
VariableResolverFactory varsResolver = new MapVariableResolverFactory(vars);
System.out.println(executeExpression(compiled, varsResolver));
}
Aggregations