Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
C
- 0.2. Configuration-free inline mock making - Search tag in class org.mockito.Mockito
- Section
- 14. Changing default return values of un-stubbed invocations (Since 1.7) - Search tag in class org.mockito.Mockito
- Section
- 15. Capturing arguments for further assertions (Since 1.8.0) - Search tag in class org.mockito.Mockito
- Section
- 35. Custom verification failure message (Since 2.1.0) - Search tag in class org.mockito.Mockito
- Section
- Cache() - Constructor for class org.mockito.plugins.DoNotMockEnforcer.Cache
- call() - Method in interface org.mockito.invocation.InvocationFactory.RealMethodBehavior
- callRealMethod() - Method in interface org.mockito.invocation.InvocationOnMock
-
calls real method
- calls(int) - Static method in class org.mockito.Mockito
-
Allows non-greedy verification in order.
- CALLS_REAL_METHODS - Enum constant in enum org.mockito.Answers
-
An answer that calls the real methods (used for partial mocks).
- CALLS_REAL_METHODS - Static variable in class org.mockito.Mockito
-
Optional
Answer
to be used withMockito.mock(Class, Answer)
- CannotStubVoidMethodWithReturnValue - Exception Class in org.mockito.exceptions.misusing
- CannotStubVoidMethodWithReturnValue(String) - Constructor for exception class org.mockito.exceptions.misusing.CannotStubVoidMethodWithReturnValue
- CannotVerifyStubOnlyMock - Exception Class in org.mockito.exceptions.misusing
- CannotVerifyStubOnlyMock(String) - Constructor for exception class org.mockito.exceptions.misusing.CannotVerifyStubOnlyMock
- captor(U...) - Static method in class org.mockito.ArgumentCaptor
-
Build a new
ArgumentCaptor
by inferring the class type. - Captor - Annotation Type in org.mockito
-
Allows shorthand
ArgumentCaptor
creation on fields. - capture() - Method in class org.mockito.ArgumentCaptor
-
Use it to capture the argument.
- captureArgumentsFrom(Invocation) - Method in interface org.mockito.invocation.MatchableInvocation
-
This method is used by Mockito to implement argument captor functionality (see
ArgumentCaptor
. - charThat(Matcher<Character>) - Static method in class org.mockito.hamcrest.MockitoHamcrest
-
Enables integrating hamcrest matchers that match primitive
char
arguments. - charThat(ArgumentMatcher<Character>) - Static method in class org.mockito.ArgumentMatchers
-
Allows creating custom
char
argument matchers. - CheckReturnValue - Annotation Type in org.mockito
-
This annotation is not supposed to be used by Mockito end-users.
- checkTypeForDoNotMockViolation(Class<?>) - Method in interface org.mockito.plugins.DoNotMockEnforcer
-
Check whether this type is allowed to be mocked.
- checkTypeForDoNotMockViolation(MockCreationSettings<?>) - Method in interface org.mockito.plugins.DoNotMockEnforcer
-
Check whether this type is allowed to be mocked.
- checkTypeForDoNotMockViolation(MockCreationSettings<?>) - Method in interface org.mockito.plugins.DoNotMockEnforcerWithType
-
Check whether this type is allowed to be mocked.
- Cleaner tests without unnecessary stubs - Search tag in interface org.mockito.quality.MockitoHint
- Section
- cleansStackTrace() - Method in class org.mockito.configuration.DefaultMockitoConfiguration
- cleansStackTrace() - Method in interface org.mockito.configuration.IMockitoConfiguration
-
This should be turned on unless you're a Mockito developer and you wish to have verbose (read: messy) stack traces that only few understand (eg: Mockito developers)
- clearAllCaches() - Static method in class org.mockito.Mockito
-
Clears all mocks, type caches and instrumentations.
- clearAllCaches() - Method in interface org.mockito.plugins.MockMaker
-
Clears all cashes for mocked types and removes all byte code alterations, if possible.
- clearAllMocks() - Method in interface org.mockito.plugins.InlineMockMaker
-
Cleans up internal state for all existing mocks.
- clearInlineMock(Object) - Method in interface org.mockito.MockitoFramework
-
Clears up internal state of specific inline mock.
- clearInlineMocks() - Method in interface org.mockito.MockitoFramework
-
Clears up internal state of all inline mocks.
- clearInvocations() - Method in interface org.mockito.MockedStatic
- clearInvocations(T...) - Static method in class org.mockito.Mockito
-
Use this method in order to only clear invocations, when stubbing is non-trivial.
- clearMock(Object) - Method in interface org.mockito.plugins.InlineMockMaker
-
Clean up internal state for specified
mock
. - close() - Method in class org.mockito.plugins.AnnotationEngine.NoAction
- close() - Method in interface org.mockito.ScopedMock
-
Closes this scoped mock and throws an exception if already closed.
- closeOnDemand() - Method in interface org.mockito.ScopedMock
-
Releases this scoped mock and is non-operational if already released.
- cmpEq(T) - Static method in class org.mockito.AdditionalMatchers
-
comparable argument equals to the given value according to their compareTo method.
- collectAndReport() - Method in interface org.mockito.junit.VerificationCollector
-
Collect all lazily verified behaviour.
- collector() - Static method in class org.mockito.junit.MockitoJUnit
-
Creates a rule instance that can perform lazy verifications.
- constructed() - Method in interface org.mockito.MockedConstruction
-
Get the constructed mocks.
- constructor() - Method in interface org.mockito.MockedConstruction.Context
-
Get the constructor that is invoked during the mock creation.
- contains(String) - Static method in class org.mockito.ArgumentMatchers
-
String
argument that contains the given substring. - Contents - Search tag in class org.mockito.Mockito
- Section
- copySelfWithNewVerificationMode(VerificationMode) - Method in class org.mockito.verification.After
- copySelfWithNewVerificationMode(VerificationMode) - Method in class org.mockito.verification.Timeout
- createConstructionMock(Class<T>, Function<MockedConstruction.Context, MockCreationSettings<T>>, Function<MockedConstruction.Context, MockHandler<T>>, MockedConstruction.MockInitializer<T>) - Method in interface org.mockito.plugins.MockMaker
-
If you want to provide your own implementation of
MockMaker
this method should: Intercept all constructions of the specified type in the current thread Only intercept the construction after being enabled. Stops the interception when disabled. - createInvocation(Object, MockCreationSettings, Method, InvocationFactory.RealMethodBehavior, Object...) - Method in interface org.mockito.invocation.InvocationFactory
-
Creates instance of an
Invocation
object. - createMock(MockCreationSettings<T>, MockHandler) - Method in interface org.mockito.plugins.MockMaker
-
If you want to provide your own implementation of
MockMaker
this method should: Create a proxy object that implementssettings.typeToMock
and potentially alsosettings.extraInterfaces
. You may use the information fromsettings
to create/configure your proxy object. Your proxy object should carry thehandler
with it. - createSpy(MockCreationSettings<T>, MockHandler, T) - Method in interface org.mockito.plugins.MockMaker
-
By implementing this method, a mock maker can optionally support the creation of spies where all fields are set within a constructor.
- createStaticMock(Class<T>, MockCreationSettings<T>, MockHandler) - Method in interface org.mockito.plugins.MockMaker
-
If you want to provide your own implementation of
MockMaker
this method should: Alter the supplied class to only change its behavior in the current thread. Only alters the static method's behavior after being enabled. Stops the altered behavior when disabled. - Custom Argument ArgumentMatchers - Search tag in class org.mockito.ArgumentMatchers
- Section
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form