@Test public void testExecuteThrowsEvalError() throws Throwable { Collection returnNames = new ArrayList(); try { new BSHMethod("testBSHMethod\rBshData", false).execute(arguments, returnNames); fail("Expected EvalError to be thrown"); } catch (EvalError ex) { assertEquals( "Sourced file: inline evaluation of: ``testBSHMethod BshData;'' : Typed variable declaration : Class: testBSHMethod not found in namespace", ex.getMessage(), "ex.getMessage()"); assertEquals( "Sourced file: inline evaluation of: ``testBSHMethod BshData;'' : Typed variable declaration : Class: testBSHMethod not found in namespace", ex.getMessage(), "ex.getMessage()"); assertEquals(0, arguments.size(), "(HashMap) arguments.size()"); assertEquals(0, returnNames.size(), "(ArrayList) returnNames.size()"); } }
public Object execute(Map arguments, String resultName) throws EvalError, IOException { Interpreter i = initInterpreter(arguments); return i.get(resultName); }
BSHMethod { public Object execute(Map arguments, String resultName) throws EvalError, IOException { Interpreter i = initInterpreter(arguments); return i.get(resultName); } }
BSHMethod { public Object execute(Map arguments, String resultName) throws EvalError, IOException { Interpreter i = initInterpreter(arguments); return i.get(resultName); } BSHMethod(String bshData, boolean source); }
BSHMethod { public Object execute(Map arguments, String resultName) throws EvalError, IOException { Interpreter i = initInterpreter(arguments); return i.get(resultName); } BSHMethod(String bshData, boolean source); static BSHMethod createBshMethod(Element e); Object execute(Map arguments, String resultName); Map execute(Map arguments, Collection returnNames); String toString(); }
BSHMethod { public Object execute(Map arguments, String resultName) throws EvalError, IOException { Interpreter i = initInterpreter(arguments); return i.get(resultName); } BSHMethod(String bshData, boolean source); static BSHMethod createBshMethod(Element e); Object execute(Map arguments, String resultName); Map execute(Map arguments, Collection returnNames); String toString();  }