Package org.mockito.exceptions.misusing
Class UnfinishedMockingSessionException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.mockito.exceptions.base.MockitoException
-
- org.mockito.exceptions.misusing.UnfinishedMockingSessionException
-
- All Implemented Interfaces:
Serializable
public class UnfinishedMockingSessionException extends MockitoException
This exception prevents the user from forgetting to useMockitoSession.finishMocking(). WhenMockitoSessionis started is used it needs to be concluded withMockitoSession.finishMocking().For details on mocking session lifecycle see
MockitoSessionBuilder.startMocking()andMockitoSession.finishMocking(). For examples of use seeMockitoSession.- Since:
- 2.7.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UnfinishedMockingSessionException(String message)
-
Method Summary
-
Methods inherited from class org.mockito.exceptions.base.MockitoException
getUnfilteredStackTrace
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
UnfinishedMockingSessionException
public UnfinishedMockingSessionException(String message)
-
-