@Test public void testExecute() { final Integer startIndex = 324; final Integer endIndex = 898; final PagedSet<DomainGroupModelView> expectedReturnValue = new PagedSet<DomainGroupModelView>(); context.checking(new Expectations() { { oneOf(actionMapper).execute( with(IsEqualInternally.equalInternally(new GetPendingDomainGroupsRequest(startIndex, endIndex)))); will(returnValue(expectedReturnValue)); } }); Serializable returnValue = sut.execute(new ActionContext() { private static final long serialVersionUID = -2804552268718221598L; @Override public GetPendingGroupsRequest getParams() { return new GetPendingGroupsRequest(startIndex, endIndex); } @Override public Map<String, Object> getState() { return new HashMap<String, Object>(); } @Override public String getActionId() { return null; } @Override public void setActionId(final String inActionId) { } }); assertSame(expectedReturnValue, returnValue); }
@Override public Serializable execute(final ActionContext inActionContext) { GetPendingGroupsRequest actionRequest = (GetPendingGroupsRequest) inActionContext.getParams(); GetPendingDomainGroupsRequest request = new GetPendingDomainGroupsRequest(actionRequest.getStartIndex(), actionRequest.getEndIndex()); PagedSet<DomainGroupModelView> pendingGroups = actionMapper.execute(request); if (log.isTraceEnabled()) { log.trace("Found " + pendingGroups.getTotal() + " Pending Groups."); } return pendingGroups; }
GetPendingGroupsExecutionStrategy implements ExecutionStrategy<ActionContext> { @Override public Serializable execute(final ActionContext inActionContext) { GetPendingGroupsRequest actionRequest = (GetPendingGroupsRequest) inActionContext.getParams(); GetPendingDomainGroupsRequest request = new GetPendingDomainGroupsRequest(actionRequest.getStartIndex(), actionRequest.getEndIndex()); PagedSet<DomainGroupModelView> pendingGroups = actionMapper.execute(request); if (log.isTraceEnabled()) { log.trace("Found " + pendingGroups.getTotal() + " Pending Groups."); } return pendingGroups; } }
GetPendingGroupsExecutionStrategy implements ExecutionStrategy<ActionContext> { @Override public Serializable execute(final ActionContext inActionContext) { GetPendingGroupsRequest actionRequest = (GetPendingGroupsRequest) inActionContext.getParams(); GetPendingDomainGroupsRequest request = new GetPendingDomainGroupsRequest(actionRequest.getStartIndex(), actionRequest.getEndIndex()); PagedSet<DomainGroupModelView> pendingGroups = actionMapper.execute(request); if (log.isTraceEnabled()) { log.trace("Found " + pendingGroups.getTotal() + " Pending Groups."); } return pendingGroups; } GetPendingGroupsExecutionStrategy(final GetPendingDomainGroupsMapper inActionMapper); }
GetPendingGroupsExecutionStrategy implements ExecutionStrategy<ActionContext> { @Override public Serializable execute(final ActionContext inActionContext) { GetPendingGroupsRequest actionRequest = (GetPendingGroupsRequest) inActionContext.getParams(); GetPendingDomainGroupsRequest request = new GetPendingDomainGroupsRequest(actionRequest.getStartIndex(), actionRequest.getEndIndex()); PagedSet<DomainGroupModelView> pendingGroups = actionMapper.execute(request); if (log.isTraceEnabled()) { log.trace("Found " + pendingGroups.getTotal() + " Pending Groups."); } return pendingGroups; } GetPendingGroupsExecutionStrategy(final GetPendingDomainGroupsMapper inActionMapper); @Override Serializable execute(final ActionContext inActionContext); }
GetPendingGroupsExecutionStrategy implements ExecutionStrategy<ActionContext> { @Override public Serializable execute(final ActionContext inActionContext) { GetPendingGroupsRequest actionRequest = (GetPendingGroupsRequest) inActionContext.getParams(); GetPendingDomainGroupsRequest request = new GetPendingDomainGroupsRequest(actionRequest.getStartIndex(), actionRequest.getEndIndex()); PagedSet<DomainGroupModelView> pendingGroups = actionMapper.execute(request); if (log.isTraceEnabled()) { log.trace("Found " + pendingGroups.getTotal() + " Pending Groups."); } return pendingGroups; } GetPendingGroupsExecutionStrategy(final GetPendingDomainGroupsMapper inActionMapper); @Override Serializable execute(final ActionContext inActionContext);  }