421422423424425426427428429430431
Invoke invoke=new Invoke("test", rp, "sameMethod", args, RESULT_KEY); ObjectSource os=new HashMapObjectSource(new DefaultGenericConverter()); os.set("arg", "33"); invoke.execute(os); Assert.assertEquals("Integer", os.get(RESULT_KEY)); } }
441442443444445446447448449450451
Invoke invoke=new Invoke("test", rp, "sameMethod", args, RESULT_KEY); ObjectSource os=new HashMapObjectSource(new DefaultGenericConverter()); os.set("arg", "33"); invoke.execute(os); Assert.assertEquals("int", os.get(RESULT_KEY)); } @Test
459460461462463464465466467468469
Invoke invoke=new Invoke("test", rp, "sameMethod", args, RESULT_KEY); ObjectSource os=new HashMapObjectSource(new DefaultGenericConverter()); invoke.execute(os); Assert.assertNotNull(os.get(RESULT_KEY)); } @Test
482483484485486487488489490491492
src.put("age", 5); ObjectSource os=new HashMapObjectSource(new DefaultGenericConverter()); os.set("arg0", src); invoke.execute(os); JavaBeanSub re=os.get("result"); Assert.assertEquals(1, re.getId().intValue()); Assert.assertEquals("generic", re.getName());
506507508509510511512513514515516
530531532533534535536537538539540
567568569570571572573574575576577
604605606607608609610611612613614
631632633634635636637638639640641
os.set("arg1", "arg1"); ArgPrepareExecuteException re=null; try { invoke.execute(os); } catch(ArgPrepareExecuteException e) { re=e; }
653654655656657658659660661662663
Invoke invoke=new Invoke("test", rp, "testThrow", null, RESULT_KEY); InvocationExecuteException re=null; try { invoke.execute(new HashMapObjectSource()); } catch(InvocationExecuteException e) { re=e; }