Class ExecutionListenerAnswer
java.lang.Object
org.camunda.community.mockito.answer.ExecutionListenerAnswer
- All Implemented Interfaces:
org.camunda.bpm.engine.delegate.DelegateListener<org.camunda.bpm.engine.delegate.DelegateExecution>,org.camunda.bpm.engine.delegate.ExecutionListener,org.mockito.stubbing.Answer<Void>
public class ExecutionListenerAnswer
extends Object
implements org.camunda.bpm.engine.delegate.ExecutionListener
This is a specialized
Answer that delegates to
the given ExecutionListener. When
using an ExecutionListener-Mock, this Answer can be used to implement
internal behavior of the mock by delegating the method call to the given
delegate instance.- Author:
- Jan Galinski, Holisticon AG
-
Field Summary
Fields inherited from interface org.camunda.bpm.engine.delegate.ExecutionListener
EVENTNAME_END, EVENTNAME_START, EVENTNAME_TAKE -
Constructor Summary
ConstructorsConstructorDescriptionExecutionListenerAnswer(org.camunda.bpm.engine.delegate.ExecutionListener executionListener) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidanswer(org.camunda.bpm.engine.delegate.DelegateExecution parameter) Every implementing class must define what "answer" should actually do.final Voidanswer(org.mockito.invocation.InvocationOnMock invocation) voidnotify(org.camunda.bpm.engine.delegate.DelegateExecution execution)
-
Constructor Details
-
ExecutionListenerAnswer
public ExecutionListenerAnswer(org.camunda.bpm.engine.delegate.ExecutionListener executionListener)
-
-
Method Details
-
notify
- Specified by:
notifyin interfaceorg.camunda.bpm.engine.delegate.DelegateListener<org.camunda.bpm.engine.delegate.DelegateExecution>- Specified by:
notifyin interfaceorg.camunda.bpm.engine.delegate.ExecutionListener- Throws:
Exception
-
answer
Every implementing class must define what "answer" should actually do.- Parameters:
parameter- either DelegateTask or DelegateExecution.- Throws:
Exception- when anything fails
-
answer
- Specified by:
answerin interfaceorg.mockito.stubbing.Answer<T extends org.camunda.bpm.engine.delegate.VariableScope>- Throws:
Throwable
-