@Test public void testPerformAction() throws Exception { context.checking(new Expectations() { { DeleteIdsFromListsRequest request = new DeleteIdsFromListsRequest(Arrays.asList( "someKey", "anotherKey"), Arrays.asList(1L, 2L)); oneOf(actionContext).getParams(); will(returnValue(request)); allowing(removeMapper).execute(with(any(DeleteIdsFromListsRequest.class))); } }); sut.execute(actionContext); context.assertIsSatisfied(); }
@Override public Boolean execute(final ActionContext inActionContext) { deleteMapper.execute((DeleteIdsFromListsRequest) inActionContext.getParams()); return Boolean.TRUE; }
DeleteIdsFromListsExecution implements ExecutionStrategy<ActionContext> { @Override public Boolean execute(final ActionContext inActionContext) { deleteMapper.execute((DeleteIdsFromListsRequest) inActionContext.getParams()); return Boolean.TRUE; } }
DeleteIdsFromListsExecution implements ExecutionStrategy<ActionContext> { @Override public Boolean execute(final ActionContext inActionContext) { deleteMapper.execute((DeleteIdsFromListsRequest) inActionContext.getParams()); return Boolean.TRUE; } DeleteIdsFromListsExecution(final RemoveIdsFromLists inDeleteMapper); }
DeleteIdsFromListsExecution implements ExecutionStrategy<ActionContext> { @Override public Boolean execute(final ActionContext inActionContext) { deleteMapper.execute((DeleteIdsFromListsRequest) inActionContext.getParams()); return Boolean.TRUE; } DeleteIdsFromListsExecution(final RemoveIdsFromLists inDeleteMapper); @Override Boolean execute(final ActionContext inActionContext); }
DeleteIdsFromListsExecution implements ExecutionStrategy<ActionContext> { @Override public Boolean execute(final ActionContext inActionContext) { deleteMapper.execute((DeleteIdsFromListsRequest) inActionContext.getParams()); return Boolean.TRUE; } DeleteIdsFromListsExecution(final RemoveIdsFromLists inDeleteMapper); @Override Boolean execute(final ActionContext inActionContext);  }