Uses of Class
org.mockito.exceptions.base.MockitoException
-
Packages that use MockitoException Package Description org.mockito.creation.instance org.mockito.exceptions.misusing Exceptions thrown when Mockito is misused.org.mockito.exceptions.verification Verification errors.org.mockito.internal.creation.instance org.mockito.internal.exceptions -
-
Uses of MockitoException in org.mockito.creation.instance
Subclasses of MockitoException in org.mockito.creation.instance Modifier and Type Class Description classInstantiationExceptionException generated whenInstantiator.newInstance(Class)failed. -
Uses of MockitoException in org.mockito.exceptions.misusing
Subclasses of MockitoException in org.mockito.exceptions.misusing Modifier and Type Class Description classCannotStubVoidMethodWithReturnValueclassCannotVerifyStubOnlyMockclassFriendlyReminderExceptionclassInjectMocksExceptionThrown when creation of test subject annotated with InjectMocks fails.classInvalidUseOfMatchersExceptionclassMissingMethodInvocationExceptionclassMockitoConfigurationExceptionclassNotAMockExceptionclassNullInsteadOfMockExceptionclassPotentialStubbingProblemPotentialStubbingProblemimproves productivity by failing the test early when the user misconfigures mock's stubbing.classRedundantListenerExceptionReported when instance ofMockitoListeneris being added to Mockito (seeMockitoFramework) and there is already a listener with this implementation type registered.classUnfinishedMockingSessionExceptionThis exception prevents the user from forgetting to useMockitoSession.finishMocking().classUnfinishedStubbingExceptionclassUnfinishedVerificationExceptionclassUnnecessaryStubbingExceptionThis exception indicates presence of unused stubbings.classWrongTypeOfReturnValue -
Uses of MockitoException in org.mockito.exceptions.verification
Subclasses of MockitoException in org.mockito.exceptions.verification Modifier and Type Class Description classSmartNullPointerException -
Uses of MockitoException in org.mockito.internal.creation.instance
Subclasses of MockitoException in org.mockito.internal.creation.instance Modifier and Type Class Description classInstantiationExceptionDeprecated.since 2.15.4 because this internal class was leaking from the public API. -
Uses of MockitoException in org.mockito.internal.exceptions
Methods in org.mockito.internal.exceptions that return MockitoException Modifier and Type Method Description static MockitoExceptionReporter. atMostAndNeverShouldNotBeUsedWithTimeout()static MockitoExceptionReporter. cannotCallAbstractRealMethod()static MockitoExceptionReporter. cannotCreateTimerWithNegativeDurationTime(long durationMillis)static MockitoExceptionReporter. cannotInitializeForInjectMocksAnnotation(java.lang.String fieldName, java.lang.String causeMessage)static MockitoExceptionReporter. cannotInitializeForSpyAnnotation(java.lang.String fieldName, java.lang.Exception details)static MockitoExceptionReporter. cannotInjectDependency(java.lang.reflect.Field field, java.lang.Object matchingMock, java.lang.Exception details)static MockitoExceptionReporter. cannotMockClass(java.lang.Class<?> clazz, java.lang.String reason)static MockitoExceptionReporter. cannotStubVoidMethodWithAReturnValue(java.lang.String methodName)static MockitoExceptionReporter. cannotStubWithNullThrowable()static MockitoExceptionReporter. cannotVerifyToString()static MockitoExceptionReporter. checkedExceptionInvalid(java.lang.Throwable t)static MockitoExceptionReporter. defaultAnswerDoesNotAcceptNullParameter()static MockitoExceptionReporter. delegatedMethodDoesNotExistOnDelegate(java.lang.reflect.Method mockMethod, java.lang.Object mock, java.lang.Object delegate)static MockitoExceptionReporter. delegatedMethodHasWrongReturnType(java.lang.reflect.Method mockMethod, java.lang.reflect.Method delegateMethod, java.lang.Object mock, java.lang.Object delegate)static MockitoExceptionReporter. extraInterfacesAcceptsOnlyInterfaces(java.lang.Class<?> wrongType)static MockitoExceptionReporter. extraInterfacesCannotContainMockedType(java.lang.Class<?> wrongType)static MockitoExceptionReporter. extraInterfacesDoesNotAcceptNullParameters()static MockitoExceptionReporter. extraInterfacesRequiresAtLeastOneInterface()static MockitoExceptionReporter. fieldInitialisationThrewException(java.lang.reflect.Field field, java.lang.Throwable details)static MockitoExceptionReporter. incorrectUseOfAdditionalMatchers(java.lang.String additionalMatcherName, int expectedSubMatchersCount, java.util.Collection<LocalizedMatcher> matcherStack)static MockitoExceptionReporter. incorrectUseOfApi()static MockitoExceptionReporter. inOrderRequiresFamiliarMock()static MockitoExceptionReporter. invalidArgumentPositionRangeAtInvocationTime(InvocationOnMock invocation, boolean willReturnLastParameter, int argumentIndex)static MockitoExceptionReporter. invalidArgumentRangeAtIdentityAnswerCreationTime()static MockitoExceptionReporter. invalidUseOfMatchers(int expectedMatchersCount, java.util.List<LocalizedMatcher> recordedMatchers)static MockitoExceptionReporter. invocationListenerThrewException(InvocationListener listener, java.lang.Throwable listenerThrowable)static MockitoExceptionReporter. methodDoesNotAcceptParameter(java.lang.String method, java.lang.String parameter)static MockitoExceptionReporter. misplacedArgumentMatcher(java.util.List<LocalizedMatcher> lastMatchers)static MockitoExceptionReporter. missingMethodInvocation()static MockitoExceptionReporter. mockedTypeIsInconsistentWithDelegatedInstanceType(java.lang.Class<?> mockedType, java.lang.Object delegatedInstance)static MockitoExceptionReporter. mockedTypeIsInconsistentWithSpiedInstanceType(java.lang.Class<?> mockedType, java.lang.Object spiedInstance)static MockitoExceptionReporter. mocksHaveToBePassedToVerifyNoMoreInteractions()static MockitoExceptionReporter. mocksHaveToBePassedWhenCreatingInOrder()static MockitoExceptionReporter. moreThanOneAnnotationNotAllowed(java.lang.String fieldName)static MockitoExceptionReporter. noArgumentValueWasCaptured()static MockitoExceptionReporter. notAMockPassedToVerify(java.lang.Class<?> type)static MockitoExceptionReporter. notAMockPassedToVerifyNoMoreInteractions()static MockitoExceptionReporter. notAMockPassedToWhenMethod()static MockitoExceptionReporter. notAMockPassedWhenCreatingInOrder()static MockitoExceptionReporter. notAnException()static MockitoExceptionReporter. nullPassedToVerify()static MockitoExceptionReporter. nullPassedToVerifyNoMoreInteractions()static MockitoExceptionReporter. nullPassedToWhenMethod()static MockitoExceptionReporter. nullPassedWhenCreatingInOrder()static MockitoExceptionReporter. onlyVoidMethodsCanBeSetToDoNothing()static MockitoExceptionReporter. reportNoSubMatchersFound(java.lang.String additionalMatcherName)static MockitoExceptionReporter. requiresAtLeastOneListener(java.lang.String method)static MockitoExceptionReporter. serializableWontWorkForObjectsThatDontImplementSerializable(java.lang.Class<?> classToMock)static MockitoExceptionReporter. smartNullPointerException(java.lang.String invocation, Location location)static MockitoExceptionReporter. spyAndDelegateAreMutuallyExclusive()static MockitoExceptionReporter. stubPassedToVerify(java.lang.Object mock)static MockitoExceptionReporter. unfinishedStubbing(Location location)static MockitoExceptionReporter. unfinishedVerificationException(Location location)static MockitoExceptionReporter. unsupportedCombinationOfAnnotations(java.lang.String undesiredAnnotationOne, java.lang.String undesiredAnnotationTwo)static MockitoExceptionReporter. usingConstructorWithFancySerializable(SerializableMode mode)static MockitoExceptionReporter. wrongTypeOfArgumentToReturn(InvocationOnMock invocation, java.lang.String expectedType, java.lang.Class<?> actualType, int argumentIndex)static MockitoExceptionReporter. wrongTypeOfReturnValue(java.lang.String expectedType, java.lang.String actualType, java.lang.String methodName)static MockitoExceptionReporter. wrongTypeReturnedByDefaultAnswer(java.lang.Object mock, java.lang.String expectedType, java.lang.String actualType, java.lang.String methodName)
-