M - type of the mock DelegateP - type of the simple argument the verified method takespublic abstract class AbstractMockitoVerification<M,P> extends Object implements MockitoVerification<P>
MockitoVerification.| Modifier and Type | Field and Description |
|---|---|
protected org.mockito.ArgumentCaptor<P> |
argumentCaptor |
protected M |
mock |
| Constructor and Description |
|---|
AbstractMockitoVerification(M mock,
Class<P> parameterType)
Create new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doVerify(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() |
protected final M mock
protected final org.mockito.ArgumentCaptor<P> argumentCaptor
public AbstractMockitoVerification(M mock, Class<P> parameterType)
mock - the wrapped mock (has to be either
JavaDelegate,
TaskListener or
ExecutionListener.parameterType - the parameter the main method (execute() or notify() expects, one
of either
DelegateExecution or
DelegateTask.public final org.mockito.ArgumentCaptor<P> executed()
executed in interface MockitoVerification<P>public final org.mockito.ArgumentCaptor<P> executed(org.mockito.verification.VerificationMode verificationMode)
executed in interface MockitoVerification<P>public org.mockito.ArgumentCaptor<P> executedNever()
executedNever in interface MockitoVerification<P>protected abstract void doVerify(org.mockito.verification.VerificationMode verificationMode)
throws Exception
verificationMode - defaults to times(1), but any
VerificationMode can be used.Exception - just in case the METHOD_CALL throws an exception. If caught, it
is propagated unchecked.Copyright © 2017 camunda services GmbH. All rights reserved.