Class AbstractMockitoVerification<M,P>
java.lang.Object
org.camunda.community.mockito.verify.AbstractMockitoVerification<M,P>
- Type Parameters:
M- type of the mock DelegateP- type of the simple argument the verified method takes
- All Implemented Interfaces:
MockitoVerification<P>
- Direct Known Subclasses:
ExecutionListenerVerification,JavaDelegateVerification,TaskListenerVerification
public abstract class AbstractMockitoVerification<M,P>
extends Object
implements MockitoVerification<P>
Base implementation of
MockitoVerification.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractMockitoVerification(M mock, Class<P> parameterType) Create new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voiddoVerify(org.mockito.verification.VerificationMode verificationMode) The concrete implementation must implement the method call (verify(mock).METHOD_CALL(argumentCaptor.capture)).final org.mockito.ArgumentCaptor<P>executed()final org.mockito.ArgumentCaptor<P>executed(org.mockito.verification.VerificationMode verificationMode) org.mockito.ArgumentCaptor<P>
-
Field Details
-
mock
-
argumentCaptor
-
-
Constructor Details
-
AbstractMockitoVerification
Create new instance.- Parameters:
mock- the wrapped mock (has to be eitherJavaDelegate,TaskListenerorExecutionListener.parameterType- the parameter the main method (execute() or notify() expects, one of eitherDelegateExecutionorDelegateTask.
-
-
Method Details
-
executed
- Specified by:
executedin interfaceMockitoVerification<M>
-
executed
public final org.mockito.ArgumentCaptor<P> executed(org.mockito.verification.VerificationMode verificationMode) - Specified by:
executedin interfaceMockitoVerification<M>
-
executedNever
- Specified by:
executedNeverin interfaceMockitoVerification<M>
-
doVerify
protected abstract void doVerify(org.mockito.verification.VerificationMode verificationMode) throws Exception The concrete implementation must implement the method call (verify(mock).METHOD_CALL(argumentCaptor.capture)).- Parameters:
verificationMode- defaults to times(1), but anyVerificationModecan be used.- Throws:
Exception- just in case the METHOD_CALL throws an exception. If caught, it is propagated unchecked.
-