@Test public void performAction() throws Exception { context.checking(new Expectations() { { oneOf(deleteMapper).execute(with(any(FindByIdRequest.class))); will(returnValue(true)); allowing(ac).getParams(); will(returnValue(testParam)); allowing(testParam).getFeedSubscriberId(); will(returnValue(1L)); } }); sut.execute(ac); context.assertIsSatisfied(); }
@Override public Boolean execute(final ActionContext inActionContext) throws ExecutionException { DeleteFeedSubscriptionRequest request = (DeleteFeedSubscriptionRequest) inActionContext.getParams(); return deleteMapper.execute(request.getFeedSubscriberId()); }
DeleteFeedSubscriberExecution implements ExecutionStrategy<ActionContext> { @Override public Boolean execute(final ActionContext inActionContext) throws ExecutionException { DeleteFeedSubscriptionRequest request = (DeleteFeedSubscriptionRequest) inActionContext.getParams(); return deleteMapper.execute(request.getFeedSubscriberId()); } }
DeleteFeedSubscriberExecution implements ExecutionStrategy<ActionContext> { @Override public Boolean execute(final ActionContext inActionContext) throws ExecutionException { DeleteFeedSubscriptionRequest request = (DeleteFeedSubscriptionRequest) inActionContext.getParams(); return deleteMapper.execute(request.getFeedSubscriberId()); } DeleteFeedSubscriberExecution(final DomainMapper<Long, Boolean> inDeleteMapper); }
DeleteFeedSubscriberExecution implements ExecutionStrategy<ActionContext> { @Override public Boolean execute(final ActionContext inActionContext) throws ExecutionException { DeleteFeedSubscriptionRequest request = (DeleteFeedSubscriptionRequest) inActionContext.getParams(); return deleteMapper.execute(request.getFeedSubscriberId()); } DeleteFeedSubscriberExecution(final DomainMapper<Long, Boolean> inDeleteMapper); @Override Boolean execute(final ActionContext inActionContext); }
DeleteFeedSubscriberExecution implements ExecutionStrategy<ActionContext> { @Override public Boolean execute(final ActionContext inActionContext) throws ExecutionException { DeleteFeedSubscriptionRequest request = (DeleteFeedSubscriptionRequest) inActionContext.getParams(); return deleteMapper.execute(request.getFeedSubscriberId()); } DeleteFeedSubscriberExecution(final DomainMapper<Long, Boolean> inDeleteMapper); @Override Boolean execute(final ActionContext inActionContext);  }