Class VerificationEventImpl
- java.lang.Object
-
- org.mockito.internal.verification.VerificationEventImpl
-
- All Implemented Interfaces:
VerificationEvent
public class VerificationEventImpl extends java.lang.Object implements VerificationEvent
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Throwable
cause
private VerificationData
data
private java.lang.Object
mock
private VerificationMode
mode
-
Constructor Summary
Constructors Constructor Description VerificationEventImpl(java.lang.Object mock, VerificationMode mode, VerificationData data, java.lang.Throwable cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VerificationData
getData()
java.lang.Object
getMock()
VerificationMode
getMode()
java.lang.Throwable
getVerificationError()
A nullable Throwable if it is null, the verification succeeded, otherwise the throwable contains the cause of why the verification failed.
-
-
-
Field Detail
-
mock
private final java.lang.Object mock
-
mode
private final VerificationMode mode
-
data
private final VerificationData data
-
cause
private final java.lang.Throwable cause
-
-
Constructor Detail
-
VerificationEventImpl
public VerificationEventImpl(java.lang.Object mock, VerificationMode mode, VerificationData data, java.lang.Throwable cause)
-
-
Method Detail
-
getMock
public java.lang.Object getMock()
- Specified by:
getMock
in interfaceVerificationEvent
- Returns:
- The mock that a verification happened on.
-
getMode
public VerificationMode getMode()
- Specified by:
getMode
in interfaceVerificationEvent
- Returns:
- the
VerificationMode
that was used.
-
getData
public VerificationData getData()
- Specified by:
getData
in interfaceVerificationEvent
- Returns:
- the
VerificationData
that was verified on.
-
getVerificationError
public java.lang.Throwable getVerificationError()
Description copied from interface:VerificationEvent
A nullable Throwable if it is null, the verification succeeded, otherwise the throwable contains the cause of why the verification failed.- Specified by:
getVerificationError
in interfaceVerificationEvent
- Returns:
- null or the error.
-
-