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 specializedAnswerthat delegates to the givenExecutionListener. 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
-
-
Constructor Summary
Constructors Constructor Description ExecutionListenerAnswer(org.camunda.bpm.engine.delegate.ExecutionListener executionListener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidanswer(org.camunda.bpm.engine.delegate.DelegateExecution parameter)Every implementing class must define what "answer" should actually do.Voidanswer(org.mockito.invocation.InvocationOnMock invocation)voidnotify(org.camunda.bpm.engine.delegate.DelegateExecution execution)
-
-
-
Method Detail
-
notify
public void notify(org.camunda.bpm.engine.delegate.DelegateExecution execution) throws Exception- 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
protected void answer(org.camunda.bpm.engine.delegate.DelegateExecution parameter) throws ExceptionEvery implementing class must define what "answer" should actually do.- Parameters:
parameter- either DelegateTask or DelegateExecution.- Throws:
Exception- when anything fails
-
-