Class FluentJavaDelegateMock
java.lang.Object
org.camunda.community.mockito.mock.FluentMock<org.camunda.bpm.engine.delegate.JavaDelegate,org.camunda.bpm.engine.delegate.DelegateExecution>
org.camunda.community.mockito.mock.FluentJavaDelegateMock
- All Implemented Interfaces:
org.camunda.bpm.engine.delegate.JavaDelegate
public class FluentJavaDelegateMock
extends FluentMock<org.camunda.bpm.engine.delegate.JavaDelegate,org.camunda.bpm.engine.delegate.DelegateExecution>
implements org.camunda.bpm.engine.delegate.JavaDelegate
-
Field Summary
Fields inherited from class org.camunda.community.mockito.mock.FluentMock
mock, parameterType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(org.camunda.bpm.engine.delegate.DelegateExecution execution) voidonExecutionSetVariables(org.camunda.bpm.engine.variable.VariableMap variables) voidonExecutionSetVariables(org.camunda.bpm.engine.variable.VariableMap variableMap, org.camunda.bpm.engine.variable.VariableMap... values) Sets consecutive return values to be returned when the method is called.voidonExecutionThrowBpmnError(org.camunda.bpm.engine.delegate.BpmnError bpmnError) The implementation of throw-bpmn-error depends on the concrete type.voidonExecutionThrowException(Exception exception) The mock will throw the given exception on execution.Methods inherited from class org.camunda.community.mockito.mock.FluentMock
any, combineVariableMaps, getMock, onExecutionSetVariable, onExecutionSetVariable, onExecutionSetVariables, onExecutionSetVariables, onExecutionThrowBpmnError, onExecutionThrowBpmnError, setVariables, setVariablesForMultipleInvocations
-
Constructor Details
-
FluentJavaDelegateMock
public FluentJavaDelegateMock()
-
-
Method Details
-
execute
- Specified by:
executein interfaceorg.camunda.bpm.engine.delegate.JavaDelegate- Throws:
Exception
-
onExecutionSetVariables
public void onExecutionSetVariables(org.camunda.bpm.engine.variable.VariableMap variables) - Specified by:
onExecutionSetVariablesin classFluentMock<org.camunda.bpm.engine.delegate.JavaDelegate,org.camunda.bpm.engine.delegate.DelegateExecution> - Parameters:
variables- the process variables this delegate sets when executed
-
onExecutionSetVariables
public void onExecutionSetVariables(org.camunda.bpm.engine.variable.VariableMap variableMap, org.camunda.bpm.engine.variable.VariableMap... values) Description copied from class:FluentMockSets consecutive return values to be returned when the method is called. E.g:
Last return value in the sequence (in example: variableMap3) determines the behavior of further consecutive calls.mock.onExecutionSetVariables(variableMap1, variableMap2, variableMap3);- Specified by:
onExecutionSetVariablesin classFluentMock<org.camunda.bpm.engine.delegate.JavaDelegate,org.camunda.bpm.engine.delegate.DelegateExecution> - Parameters:
variableMap- first variables that will be returnedvalues- next variables that will be return
-
onExecutionThrowBpmnError
public void onExecutionThrowBpmnError(org.camunda.bpm.engine.delegate.BpmnError bpmnError) Description copied from class:FluentMockThe implementation of throw-bpmn-error depends on the concrete type.- Specified by:
onExecutionThrowBpmnErrorin classFluentMock<org.camunda.bpm.engine.delegate.JavaDelegate,org.camunda.bpm.engine.delegate.DelegateExecution> - Parameters:
bpmnError- the error instance
-
onExecutionThrowException
Description copied from class:FluentMockThe mock will throw the given exception on execution.- Specified by:
onExecutionThrowExceptionin classFluentMock<org.camunda.bpm.engine.delegate.JavaDelegate,org.camunda.bpm.engine.delegate.DelegateExecution> - Parameters:
exception- the exception instance
-