Uses of Interface
org.mockito.stubbing.Stubber
-
Packages that use Stubber Package Description org.mockito Mockito is a mock library for java - see Mockito class for for usage.org.mockito.internal Internal classes, not to be used by clients.org.mockito.internal.stubbing Stubbing logic.org.mockito.stubbing External stubbing related classes -
-
Uses of Stubber in org.mockito
Methods 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. doThrow(java.lang.Class<? extends java.lang.Throwable> toBeThrown)UsedoThrow()when you want to stub the void method to throw exception of specified class.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)Deprecated. -
Uses of Stubber in org.mockito.internal
Methods in org.mockito.internal that return Stubber Modifier and Type Method Description StubberMockitoCore. doAnswer(Answer answer) -
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 StubberStubberImpl. doAnswer(Answer answer)StubberStubberImpl. doCallRealMethod()StubberStubberImpl. doNothing()StubberStubberImpl. doReturn(java.lang.Object toBeReturned)StubberStubberImpl. doThrow(java.lang.Class<? extends java.lang.Throwable> toBeThrown)StubberStubberImpl. doThrow(java.lang.Throwable toBeThrown) -
Uses of Stubber in org.mockito.stubbing
Methods in org.mockito.stubbing that return Stubber Modifier and Type Method Description StubberStubber. doAnswer(Answer answer)Use it for stubbing consecutive calls inMockito.doAnswer(Answer)style:StubberStubber. doCallRealMethod()Use it for stubbing consecutive calls inMockito.doCallRealMethod()style.StubberStubber. doNothing()Use it for stubbing consecutive calls inMockito.doNothing()style:StubberStubber. doReturn(java.lang.Object toBeReturned)Use it for stubbing consecutive calls inMockito.doReturn(Object)style.StubberStubber. doThrow(java.lang.Class<? extends java.lang.Throwable> toBeThrown)Use it for stubbing consecutive calls inMockito.doThrow(Class)style:StubberStubber. doThrow(java.lang.Throwable toBeThrown)Use it for stubbing consecutive calls inMockito.doThrow(Throwable)style:
-