@Test public void testExecuteThrowsClassCastException() throws Throwable { Map<Integer, String> arguments = new HashMap(); arguments.put(Integer.valueOf(1), "1"); Collection<String> returnNames = new ArrayList(); try { new BSHMethod("testBSHMethodBshData", true).execute(arguments, returnNames); fail("Expected ClassCastException to be thrown"); } catch (ClassCastException ex) { assertEquals(ClassCastException.class, ex.getClass(), "ex.getClass()"); assertEquals(1, 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();  }