Enum Class DelegateExpressions

java.lang.Object
java.lang.Enum<DelegateExpressions>
org.camunda.community.mockito.DelegateExpressions
All Implemented Interfaces:
Serializable, Comparable<DelegateExpressions>, Constable

public enum DelegateExpressions extends Enum<DelegateExpressions>
Util class for mocking DelegateExpressions as used in the modeller.
  • Method Details

    • values

      public static DelegateExpressions[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DelegateExpressions valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • autoMock

      public static void autoMock(@Nonnull String bpmnFileResource)
      Takes a BPMN resource and registers mocks for all delegateExpressions.
      Parameters:
      bpmnFileResource - the bpm file resource to parse
      See Also:
    • autoMock

      public static void autoMock(@Nonnull URL bpmnFile)
      Takes a BPMN file and registers TaskListener-, ExecutionListener and JavaDelegate-Mocks for every delegateExpression encountered.

      This is an auto-mock feature that allows the process to run. If you need to modify the behavior of the mock, you can use the getXXX() methods to access it by its name.

      Parameters:
      bpmnFile - the BPMN resource to parse
    • registerJavaDelegateMock

      public static FluentJavaDelegateMock registerJavaDelegateMock(String name)
      Registers a new FluentJavaDelegateMock instance for name.
      Parameters:
      name - the name under which the instance is registered
      Returns:
      new fluent-mock instance
      See Also:
    • registerJavaDelegateMock

      public static FluentJavaDelegateMock registerJavaDelegateMock(Class<? extends org.camunda.bpm.engine.delegate.JavaDelegate> type)
      Registers a new FluentJavaDelegateMock instance for name (by type).
      Parameters:
      type - the type to register
      Returns:
      new fluent-mock instance
    • registerExecutionListenerMock

      public static FluentExecutionListenerMock registerExecutionListenerMock(String name)
      Registers a new FluentExecutionListenerMock instance for name.
      Parameters:
      name - the name under which the instance is registered
      Returns:
      new fluent-mock instance
      See Also:
    • registerExecutionListenerMock

      public static FluentExecutionListenerMock registerExecutionListenerMock(Class<? extends org.camunda.bpm.engine.delegate.ExecutionListener> type)
      Registers a new FluentExecutionListenerMock instance for name (by type).
      Parameters:
      type - the type to register
      Returns:
      new fluent-mock instance
    • registerTaskListenerMock

      public static FluentTaskListenerMock registerTaskListenerMock(String name)
      Registers a new FluentTaskListenerMock instance for name.
      Parameters:
      name - the name under which the instance is registered
      Returns:
      new fluent-mock instance
      See Also:
    • registerTaskListenerMock

      public static FluentTaskListenerMock registerTaskListenerMock(Class<? extends org.camunda.bpm.engine.delegate.TaskListener> type)
      Registers a new FluentTaskListenerMock instance for name (by type).
      Parameters:
      type - the type to register
      Returns:
      new fluent-mock instance
    • getJavaDelegateMock

      public static FluentJavaDelegateMock getJavaDelegateMock(String name)
      Returns the registered FluentJavaDelegateMock instance for name.
      Parameters:
      name - the name under which the instance is registered
      Returns:
      the registered fluent-mock instance
      See Also:
    • getJavaDelegateMock

      public static FluentJavaDelegateMock getJavaDelegateMock(Class<?> type)
    • getExecutionListenerMock

      public static FluentExecutionListenerMock getExecutionListenerMock(String name)
      Returns the registered FluentExecutionListenerMock instance for name.
      Parameters:
      name - the name under which the instance is registered
      Returns:
      the registered fluent-mock instance
      See Also:
    • getExecutionListenerMock

      public static FluentExecutionListenerMock getExecutionListenerMock(Class<?> type)
    • getTaskListenerMock

      public static FluentTaskListenerMock getTaskListenerMock(String name)
      Returns the registered FluentTaskListenerMock instance for name.
      Parameters:
      name - the name under which the instance is registered
      Returns:
      the registered fluent-mock instance
      See Also:
    • getTaskListenerMock

      public static FluentTaskListenerMock getTaskListenerMock(Class<?> type)
    • verifyJavaDelegateMock

      public static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> verifyJavaDelegateMock(String name)
      Gets the registered FluentJavaDelegateMock and creates a verification instance.
      Parameters:
      name - the name under which the instance is registered
      Returns:
      verification for JavaDelegate
      See Also:
    • verifyJavaDelegateMock

      public static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> verifyJavaDelegateMock(Class<?> type)
      Gets the registered FluentJavaDelegateMock and creates a verification instance.
      Parameters:
      type - the type of the delegate to lookup
      Returns:
      verification for JavaDelegate
    • verifyJavaDelegateMock

      public static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> verifyJavaDelegateMock(FluentJavaDelegateMock fluentJavaDelegateMock)
      Creates a verification instance for JavaDelegate.
      Parameters:
      fluentJavaDelegateMock - the fluent-mock instance
      Returns:
      verification for JavaDelegate
    • verifyExecutionListenerMock

      public static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> verifyExecutionListenerMock(String name)
      Gets the registered FluentExecutionListenerMock and creates a verification instance.
      Parameters:
      name - the name under which the instance is registered
      Returns:
      verification for ExecutionListener
      See Also:
    • verifyExecutionListenerMock

      public static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> verifyExecutionListenerMock(Class<?> type)
      Gets the registered FluentExecutionListenerMock and creates a verification instance.
      Parameters:
      type - the type of the listener to lookup
      Returns:
      verification for ExecutionListener
    • verifyExecutionListenerMock

      public static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution> verifyExecutionListenerMock(FluentExecutionListenerMock fluentExecutionListenerMock)
      Creates a verification instance for ExecutionListener.
      Parameters:
      fluentExecutionListenerMock - the fluent-mock instance
      Returns:
      verification for JavaDelegate
    • verifyTaskListenerMock

      public static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateTask> verifyTaskListenerMock(String name)
      Gets the registered FluentTaskListenerMock and creates a verification instance.
      Parameters:
      name - the name under which the instance is registered
      Returns:
      verification for TaskListener
      See Also:
    • verifyTaskListenerMock

      public static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateTask> verifyTaskListenerMock(Class<?> type)
      Gets the registered FluentExecutionListenerMock and creates a verification instance.
      Parameters:
      type - the type of the listener to lookup
      Returns:
      verification for TaskListener
    • verifyTaskListenerMock

      public static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateTask> verifyTaskListenerMock(FluentTaskListenerMock fluentTaskListenerMock)
      Creates a verification instance for TaskListener.
      Parameters:
      fluentTaskListenerMock - the fluent-mock instance
      Returns:
      verification for TaskListener