Uses of Interface
org.mockito.stubbing.Stubber
-
Packages that use Stubber Package Description org.mockito Mockito is a mock library for java - seeMockitoclass for usage.org.mockito.internal Internal classes, not to be used by clients.org.mockito.internal.stubbing Stubbing logic.org.mockito.stubbing Stubbing related classes. -
-
Uses of Stubber in org.mockito
Fields in org.mockito declared as Stubber Modifier and Type Field Description private StubberBDDMockito.BDDStubberImpl. mockitoStubberMethods in org.mockito that return Stubber Modifier and Type Method Description static StubberMockito. doAnswer(Answer answer)UsedoAnswer()when you want to stub a void method with genericAnswer.static StubberMockito. doCallRealMethod()UsedoCallRealMethod()when you want to call the real implementation of a method.static StubberMockito. doNothing()UsedoNothing()for setting void methods to do nothing.static StubberMockito. doReturn(java.lang.Object toBeReturned)UsedoReturn()in those rare occasions when you cannot useMockito.when(Object).static StubberMockito. doReturn(java.lang.Object toBeReturned, java.lang.Object... toBeReturnedNext)Same asMockito.doReturn(Object)but sets consecutive values to be returned.static StubberMockito. doThrow(java.lang.Class<? extends java.lang.Throwable> toBeThrown)UsedoThrow()when you want to stub the void method with an exception.static StubberMockito. doThrow(java.lang.Class<? extends java.lang.Throwable> toBeThrown, java.lang.Class<? extends java.lang.Throwable>... toBeThrownNext)Same asMockito.doThrow(Class)but sets consecutive exception classes to be thrown.static StubberMockito. doThrow(java.lang.Throwable... toBeThrown)UsedoThrow()when you want to stub the void method with an exception.Constructors in org.mockito with parameters of type Stubber Constructor Description BDDStubberImpl(Stubber mockitoStubber) -
Uses of Stubber in org.mockito.internal
Methods in org.mockito.internal that return Stubber Modifier and Type Method Description StubberMockitoCore. stubber()StubberMockitoCore. stubber(Strictness strictness) -
Uses of Stubber in org.mockito.internal.stubbing
Classes in org.mockito.internal.stubbing that implement Stubber Modifier and Type Class Description classStubberImplMethods in org.mockito.internal.stubbing that return Stubber Modifier and Type Method Description StubberDefaultLenientStubber. doAnswer(Answer answer)StubberStubberImpl. doAnswer(Answer answer)StubberDefaultLenientStubber. doCallRealMethod()StubberStubberImpl. doCallRealMethod()StubberDefaultLenientStubber. doNothing()StubberStubberImpl. doNothing()StubberDefaultLenientStubber. doReturn(java.lang.Object toBeReturned)StubberDefaultLenientStubber. doReturn(java.lang.Object toBeReturned, java.lang.Object... nextToBeReturned)StubberStubberImpl. doReturn(java.lang.Object toBeReturned)StubberStubberImpl. doReturn(java.lang.Object toBeReturned, java.lang.Object... nextToBeReturned)StubberDefaultLenientStubber. doThrow(java.lang.Class<? extends java.lang.Throwable> toBeThrown)StubberDefaultLenientStubber. doThrow(java.lang.Class<? extends java.lang.Throwable> toBeThrown, java.lang.Class<? extends java.lang.Throwable>... nextToBeThrown)StubberDefaultLenientStubber. doThrow(java.lang.Throwable... toBeThrown)StubberStubberImpl. doThrow(java.lang.Class<? extends java.lang.Throwable> toBeThrown)StubberStubberImpl. doThrow(java.lang.Class<? extends java.lang.Throwable> toBeThrown, java.lang.Class<? extends java.lang.Throwable>... nextToBeThrown)StubberStubberImpl. doThrow(java.lang.Throwable... toBeThrown)private static StubberDefaultLenientStubber. stubber() -
Uses of Stubber in org.mockito.stubbing
Methods in org.mockito.stubbing that return Stubber Modifier and Type Method Description StubberBaseStubber. doAnswer(Answer answer)Use it for stubbing consecutive calls inMockito.doAnswer(Answer)style:StubberBaseStubber. doCallRealMethod()Use it for stubbing consecutive calls inMockito.doCallRealMethod()style.StubberBaseStubber. doNothing()Use it for stubbing consecutive calls inMockito.doNothing()style:StubberBaseStubber. doReturn(java.lang.Object toBeReturned)Use it for stubbing consecutive calls inMockito.doReturn(Object)style.StubberBaseStubber. doReturn(java.lang.Object toBeReturned, java.lang.Object... nextToBeReturned)Use it for stubbing consecutive calls inMockito.doReturn(Object)style.StubberBaseStubber. doThrow(java.lang.Class<? extends java.lang.Throwable> toBeThrown)Use it for stubbing consecutive calls inMockito.doThrow(Class)style:StubberBaseStubber. doThrow(java.lang.Class<? extends java.lang.Throwable> toBeThrown, java.lang.Class<? extends java.lang.Throwable>... nextToBeThrown)Use it for stubbing consecutive calls inMockito.doThrow(Class)style:StubberBaseStubber. doThrow(java.lang.Throwable... toBeThrown)Use it for stubbing consecutive calls inMockito.doThrow(Throwable[])style:
-