@Test public void test() { final List<UserActionRequest> uars = new ArrayList<UserActionRequest>(); context.checking(new Expectations() { { oneOf(taskActionContext).getActionContext(); will(returnValue(actionContext)); oneOf(actionContext).getParams(); will(returnValue(activityId)); oneOf(hideResourceActivityMapper).execute(activityId); oneOf(taskActionContext).getUserActionRequests(); will(returnValue(uars)); } }); sut.execute(taskActionContext); assertEquals(1, uars.size()); context.assertIsSatisfied(); }
@Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { Long activityId = (Long) inActionContext.getActionContext().getParams(); hideResourceActivityMapper.execute(activityId); inActionContext.getUserActionRequests().add( new UserActionRequest("hideResourceActivityCacheUpdate", null, activityId)); return true; }
HideResourceActivityExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { Long activityId = (Long) inActionContext.getActionContext().getParams(); hideResourceActivityMapper.execute(activityId); inActionContext.getUserActionRequests().add( new UserActionRequest("hideResourceActivityCacheUpdate", null, activityId)); return true; } }
HideResourceActivityExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { Long activityId = (Long) inActionContext.getActionContext().getParams(); hideResourceActivityMapper.execute(activityId); inActionContext.getUserActionRequests().add( new UserActionRequest("hideResourceActivityCacheUpdate", null, activityId)); return true; } HideResourceActivityExecution(final DomainMapper<Long, Void> inHideResourceActivityMapper); }
HideResourceActivityExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { Long activityId = (Long) inActionContext.getActionContext().getParams(); hideResourceActivityMapper.execute(activityId); inActionContext.getUserActionRequests().add( new UserActionRequest("hideResourceActivityCacheUpdate", null, activityId)); return true; } HideResourceActivityExecution(final DomainMapper<Long, Void> inHideResourceActivityMapper); @Override Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext); }
HideResourceActivityExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { Long activityId = (Long) inActionContext.getActionContext().getParams(); hideResourceActivityMapper.execute(activityId); inActionContext.getUserActionRequests().add( new UserActionRequest("hideResourceActivityCacheUpdate", null, activityId)); return true; } HideResourceActivityExecution(final DomainMapper<Long, Void> inHideResourceActivityMapper); @Override Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext);  }