@Test public final void testPerformActionNoGroup() { context.checking(new Expectations() { { allowing(actionContext).getParams(); will(returnValue(params)); allowing(params).getQueryString(); will(returnValue(QUERY_STRING)); oneOf(lookup).execute(with(any(LdapLookupRequest.class))); will(returnValue(results)); } }); assertEquals(false, sut.execute(actionContext)); context.assertIsSatisfied(); }
@Override public Boolean execute(final ActionContext inActionContext) throws ExecutionException { GroupLookupRequest params = (GroupLookupRequest) inActionContext.getParams(); List<LdapGroup> results = groupMapper.execute(new LdapLookupRequest(params.getQueryString())); return results.size() > 0; }
VerifyLdapGroupExecution implements ExecutionStrategy<ActionContext> { @Override public Boolean execute(final ActionContext inActionContext) throws ExecutionException { GroupLookupRequest params = (GroupLookupRequest) inActionContext.getParams(); List<LdapGroup> results = groupMapper.execute(new LdapLookupRequest(params.getQueryString())); return results.size() > 0; } }
VerifyLdapGroupExecution implements ExecutionStrategy<ActionContext> { @Override public Boolean execute(final ActionContext inActionContext) throws ExecutionException { GroupLookupRequest params = (GroupLookupRequest) inActionContext.getParams(); List<LdapGroup> results = groupMapper.execute(new LdapLookupRequest(params.getQueryString())); return results.size() > 0; } VerifyLdapGroupExecution(final LdapLookup<LdapGroup> inGroupMapper); }
VerifyLdapGroupExecution implements ExecutionStrategy<ActionContext> { @Override public Boolean execute(final ActionContext inActionContext) throws ExecutionException { GroupLookupRequest params = (GroupLookupRequest) inActionContext.getParams(); List<LdapGroup> results = groupMapper.execute(new LdapLookupRequest(params.getQueryString())); return results.size() > 0; } VerifyLdapGroupExecution(final LdapLookup<LdapGroup> inGroupMapper); @Override Boolean execute(final ActionContext inActionContext); }
VerifyLdapGroupExecution implements ExecutionStrategy<ActionContext> { @Override public Boolean execute(final ActionContext inActionContext) throws ExecutionException { GroupLookupRequest params = (GroupLookupRequest) inActionContext.getParams(); List<LdapGroup> results = groupMapper.execute(new LdapLookupRequest(params.getQueryString())); return results.size() > 0; } VerifyLdapGroupExecution(final LdapLookup<LdapGroup> inGroupMapper); @Override Boolean execute(final ActionContext inActionContext);  }