Uses of Interface
org.mockito.stubbing.Stubber
Packages that use Stubber
Package
Description
Mockito is a mock library for java - see
Mockito
class for usage.Internal classes, not to be used by clients.
Stubbing logic.
Stubbing related classes.
-
Uses of Stubber in org.mockito
Fields in org.mockito declared as StubberMethods in org.mockito that return StubberModifier and TypeMethodDescriptionstatic Stubber
UsedoAnswer()
when you want to stub a void method with genericAnswer
.static Stubber
Mockito.doCallRealMethod()
UsedoCallRealMethod()
when you want to call the real implementation of a method.static Stubber
Mockito.doNothing()
UsedoNothing()
for setting void methods to do nothing.static Stubber
UsedoReturn()
in those rare occasions when you cannot useMockito.when(Object)
.static Stubber
Same asMockito.doReturn(Object)
but sets consecutive values to be returned.static Stubber
UsedoThrow()
when you want to stub the void method with an exception.static Stubber
Mockito.doThrow
(Class<? extends Throwable> toBeThrown, Class<? extends Throwable>... toBeThrownNext) Same asMockito.doThrow(Class)
but sets consecutive exception classes to be thrown.static Stubber
UsedoThrow()
when you want to stub the void method with an exception.Constructors in org.mockito with parameters of type Stubber -
Uses of Stubber in org.mockito.internal
Methods in org.mockito.internal that return StubberModifier and TypeMethodDescriptionMockitoCore.stubber()
MockitoCore.stubber
(Strictness strictness) -
Uses of Stubber in org.mockito.internal.stubbing
Classes in org.mockito.internal.stubbing that implement StubberMethods in org.mockito.internal.stubbing that return StubberModifier and TypeMethodDescriptionDefaultLenientStubber.doCallRealMethod()
StubberImpl.doCallRealMethod()
DefaultLenientStubber.doNothing()
StubberImpl.doNothing()
DefaultLenientStubber.doThrow
(Class<? extends Throwable> toBeThrown, Class<? extends Throwable>... nextToBeThrown) StubberImpl.doThrow
(Class<? extends Throwable> toBeThrown, Class<? extends Throwable>... nextToBeThrown) private static Stubber
DefaultLenientStubber.stubber()
-
Uses of Stubber in org.mockito.stubbing
Methods in org.mockito.stubbing that return StubberModifier and TypeMethodDescriptionUse it for stubbing consecutive calls inMockito.doAnswer(Answer)
style:BaseStubber.doCallRealMethod()
Use it for stubbing consecutive calls inMockito.doCallRealMethod()
style.BaseStubber.doNothing()
Use it for stubbing consecutive calls inMockito.doNothing()
style:Use it for stubbing consecutive calls inMockito.doReturn(Object)
style.Use it for stubbing consecutive calls inMockito.doReturn(Object)
style.Use it for stubbing consecutive calls inMockito.doThrow(Class)
style:BaseStubber.doThrow
(Class<? extends Throwable> toBeThrown, Class<? extends Throwable>... nextToBeThrown) Use it for stubbing consecutive calls inMockito.doThrow(Class)
style:Use it for stubbing consecutive calls inMockito.doThrow(Throwable[])
style: