Class JavaDelegateAnswer
java.lang.Object
org.camunda.community.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 specialized
Answer that delegates to
the given JavaDelegate. 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
ConstructorsConstructorDescriptionJavaDelegateAnswer(org.camunda.bpm.engine.delegate.JavaDelegate javaDelegate) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidanswer(org.camunda.bpm.engine.delegate.DelegateExecution delegateExecution) Every implementing class must define what "answer" should actually do.final Voidanswer(org.mockito.invocation.InvocationOnMock invocation) voidexecute(org.camunda.bpm.engine.delegate.DelegateExecution execution)
-
Constructor Details
-
JavaDelegateAnswer
public JavaDelegateAnswer(org.camunda.bpm.engine.delegate.JavaDelegate javaDelegate)
-
-
Method Details
-
execute
- Specified by:
executein interfaceorg.camunda.bpm.engine.delegate.JavaDelegate- Throws:
Exception
-
answer
protected void answer(org.camunda.bpm.engine.delegate.DelegateExecution delegateExecution) throws Exception Every implementing class must define what "answer" should actually do.- Parameters:
delegateExecution- 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
-