Class JavaDelegateAnswer
- java.lang.Object
-
- org.camunda.bpm.extension.mockito.answer.JavaDelegateAnswer
-
- All Implemented Interfaces:
org.camunda.bpm.engine.delegate.JavaDelegate,org.mockito.stubbing.Answer<Void>
public class JavaDelegateAnswer extends Object implements org.camunda.bpm.engine.delegate.JavaDelegate
This is a specializedAnswerthat delegates to the givenJavaDelegate. When using an JavaDelegate-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 JavaDelegateAnswer(org.camunda.bpm.engine.delegate.JavaDelegate javaDelegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidanswer(org.camunda.bpm.engine.delegate.DelegateExecution delegateExecution)Every implementing class must define what "answer" should actually do.Voidanswer(org.mockito.invocation.InvocationOnMock invocation)voidexecute(org.camunda.bpm.engine.delegate.DelegateExecution execution)
-
-
-
Method Detail
-
execute
public void execute(org.camunda.bpm.engine.delegate.DelegateExecution execution) throws Exception- Specified by:
executein interfaceorg.camunda.bpm.engine.delegate.JavaDelegate- Throws:
Exception
-
answer
protected void answer(org.camunda.bpm.engine.delegate.DelegateExecution delegateExecution) throws ExceptionEvery implementing class must define what "answer" should actually do.- Parameters:
delegateExecution- either DelegateTask or DelegateExecution.- Throws:
Exception- when anything fails
-
-