Class 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
    • Constructor Detail

      • FluentJavaDelegateMock

        public FluentJavaDelegateMock()
    • Method Detail

      • execute

        public void execute​(org.camunda.bpm.engine.delegate.DelegateExecution execution)
                     throws Exception
        Specified by:
        execute in interface org.camunda.bpm.engine.delegate.JavaDelegate
        Throws:
        Exception
      • onExecutionSetVariables

        public void onExecutionSetVariables​(org.camunda.bpm.engine.variable.VariableMap variables)
        Specified by:
        onExecutionSetVariables in class FluentMock<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: FluentMock
        Sets consecutive return values to be returned when the method is called. E.g:
        
         mock.onExecutionSetVariables(variableMap1, variableMap2, variableMap3);
         
        Last return value in the sequence (in example: variableMap3) determines the behavior of further consecutive calls.

        Specified by:
        onExecutionSetVariables in class FluentMock<org.camunda.bpm.engine.delegate.JavaDelegate,​org.camunda.bpm.engine.delegate.DelegateExecution>
        Parameters:
        variableMap - first variables that will be returned
        values - next variables that will be return
      • onExecutionThrowBpmnError

        public void onExecutionThrowBpmnError​(org.camunda.bpm.engine.delegate.BpmnError bpmnError)
        Description copied from class: FluentMock
        The implementation of throw-bpmn-error depends on the concrete type.
        Specified by:
        onExecutionThrowBpmnError in class FluentMock<org.camunda.bpm.engine.delegate.JavaDelegate,​org.camunda.bpm.engine.delegate.DelegateExecution>
        Parameters:
        bpmnError - the error instance
      • onExecutionThrowException

        public void onExecutionThrowException​(Exception exception)
        Description copied from class: FluentMock
        The mock will throw the given exception on execution.
        Specified by:
        onExecutionThrowException in class FluentMock<org.camunda.bpm.engine.delegate.JavaDelegate,​org.camunda.bpm.engine.delegate.DelegateExecution>
        Parameters:
        exception - the exception instance