LocalActionInvoker extends DefaultActionInvoker { @Override public IActionInvokeStatus invokeAction( final IAction actionBean, final String actionUser, final Map<String, Serializable> params ) throws Exception { ActionUtil.prepareMap( params ); getStreamProvider( params ); return super.invokeAction( actionBean, actionUser, params ); }  @Override IActionInvokeStatus invokeAction( final IAction actionBean,
                                           final String actionUser,
                                           final Map<String, Serializable> params );  }
@Test public void invokeActionLocallyTest() throws Exception { Map<String, Serializable> testMap = new HashMap<>(); testMap.put( ActionUtil.QUARTZ_ACTIONCLASS, "one" ); testMap.put( ActionUtil.QUARTZ_ACTIONUSER, "two" ); IAction iaction = ActionUtil.createActionBean( ActionSequenceAction.class.getName(), null ); ActionInvokeStatus actionInvokeStatus = (ActionInvokeStatus) defaultActionInvoker.invokeAction( iaction, "aUser", testMap ); Assert.assertFalse( actionInvokeStatus.requiresUpdate() ); }
@Test public void invokeActionTest() throws Exception { Map<String, Serializable> testMap = new HashMap<>(); testMap.put( ActionUtil.QUARTZ_ACTIONCLASS, "one" ); testMap.put( ActionUtil.QUARTZ_ACTIONUSER, "two" ); IAction iaction = ActionUtil.createActionBean( ActionSequenceAction.class.getName(), null ); ActionInvokeStatus actionInvokeStatus = (ActionInvokeStatus) defaultActionInvoker.invokeAction( iaction, "aUser", testMap ); Assert.assertFalse( actionInvokeStatus.requiresUpdate() ); }
@Test( expected = ActionInvocationException.class ) public void invokeActionLocallyWithNullsThrowsExceptionTest() throws Exception { defaultActionInvoker.invokeAction( null, "aUser", null ); }