@Test public void testExecute() { final List<UserActionRequest> requests = new ArrayList<UserActionRequest>(); context.checking(new Expectations() { { allowing(taskHandlerConext).getActionContext(); will(returnValue(actionContext)); allowing(actionContext).getParams(); will(returnValue(featuredStreamId)); allowing(deleteMapper).execute(featuredStreamId); allowing(taskHandlerConext).getUserActionRequests(); will(returnValue(requests)); } }); sut.execute(taskHandlerConext); Assert.assertEquals(1, requests.size()); Assert.assertEquals("regenerateStreamDiscoverListsAction", requests.get(0).getActionKey()); context.assertIsSatisfied(); }
@Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { deleteMapper.execute((Long) inActionContext.getActionContext().getParams()); inActionContext.getUserActionRequests().add( new UserActionRequest("regenerateStreamDiscoverListsAction", null, null)); return true; }
DeleteFeaturedStreamExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { deleteMapper.execute((Long) inActionContext.getActionContext().getParams()); inActionContext.getUserActionRequests().add( new UserActionRequest("regenerateStreamDiscoverListsAction", null, null)); return true; } }
DeleteFeaturedStreamExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { deleteMapper.execute((Long) inActionContext.getActionContext().getParams()); inActionContext.getUserActionRequests().add( new UserActionRequest("regenerateStreamDiscoverListsAction", null, null)); return true; } DeleteFeaturedStreamExecution(final DomainMapper<Long, Void> inDeleteMapper); }
DeleteFeaturedStreamExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { deleteMapper.execute((Long) inActionContext.getActionContext().getParams()); inActionContext.getUserActionRequests().add( new UserActionRequest("regenerateStreamDiscoverListsAction", null, null)); return true; } DeleteFeaturedStreamExecution(final DomainMapper<Long, Void> inDeleteMapper); @Override Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext); }
DeleteFeaturedStreamExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { deleteMapper.execute((Long) inActionContext.getActionContext().getParams()); inActionContext.getUserActionRequests().add( new UserActionRequest("regenerateStreamDiscoverListsAction", null, null)); return true; } DeleteFeaturedStreamExecution(final DomainMapper<Long, Void> inDeleteMapper); @Override Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext);  }