Class DelegateExecutionFake

java.lang.Object
org.camunda.bpm.engine.impl.core.variable.scope.AbstractVariableScope
org.camunda.community.mockito.delegate.VariableScopeFake<T>
org.camunda.community.mockito.delegate.DelegateExecutionFake
All Implemented Interfaces:
Serializable, org.camunda.bpm.engine.delegate.BaseDelegateExecution, org.camunda.bpm.engine.delegate.BpmnModelExecutionContext, org.camunda.bpm.engine.delegate.DelegateExecution, org.camunda.bpm.engine.delegate.ProcessEngineServicesAware, org.camunda.bpm.engine.delegate.VariableScope, org.camunda.bpm.engine.impl.core.variable.event.VariableEventDispatcher

public class DelegateExecutionFake extends VariableScopeFake<T> implements org.camunda.bpm.engine.delegate.DelegateExecution
Fake delegateExecution to test simple delegates/listeners without mocking.

Not all operations are support, extend if needed.

See Also:
  • Field Details

  • Constructor Details

    • DelegateExecutionFake

      public DelegateExecutionFake()
    • DelegateExecutionFake

      public DelegateExecutionFake(String id)
  • Method Details

    • of

      public static DelegateExecutionFake of()
    • getProcessInstanceId

      public String getProcessInstanceId()
      Specified by:
      getProcessInstanceId in interface org.camunda.bpm.engine.delegate.DelegateExecution
    • withProcessInstanceId

      public DelegateExecutionFake withProcessInstanceId(String processInstanceId)
    • getProcessBusinessKey

      public String getProcessBusinessKey()
      Specified by:
      getProcessBusinessKey in interface org.camunda.bpm.engine.delegate.DelegateExecution
    • setProcessBusinessKey

      public void setProcessBusinessKey(String processBusinessKey)
      Specified by:
      setProcessBusinessKey in interface org.camunda.bpm.engine.delegate.DelegateExecution
    • withProcessBusinessKey

      public DelegateExecutionFake withProcessBusinessKey(String processBusinessKey)
    • getProcessDefinitionId

      public String getProcessDefinitionId()
      Specified by:
      getProcessDefinitionId in interface org.camunda.bpm.engine.delegate.DelegateExecution
    • withProcessDefinitionId

      public DelegateExecutionFake withProcessDefinitionId(String processDefinitionId)
    • getParentId

      public String getParentId()
      Specified by:
      getParentId in interface org.camunda.bpm.engine.delegate.DelegateExecution
    • withParentId

      public DelegateExecutionFake withParentId(String parentId)
    • getCurrentActivityId

      public String getCurrentActivityId()
      Specified by:
      getCurrentActivityId in interface org.camunda.bpm.engine.delegate.DelegateExecution
    • withCurrentActivityId

      public DelegateExecutionFake withCurrentActivityId(String currentActivityId)
    • getCurrentActivityName

      public String getCurrentActivityName()
      Specified by:
      getCurrentActivityName in interface org.camunda.bpm.engine.delegate.DelegateExecution
    • withCurrentActivityName

      public DelegateExecutionFake withCurrentActivityName(String currentActivityName)
    • getActivityInstanceId

      public String getActivityInstanceId()
      Specified by:
      getActivityInstanceId in interface org.camunda.bpm.engine.delegate.DelegateExecution
    • withActivityInstanceId

      public DelegateExecutionFake withActivityInstanceId(String activityInstanceId)
    • getParentActivityInstanceId

      public String getParentActivityInstanceId()
      Specified by:
      getParentActivityInstanceId in interface org.camunda.bpm.engine.delegate.DelegateExecution
    • withParentActivityInstanceId

      public DelegateExecutionFake withParentActivityInstanceId(String parentActivityInstanceId)
    • getCurrentTransitionId

      public String getCurrentTransitionId()
      Specified by:
      getCurrentTransitionId in interface org.camunda.bpm.engine.delegate.DelegateExecution
    • withCurrentTransitionId

      public DelegateExecutionFake withCurrentTransitionId(String currentTransitionId)
    • getProcessInstance

      public org.camunda.bpm.engine.delegate.DelegateExecution getProcessInstance()
      Specified by:
      getProcessInstance in interface org.camunda.bpm.engine.delegate.DelegateExecution
    • withProcessInstance

      public DelegateExecutionFake withProcessInstance(org.camunda.bpm.engine.delegate.DelegateExecution processInstance)
    • getSuperExecution

      public org.camunda.bpm.engine.delegate.DelegateExecution getSuperExecution()
      Specified by:
      getSuperExecution in interface org.camunda.bpm.engine.delegate.DelegateExecution
    • withSuperExecution

      public DelegateExecutionFake withSuperExecution(org.camunda.bpm.engine.delegate.DelegateExecution superExecution)
    • isCanceled

      public boolean isCanceled()
      Specified by:
      isCanceled in interface org.camunda.bpm.engine.delegate.DelegateExecution
    • withCanceled

      public DelegateExecutionFake withCanceled(boolean canceled)
    • getTenantId

      public String getTenantId()
      Specified by:
      getTenantId in interface org.camunda.bpm.engine.delegate.DelegateExecution
    • withTenantId

      public DelegateExecutionFake withTenantId(String tenantId)
    • setVariable

      public void setVariable(String variableName, Object value, String activityId)
      Specified by:
      setVariable in interface org.camunda.bpm.engine.delegate.DelegateExecution
    • createIncident

      public org.camunda.bpm.engine.runtime.Incident createIncident(String incidentType, String configuration)
      Specified by:
      createIncident in interface org.camunda.bpm.engine.delegate.DelegateExecution
    • createIncident

      public org.camunda.bpm.engine.runtime.Incident createIncident(String incidentType, String configuration, String message)
      Specified by:
      createIncident in interface org.camunda.bpm.engine.delegate.DelegateExecution
    • resolveIncident

      public void resolveIncident(String incidentId)
      Specified by:
      resolveIncident in interface org.camunda.bpm.engine.delegate.DelegateExecution
    • getId

      public String getId()
      Specified by:
      getId in interface org.camunda.bpm.engine.delegate.BaseDelegateExecution
    • withId

      public DelegateExecutionFake withId(String id)
    • getEventName

      public String getEventName()
      Specified by:
      getEventName in interface org.camunda.bpm.engine.delegate.BaseDelegateExecution
    • withEventName

      public DelegateExecutionFake withEventName(String eventName)
    • getBusinessKey

      public String getBusinessKey()
      Specified by:
      getBusinessKey in interface org.camunda.bpm.engine.delegate.BaseDelegateExecution
    • withBusinessKey

      public DelegateExecutionFake withBusinessKey(String businessKey)
    • getBpmnModelInstance

      public org.camunda.bpm.model.bpmn.BpmnModelInstance getBpmnModelInstance()
      Specified by:
      getBpmnModelInstance in interface org.camunda.bpm.engine.delegate.BpmnModelExecutionContext
    • getBpmnModelElementInstance

      public org.camunda.bpm.model.bpmn.instance.FlowElement getBpmnModelElementInstance()
      Specified by:
      getBpmnModelElementInstance in interface org.camunda.bpm.engine.delegate.BpmnModelExecutionContext
    • withBpmnModelElementInstanceType

      public DelegateExecutionFake withBpmnModelElementInstanceType(String type)
    • getIncidents

      public Map<String,org.camunda.bpm.engine.runtime.Incident> getIncidents()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getProcessEngineServices

      public org.camunda.bpm.engine.ProcessEngineServices getProcessEngineServices()
      Specified by:
      getProcessEngineServices in interface org.camunda.bpm.engine.delegate.ProcessEngineServicesAware
    • withProcessEngineServices

      public DelegateExecutionFake withProcessEngineServices(org.camunda.bpm.engine.ProcessEngineServices processEngineServices)
    • getProcessEngine

      public org.camunda.bpm.engine.ProcessEngine getProcessEngine()
      Specified by:
      getProcessEngine in interface org.camunda.bpm.engine.delegate.ProcessEngineServicesAware
    • withProcessEngine

      public DelegateExecutionFake withProcessEngine(org.camunda.bpm.engine.ProcessEngine processEngine)