Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
R
- 16. Real partial mocks (Since 1.8.0) - Search tag in class org.mockito.Mockito
- Section
- 17. Resetting mocks (Since 1.8.0) - Search tag in class org.mockito.Mockito
- Section
- rawExtraInterfaces() - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport
- rawType() - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport
- read() - Method in class org.mockito.internal.util.reflection.FieldReader
- read() - Method in class org.mockito.internal.util.reflection.InstanceField
-
Safely read the field.
- readLines(InputStream) - Static method in class org.mockito.internal.util.io.IOUtil
-
Reads all lines from the given stream.
- RealMethod - Interface in org.mockito.internal.invocation
-
Interface that wraps a 'real' method of the mock object.
- RealMethod.FromBehavior - Class in org.mockito.internal.invocation
- RealMethod.FromCallable - Class in org.mockito.internal.invocation
- RealMethod.IsIllegal - Enum in org.mockito.internal.invocation
- reason() - Element in annotation type org.mockito.DoNotMock
-
The reason why the annotated type should not be mocked.
- RedundantListenerException - Exception Class in org.mockito.exceptions.misusing
-
Reported when instance of
MockitoListener
is being added to Mockito (seeMockitoFramework
) and there is already a listener with this implementation type registered. - RedundantListenerException(String) - Constructor for exception class org.mockito.exceptions.misusing.RedundantListenerException
- redundantMockitoListener(String) - Static method in class org.mockito.internal.exceptions.Reporter
- refEq(T, String...) - Static method in class org.mockito.ArgumentMatchers
-
Object argument that is reflection-equal to the given value with support for excluding selected fields from a class.
- ReflectionEquals - Class in org.mockito.internal.matchers.apachecommons
- ReflectionEquals(Object, String...) - Constructor for class org.mockito.internal.matchers.apachecommons.ReflectionEquals
- ReflectionMemberAccessor - Class in org.mockito.internal.util.reflection
- ReflectionMemberAccessor() - Constructor for class org.mockito.internal.util.reflection.ReflectionMemberAccessor
- registerAllTypeVariables(Type) - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport
-
Registers the type variables for the given type and all of its superclasses and superinterfaces.
- RegisteredInvocations - Interface in org.mockito.internal.verification
- registerTypeParametersOn(TypeVariable<?>[]) - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport
- registerTypeVariablesOn(Type) - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport
- remove(Object) - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
- remove(K) - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap
- remove(K) - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap.WithInlinedExpunction
- remove(V) - Method in class org.mockito.internal.util.concurrent.WeakConcurrentSet
- removeAll(Collection<?>) - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
- removeFirstLine(String) - Static method in class org.mockito.internal.util.StringUtil
- removeLast() - Method in class org.mockito.internal.verification.DefaultRegisteredInvocations
- removeLast() - Method in interface org.mockito.internal.verification.RegisteredInvocations
- removeLast() - Method in class org.mockito.internal.verification.SingleRegisteredInvocation
- removeListener(MockitoListener) - Method in class org.mockito.internal.framework.DefaultMockitoFramework
- removeListener(MockitoListener) - Method in interface org.mockito.internal.progress.MockingProgress
- removeListener(MockitoListener) - Method in class org.mockito.internal.progress.MockingProgressImpl
- removeListener(MockitoListener) - Method in interface org.mockito.MockitoFramework
-
When you add listener using
MockitoFramework.addListener(MockitoListener)
make sure to remove it. - reportAnd() - Method in interface org.mockito.internal.progress.ArgumentMatcherStorage
- reportAnd() - Method in class org.mockito.internal.progress.ArgumentMatcherStorageImpl
- Reporter - Class in org.mockito.internal.exceptions
-
Reports verification and misusing errors.
- reportInvocation(MethodInvocationReport) - Method in class org.mockito.internal.debugging.VerboseMockInvocationLogger
- reportInvocation(MethodInvocationReport) - Method in interface org.mockito.listeners.InvocationListener
-
Called after the invocation of the listener's mock if it returned normally.
- reportMatcher(ArgumentMatcher<?>) - Method in interface org.mockito.internal.progress.ArgumentMatcherStorage
- reportMatcher(ArgumentMatcher<?>) - Method in class org.mockito.internal.progress.ArgumentMatcherStorageImpl
- reportNoSubMatchersFound(String) - Static method in class org.mockito.internal.exceptions.Reporter
- reportNot() - Method in interface org.mockito.internal.progress.ArgumentMatcherStorage
- reportNot() - Method in class org.mockito.internal.progress.ArgumentMatcherStorageImpl
- reportOngoingStubbing(OngoingStubbing) - Method in class org.mockito.internal.progress.MockingProgressImpl
- reportOngoingStubbing(OngoingStubbing<?>) - Method in interface org.mockito.internal.progress.MockingProgress
- reportOr() - Method in interface org.mockito.internal.progress.ArgumentMatcherStorage
- reportOr() - Method in class org.mockito.internal.progress.ArgumentMatcherStorageImpl
- requiresAtLeastOneListener(String) - Static method in class org.mockito.internal.exceptions.Reporter
- reset() - Method in class org.mockito.internal.MockedStaticImpl
- reset() - Method in interface org.mockito.internal.progress.ArgumentMatcherStorage
- reset() - Method in class org.mockito.internal.progress.ArgumentMatcherStorageImpl
- reset() - Method in interface org.mockito.internal.progress.MockingProgress
- reset() - Method in class org.mockito.internal.progress.MockingProgressImpl
- reset() - Method in interface org.mockito.MockedStatic
- reset(T...) - Method in class org.mockito.internal.MockitoCore
- reset(T...) - Static method in class org.mockito.Mockito
-
Smart Mockito users hardly use this feature because they know it could be a sign of poor tests.
- resetInvocationForPotentialStubbing(MatchableInvocation) - Method in class org.mockito.internal.stubbing.InvocationContainerImpl
- resetMock(Object) - Static method in class org.mockito.internal.util.MockUtil
- resetMock(Object, MockHandler, MockCreationSettings) - Method in class org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker
- resetMock(Object, MockHandler, MockCreationSettings) - Method in class org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker
- resetMock(Object, MockHandler, MockCreationSettings) - Method in class org.mockito.internal.creation.bytebuddy.SubclassByteBuddyMockMaker
- resetMock(Object, MockHandler, MockCreationSettings) - Method in class org.mockito.internal.creation.proxy.ProxyMockMaker
- resetMock(Object, MockHandler, MockCreationSettings) - Method in interface org.mockito.plugins.MockMaker
-
Replaces the existing handler on
mock
withnewHandler
. - resetOngoingStubbing() - Method in interface org.mockito.internal.progress.MockingProgress
-
Removes ongoing stubbing so that in case the framework is misused state validation errors are more accurate
- resetOngoingStubbing() - Method in class org.mockito.internal.progress.MockingProgressImpl
-
(non-Javadoc)
- resolve(Object) - Method in interface org.mockito.plugins.MockResolver
-
Returns the provided instance or the unwrapped mock that the provided instance represents.
- resolveGenericReturnType(Method) - Method in class org.mockito.internal.util.reflection.GenericMetadataSupport
-
Resolve current method generic return type to a
GenericMetadataSupport
. - resolveStrategy(Class<?>, ClassLoader, boolean) - Method in interface org.mockito.internal.creation.bytebuddy.SubclassLoader
-
Resolves a class loading strategy.
- resolveTypeInstances(Class<?>...) - Method in interface org.mockito.internal.util.reflection.FieldInitializer.ConstructorArgumentResolver
-
Try to resolve instances from types.
- retainAll(Collection<?>) - Method in class org.mockito.internal.util.collections.HashCodeAndEqualsSafeSet
- Returns - Class in org.mockito.internal.stubbing.answers
- Returns(Object) - Constructor for class org.mockito.internal.stubbing.answers.Returns
- RETURNS_DEEP_STUBS - Enum constant in enum org.mockito.Answers
-
An answer that returns deep stubs (not mocks).
- RETURNS_DEEP_STUBS - Static variable in class org.mockito.Mockito
-
Optional
Answer
to be used withMockito.mock(Class, Answer)
. - RETURNS_DEFAULTS - Enum constant in enum org.mockito.Answers
-
The default configured answer of every mock.
- RETURNS_DEFAULTS - Static variable in class org.mockito.Mockito
-
The default
Answer
of every mock if the mock was not stubbed. - RETURNS_MOCKS - Enum constant in enum org.mockito.Answers
-
An answer that returns mocks (not stubs).
- RETURNS_MOCKS - Static variable in class org.mockito.Mockito
-
Optional
Answer
to be used withMockito.mock(Class, Answer)
- RETURNS_SELF - Enum constant in enum org.mockito.Answers
-
An answer that tries to return itself.
- RETURNS_SELF - Static variable in class org.mockito.Mockito
-
Optional
Answer
to be used withMockito.mock(Class, Answer)
. - RETURNS_SMART_NULLS - Enum constant in enum org.mockito.Answers
-
An answer that returns smart-nulls.
- RETURNS_SMART_NULLS - Static variable in class org.mockito.Mockito
-
Optional
Answer
to be used withMockito.mock(Class, Answer)
. - returnsArgAt(int) - Static method in class org.mockito.AdditionalAnswers
-
Returns the parameter of an invocation at the given position.
- ReturnsArgumentAt - Class in org.mockito.internal.stubbing.answers
-
Returns the passed parameter identity at specified index.
- ReturnsArgumentAt(int) - Constructor for class org.mockito.internal.stubbing.answers.ReturnsArgumentAt
-
Build the identity answer to return the argument at the given position in the argument array.
- ReturnsDeepStubs - Class in org.mockito.internal.stubbing.defaultanswers
-
Returning deep stub implementation.
- ReturnsDeepStubs() - Constructor for class org.mockito.internal.stubbing.defaultanswers.ReturnsDeepStubs
- returnsElementsOf(Collection<?>) - Static method in class org.mockito.AdditionalAnswers
-
Returns elements of the collection.
- ReturnsElementsOf - Class in org.mockito.internal.stubbing.answers
-
Returns elements of the collection.
- ReturnsElementsOf(Collection<?>) - Constructor for class org.mockito.internal.stubbing.answers.ReturnsElementsOf
- ReturnsEmptyValues - Class in org.mockito.internal.stubbing.defaultanswers
-
Default answer of every Mockito mock.
- ReturnsEmptyValues() - Constructor for class org.mockito.internal.stubbing.defaultanswers.ReturnsEmptyValues
- returnsFirstArg() - Static method in class org.mockito.AdditionalAnswers
-
Returns the first parameter of an invocation.
- returnsLastArg() - Static method in class org.mockito.AdditionalAnswers
-
Returns the last parameter of an invocation.
- ReturnsMocks - Class in org.mockito.internal.stubbing.defaultanswers
- ReturnsMocks() - Constructor for class org.mockito.internal.stubbing.defaultanswers.ReturnsMocks
- ReturnsMoreEmptyValues - Class in org.mockito.internal.stubbing.defaultanswers
-
It's likely this implementation will be used by default by every Mockito 4.0.0 mock.
- ReturnsMoreEmptyValues() - Constructor for class org.mockito.internal.stubbing.defaultanswers.ReturnsMoreEmptyValues
- returnsPrimitive() - Method in class org.mockito.internal.stubbing.answers.InvocationInfo
- returnsSecondArg() - Static method in class org.mockito.AdditionalAnswers
-
Returns the second parameter of an invocation.
- ReturnsSmartNulls - Class in org.mockito.internal.stubbing.defaultanswers
-
Optional Answer that can be used with
Mockito.mock(Class, Answer)
- ReturnsSmartNulls() - Constructor for class org.mockito.internal.stubbing.defaultanswers.ReturnsSmartNulls
- rule() - Static method in class org.mockito.junit.MockitoJUnit
-
Creates rule instance that initiates @Mocks For more details and examples see
MockitoRule
. - run() - Method in class org.mockito.internal.util.concurrent.DetachedThreadLocal
- run() - Method in class org.mockito.internal.util.concurrent.WeakConcurrentMap
- run() - Method in class org.mockito.internal.util.concurrent.WeakConcurrentSet
- run(RunNotifier) - Method in class org.mockito.internal.runners.DefaultInternalRunner
- run(RunNotifier) - Method in interface org.mockito.internal.runners.InternalRunner
- run(RunNotifier) - Method in class org.mockito.internal.runners.StrictRunner
- run(RunNotifier) - Method in class org.mockito.junit.MockitoJUnitRunner
- RunnerFactory - Class in org.mockito.internal.runners
-
Creates instances of Mockito JUnit Runner in a safe way, e.g.
- RunnerFactory() - Constructor for class org.mockito.internal.runners.RunnerFactory
- RunnerProvider - Class in org.mockito.internal.runners.util
- RunnerProvider() - Constructor for class org.mockito.internal.runners.util.RunnerProvider
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form