@Test public void testExecute() { context.checking(new Expectations() { { allowing(taskHandlerActionContextMock).getActionContext(); will(returnValue(serviceActionContextMock)); allowing(serviceActionContextMock).getParams(); will(returnValue(null)); oneOf(taskHandlerActionContextMock).getUserActionRequests(); } }); sut.execute(taskHandlerActionContextMock); }
@Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { if (log.isInfoEnabled()) { String params = "(null)"; if (inActionContext.getActionContext().getParams() != null) { params = inActionContext.getActionContext().getParams().toString(); } log.info("Scheduling action named '" + actionName + "' with params: " + params + " for async processing."); } inActionContext.getUserActionRequests().add( new UserActionRequest(actionName, null, inActionContext.getActionContext().getParams())); return null; }
AsyncActionSchedulerExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { if (log.isInfoEnabled()) { String params = "(null)"; if (inActionContext.getActionContext().getParams() != null) { params = inActionContext.getActionContext().getParams().toString(); } log.info("Scheduling action named '" + actionName + "' with params: " + params + " for async processing."); } inActionContext.getUserActionRequests().add( new UserActionRequest(actionName, null, inActionContext.getActionContext().getParams())); return null; } }
AsyncActionSchedulerExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { if (log.isInfoEnabled()) { String params = "(null)"; if (inActionContext.getActionContext().getParams() != null) { params = inActionContext.getActionContext().getParams().toString(); } log.info("Scheduling action named '" + actionName + "' with params: " + params + " for async processing."); } inActionContext.getUserActionRequests().add( new UserActionRequest(actionName, null, inActionContext.getActionContext().getParams())); return null; } AsyncActionSchedulerExecution(final String inActionName); }
AsyncActionSchedulerExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { if (log.isInfoEnabled()) { String params = "(null)"; if (inActionContext.getActionContext().getParams() != null) { params = inActionContext.getActionContext().getParams().toString(); } log.info("Scheduling action named '" + actionName + "' with params: " + params + " for async processing."); } inActionContext.getUserActionRequests().add( new UserActionRequest(actionName, null, inActionContext.getActionContext().getParams())); return null; } AsyncActionSchedulerExecution(final String inActionName); @Override Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext); }
AsyncActionSchedulerExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { if (log.isInfoEnabled()) { String params = "(null)"; if (inActionContext.getActionContext().getParams() != null) { params = inActionContext.getActionContext().getParams().toString(); } log.info("Scheduling action named '" + actionName + "' with params: " + params + " for async processing."); } inActionContext.getUserActionRequests().add( new UserActionRequest(actionName, null, inActionContext.getActionContext().getParams())); return null; } AsyncActionSchedulerExecution(final String inActionName); @Override Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext);  }