* @param expectedResult Object The expected result.
* @return Object The result.
*/
public Object doQuery( Object bean, String expr, Object expectedResult)
{
CompiledScript cscript = compileScript(expr);
try
{
if(bean!=null)
{
context.setAttribute( "this", bean, ScriptContext.ENGINE_SCOPE );
context.setAttribute( "self", bean, ScriptContext.ENGINE_SCOPE );
}
Object res = cscript.eval(context);
assertEquals( expr, expectedResult, res);
return res;
}
catch(ScriptException ex)
{