Class AbstractMockitoVerification<M,P>
- java.lang.Object
-
- org.camunda.bpm.extension.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 ofMockitoVerification.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.mockito.ArgumentCaptor<P>argumentCaptorprotected Mmock
-
Constructor Summary
Constructors Constructor Description AbstractMockitoVerification(M mock, Class<P> parameterType)Create new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voiddoVerify(org.mockito.verification.VerificationMode verificationMode)The concrete implementation must implement the method call (verify(mock).METHOD_CALL(argumentCaptor.capture)).org.mockito.ArgumentCaptor<P>executed()org.mockito.ArgumentCaptor<P>executed(org.mockito.verification.VerificationMode verificationMode)org.mockito.ArgumentCaptor<P>executedNever()
-
-
-
Constructor Detail
-
AbstractMockitoVerification
public AbstractMockitoVerification(M mock, Class<P> parameterType)
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 Detail
-
executed
public final org.mockito.ArgumentCaptor<P> 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
public org.mockito.ArgumentCaptor<P> executedNever()
- Specified by:
executedNeverin interfaceMockitoVerification<M>
-
doVerify
protected abstract void doVerify(org.mockito.verification.VerificationMode verificationMode) throws ExceptionThe 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.
-
-