Package org.camunda.community.mockito
Enum Class DelegateExpressions
- All Implemented Interfaces:
Serializable,Comparable<DelegateExpressions>,Constable
Util class for mocking DelegateExpressions as used in the modeller.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Method Summary
Modifier and TypeMethodDescriptionstatic voidTakes a BPMN resource and registers mocks for all delegateExpressions.static voidTakes a BPMN file and registers TaskListener-, ExecutionListener and JavaDelegate-Mocks for every delegateExpression encountered.static FluentExecutionListenerMockgetExecutionListenerMock(Class<?> type) static FluentExecutionListenerMockReturns the registered FluentExecutionListenerMock instance for name.static FluentJavaDelegateMockgetJavaDelegateMock(Class<?> type) static FluentJavaDelegateMockgetJavaDelegateMock(String name) Returns the registered FluentJavaDelegateMock instance for name.static FluentTaskListenerMockgetTaskListenerMock(Class<?> type) static FluentTaskListenerMockgetTaskListenerMock(String name) Returns the registered FluentTaskListenerMock instance for name.static FluentExecutionListenerMockregisterExecutionListenerMock(Class<? extends org.camunda.bpm.engine.delegate.ExecutionListener> type) Registers a new FluentExecutionListenerMock instance for name (by type).static FluentExecutionListenerMockRegisters a new FluentExecutionListenerMock instance for name.static FluentJavaDelegateMockregisterJavaDelegateMock(Class<? extends org.camunda.bpm.engine.delegate.JavaDelegate> type) Registers a new FluentJavaDelegateMock instance for name (by type).static FluentJavaDelegateMockRegisters a new FluentJavaDelegateMock instance for name.static FluentTaskListenerMockregisterTaskListenerMock(Class<? extends org.camunda.bpm.engine.delegate.TaskListener> type) Registers a new FluentTaskListenerMock instance for name (by type).static FluentTaskListenerMockRegisters a new FluentTaskListenerMock instance for name.static DelegateExpressionsReturns the enum constant of this class with the specified name.static DelegateExpressions[]values()Returns an array containing the constants of this enum class, in the order they are declared.static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution>verifyExecutionListenerMock(Class<?> type) Gets the registered FluentExecutionListenerMock and creates a verification instance.static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution>Gets the registered FluentExecutionListenerMock and creates a verification instance.static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution>verifyExecutionListenerMock(FluentExecutionListenerMock fluentExecutionListenerMock) Creates a verification instance for ExecutionListener.static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution>verifyJavaDelegateMock(Class<?> type) Gets the registered FluentJavaDelegateMock and creates a verification instance.static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution>verifyJavaDelegateMock(String name) Gets the registered FluentJavaDelegateMock and creates a verification instance.static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateExecution>verifyJavaDelegateMock(FluentJavaDelegateMock fluentJavaDelegateMock) Creates a verification instance for JavaDelegate.static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateTask>verifyTaskListenerMock(Class<?> type) Gets the registered FluentExecutionListenerMock and creates a verification instance.static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateTask>verifyTaskListenerMock(String name) Gets the registered FluentTaskListenerMock and creates a verification instance.static MockitoVerification<org.camunda.bpm.engine.delegate.DelegateTask>verifyTaskListenerMock(FluentTaskListenerMock fluentTaskListenerMock) Creates a verification instance for TaskListener.
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
autoMock
Takes a BPMN resource and registers mocks for all delegateExpressions.- Parameters:
bpmnFileResource- the bpm file resource to parse- See Also:
-
autoMock
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
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
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
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
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
-
getExecutionListenerMock
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
-
getTaskListenerMock
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
-
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
-