@Test public void testPerformAction() throws Exception { context.checking(new Expectations() { { allowing(taskHandlerActionContext).getActionContext(); will(returnValue(actionContext)); allowing(actionContext).getParams(); will(returnValue(5L)); oneOf(deleteActivityCommentMock).execute(5L); } }); sut.execute(taskHandlerActionContext); context.assertIsSatisfied(); }
@Override public Boolean execute(final TaskHandlerActionContext<ActionContext> inActionContext) { return deleteCommentDAO.execute((Long) inActionContext.getActionContext().getParams()); }
DeleteActivityCommentExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Boolean execute(final TaskHandlerActionContext<ActionContext> inActionContext) { return deleteCommentDAO.execute((Long) inActionContext.getActionContext().getParams()); } }
DeleteActivityCommentExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Boolean execute(final TaskHandlerActionContext<ActionContext> inActionContext) { return deleteCommentDAO.execute((Long) inActionContext.getActionContext().getParams()); } DeleteActivityCommentExecution(final DeleteActivityComment inDeleteActivityComment); }
DeleteActivityCommentExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Boolean execute(final TaskHandlerActionContext<ActionContext> inActionContext) { return deleteCommentDAO.execute((Long) inActionContext.getActionContext().getParams()); } DeleteActivityCommentExecution(final DeleteActivityComment inDeleteActivityComment); @Override Boolean execute(final TaskHandlerActionContext<ActionContext> inActionContext); }
DeleteActivityCommentExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Boolean execute(final TaskHandlerActionContext<ActionContext> inActionContext) { return deleteCommentDAO.execute((Long) inActionContext.getActionContext().getParams()); } DeleteActivityCommentExecution(final DeleteActivityComment inDeleteActivityComment); @Override Boolean execute(final TaskHandlerActionContext<ActionContext> inActionContext);  }