public final class FluentJavaDelegateMock extends Object implements org.camunda.bpm.engine.delegate.JavaDelegate
| Modifier and Type | Field and Description |
|---|---|
protected T |
mock |
protected Class<P> |
parameterType |
| Constructor and Description |
|---|
FluentJavaDelegateMock() |
| Modifier and Type | Method and Description |
|---|---|
protected P |
any() |
void |
execute(org.camunda.bpm.engine.delegate.DelegateExecution execution) |
T |
getMock() |
void |
onExecutionSetVariable(String key,
Object value) |
void |
onExecutionSetVariables(Map<String,Object> variables) |
void |
onExecutionSetVariables(org.camunda.bpm.engine.variable.VariableMap variables) |
void |
onExecutionThrowBpmnError(org.camunda.bpm.engine.delegate.BpmnError bpmnError)
The implementation of throw-bpmn-error depends on the concrete type.
|
void |
onExecutionThrowBpmnError(String errorCode)
The mock will throw a BpmnError with given errorCode.
|
void |
onExecutionThrowBpmnError(String errorCode,
String message)
The mock will throw a BpmnError with given errorCode and message.
|
void |
onExecutionThrowException(Exception exception)
The mock will throw the given exception on execution.
|
protected void |
setVariables(org.camunda.bpm.engine.delegate.VariableScope variableScope,
Map<String,Object> variables) |
protected final T mock
protected final Class<P extends org.camunda.bpm.engine.delegate.VariableScope> parameterType
public void execute(org.camunda.bpm.engine.delegate.DelegateExecution execution)
throws Exception
execute in interface org.camunda.bpm.engine.delegate.JavaDelegateExceptionpublic void onExecutionSetVariables(org.camunda.bpm.engine.variable.VariableMap variables)
variables - the process variables this delegate sets when executedpublic void onExecutionThrowBpmnError(org.camunda.bpm.engine.delegate.BpmnError bpmnError)
bpmnError - the error instancepublic void onExecutionThrowException(Exception exception)
exception - the exception instanceprotected void setVariables(org.camunda.bpm.engine.delegate.VariableScope variableScope,
Map<String,Object> variables)
public void onExecutionSetVariable(String key, Object value)
key - of the process variables this delegate sets when executedvalue - of the process variables this delegate sets when executedpublic void onExecutionSetVariables(Map<String,Object> variables)
variables - the process variables this delegate sets when executedpublic void onExecutionThrowBpmnError(String errorCode)
errorCode - the error codepublic void onExecutionThrowBpmnError(String errorCode, String message)
errorCode - the error codemessage - the error messagepublic T getMock()
protected P any()
Copyright © 2020 Camunda Services GmbH. All rights reserved.