@Test(expected = ExecutionException.class) public void testExecutionException() { expectValidatePrincipal(true); expectAuthorizePrincipal(true); mockery.checking(new Expectations() { { oneOf(executionStrategy).execute(with(contextWithPrincipalMatcher)); will(throwException(new ExecutionException("BAD!"))); } }); coreTest(true, serviceAction, serviceActionInnerContext, childParam); mockery.assertIsSatisfied(); }
public Serializable execute(final Action action, final TaskHandlerActionContext< ? extends ActionContext> context, final Serializable params) { return execute(new TaskHandlerAction() { public ValidationStrategy getValidationStrategy() { return action.getValidationStrategy(); } public AuthorizationStrategy getAuthorizationStrategy() { return action.getAuthorizationStrategy(); } public TaskHandlerExecutionStrategy getExecutionStrategy() { return new TaskHandlerExecutionStrategy<ActionContext>() { public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { return action.getExecutionStrategy().execute(inActionContext.getActionContext()); } }; } public boolean isReadOnly() { return action.isReadOnly(); } public TaskHandler getTaskHandler() { return null; } }, context, params); }
InlineActionExecutor { public Serializable execute(final Action action, final TaskHandlerActionContext< ? extends ActionContext> context, final Serializable params) { return execute(new TaskHandlerAction() { public ValidationStrategy getValidationStrategy() { return action.getValidationStrategy(); } public AuthorizationStrategy getAuthorizationStrategy() { return action.getAuthorizationStrategy(); } public TaskHandlerExecutionStrategy getExecutionStrategy() { return new TaskHandlerExecutionStrategy<ActionContext>() { public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { return action.getExecutionStrategy().execute(inActionContext.getActionContext()); } }; } public boolean isReadOnly() { return action.isReadOnly(); } public TaskHandler getTaskHandler() { return null; } }, context, params); } }
InlineActionExecutor { public Serializable execute(final Action action, final TaskHandlerActionContext< ? extends ActionContext> context, final Serializable params) { return execute(new TaskHandlerAction() { public ValidationStrategy getValidationStrategy() { return action.getValidationStrategy(); } public AuthorizationStrategy getAuthorizationStrategy() { return action.getAuthorizationStrategy(); } public TaskHandlerExecutionStrategy getExecutionStrategy() { return new TaskHandlerExecutionStrategy<ActionContext>() { public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { return action.getExecutionStrategy().execute(inActionContext.getActionContext()); } }; } public boolean isReadOnly() { return action.isReadOnly(); } public TaskHandler getTaskHandler() { return null; } }, context, params); } InlineActionExecutor(final boolean inExternalActionSelection); }
InlineActionExecutor { public Serializable execute(final Action action, final TaskHandlerActionContext< ? extends ActionContext> context, final Serializable params) { return execute(new TaskHandlerAction() { public ValidationStrategy getValidationStrategy() { return action.getValidationStrategy(); } public AuthorizationStrategy getAuthorizationStrategy() { return action.getAuthorizationStrategy(); } public TaskHandlerExecutionStrategy getExecutionStrategy() { return new TaskHandlerExecutionStrategy<ActionContext>() { public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { return action.getExecutionStrategy().execute(inActionContext.getActionContext()); } }; } public boolean isReadOnly() { return action.isReadOnly(); } public TaskHandler getTaskHandler() { return null; } }, context, params); } InlineActionExecutor(final boolean inExternalActionSelection); Serializable execute(final Action action, final TaskHandlerActionContext< ? extends ActionContext> context,
            final Serializable params); Serializable execute(final TaskHandlerAction action,
            final TaskHandlerActionContext< ? extends ActionContext> context, final Serializable params); }
InlineActionExecutor { public Serializable execute(final Action action, final TaskHandlerActionContext< ? extends ActionContext> context, final Serializable params) { return execute(new TaskHandlerAction() { public ValidationStrategy getValidationStrategy() { return action.getValidationStrategy(); } public AuthorizationStrategy getAuthorizationStrategy() { return action.getAuthorizationStrategy(); } public TaskHandlerExecutionStrategy getExecutionStrategy() { return new TaskHandlerExecutionStrategy<ActionContext>() { public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { return action.getExecutionStrategy().execute(inActionContext.getActionContext()); } }; } public boolean isReadOnly() { return action.isReadOnly(); } public TaskHandler getTaskHandler() { return null; } }, context, params); } InlineActionExecutor(final boolean inExternalActionSelection); Serializable execute(final Action action, final TaskHandlerActionContext< ? extends ActionContext> context,
            final Serializable params); Serializable execute(final TaskHandlerAction action,
            final TaskHandlerActionContext< ? extends ActionContext> context, final Serializable params);  }