Class AbstractThrowsException
java.lang.Object
org.mockito.internal.stubbing.answers.AbstractThrowsException
- All Implemented Interfaces:
Answer<Object>
,ValidableAnswer
- Direct Known Subclasses:
ThrowsException
,ThrowsExceptionForClassType
public abstract class AbstractThrowsException
extends Object
implements Answer<Object>, ValidableAnswer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionanswer
(InvocationOnMock invocation) protected abstract Throwable
void
validateFor
(InvocationOnMock invocation) Validation of the answer at stub time for the given invocation.
-
Field Details
-
filter
-
-
Constructor Details
-
AbstractThrowsException
public AbstractThrowsException()
-
-
Method Details
-
getThrowable
-
answer
-
validateFor
Description copied from interface:ValidableAnswer
Validation of the answer at stub time for the given invocation.This method will be called by Mockito.
The implementation must throw an MockitoException to indicate that this answer is not valid for the given invocation. If the validation succeed the implementation must simply return without throwing.
- Specified by:
validateFor
in interfaceValidableAnswer
- Parameters:
invocation
- The stubbed invocation
-