- defaultAnswer(Answer) - Method in interface org.mockito.MockSettings
-
Specifies default answers to interactions.
- DefaultMockitoConfiguration - Class in org.mockito.configuration
-
DefaultConfiguration of Mockito framework
- DefaultMockitoConfiguration() - Constructor for class org.mockito.configuration.DefaultMockitoConfiguration
-
- delegatesTo(Object) - Static method in class org.mockito.AdditionalAnswers
-
An answer that directly forwards the calls to the delegate.
- DescribedInvocation - Interface in org.mockito.invocation
-
Provides information about the invocation, specifically a human readable description and the location.
- description(String) - Static method in class org.mockito.Mockito
-
Adds a description to be printed if verification fails.
- description(String) - Method in interface org.mockito.verification.VerificationMode
-
Description will be prepended to the assertion error if verification fails.
- disable() - Method in interface org.mockito.plugins.MockMaker.ConstructionMockControl
-
- disable() - Method in interface org.mockito.plugins.MockMaker.StaticMockControl
-
- doAnswer(Answer) - Static method in class org.mockito.Mockito
-
Use
doAnswer()
when you want to stub a void method with generic
Answer
.
- doAnswer(Answer) - Method in interface org.mockito.stubbing.BaseStubber
-
- doCallRealMethod() - Static method in class org.mockito.Mockito
-
Use doCallRealMethod()
when you want to call the real implementation of a method.
- doCallRealMethod() - Method in interface org.mockito.stubbing.BaseStubber
-
- doNothing() - Static method in class org.mockito.Mockito
-
Use doNothing()
for setting void methods to do nothing.
- doNothing() - Method in interface org.mockito.stubbing.BaseStubber
-
- DoNotMock - Annotation Type in org.mockito
-
Annotation representing a type that should not be mocked.
- DoNotMockEnforcer - Interface in org.mockito.plugins
-
Enforcer that is applied to every type in the type hierarchy of the class-to-be-mocked.
- DoNotMockException - Exception in org.mockito.exceptions.misusing
-
Thrown when attempting to mock a class that is annotated with
DoNotMock
.
- DoNotMockException(String) - Constructor for exception org.mockito.exceptions.misusing.DoNotMockException
-
- doReturn(Object) - Static method in class org.mockito.Mockito
-
- doReturn(Object, Object...) - Static method in class org.mockito.Mockito
-
- doReturn(Object) - Method in interface org.mockito.stubbing.BaseStubber
-
- doReturn(Object, Object...) - Method in interface org.mockito.stubbing.BaseStubber
-
- doThrow(Throwable...) - Static method in class org.mockito.Mockito
-
Use doThrow()
when you want to stub the void method with an exception.
- doThrow(Class<? extends Throwable>) - Static method in class org.mockito.Mockito
-
Use doThrow()
when you want to stub the void method with an exception.
- doThrow(Class<? extends Throwable>, Class<? extends Throwable>...) - Static method in class org.mockito.Mockito
-
- doThrow(Throwable...) - Method in interface org.mockito.stubbing.BaseStubber
-
- doThrow(Class<? extends Throwable>) - Method in interface org.mockito.stubbing.BaseStubber
-
- doThrow(Class<? extends Throwable>, Class<? extends Throwable>...) - Method in interface org.mockito.stubbing.BaseStubber
-
- doubleThat(ArgumentMatcher<Double>) - Static method in class org.mockito.ArgumentMatchers
-
Allows creating custom double
argument matchers.
- doubleThat(Matcher<Double>) - Static method in class org.mockito.hamcrest.MockitoHamcrest
-
Enables integrating hamcrest matchers that match primitive double
arguments.