Package | Description |
---|---|
org.powermock.api.mockito | |
org.powermock.api.mockito.internal | |
org.powermock.api.mockito.internal.expectation |
Modifier and Type | Method and Description |
---|---|
static PowerMockitoStubber |
PowerMockito.doAnswer(org.mockito.stubbing.Answer<?> answer)
Use doAnswer() when you want to stub a void method with generic
Answer . |
static PowerMockitoStubber |
PowerMockito.doCallRealMethod()
Use doCallRealMethod() when you want to call the real implementation of a
method.
|
static PowerMockitoStubber |
PowerMockito.doNothing()
Use doNothing() for setting void methods to do nothing.
|
static PowerMockitoStubber |
PowerMockito.doReturn(Object toBeReturned)
Use doReturn() in those rare occasions when you cannot use
Mockito.when(Object) . |
static PowerMockitoStubber |
PowerMockito.doThrow(Throwable toBeThrown)
Use doThrow() when you want to stub the void method with an exception.
|
Modifier and Type | Method and Description |
---|---|
PowerMockitoStubber |
PowerMockitoCore.doAnswer(org.mockito.stubbing.Answer answer) |
Modifier and Type | Class and Description |
---|---|
class |
PowerMockitoStubberImpl
Extension of the standard Mocktio stubber implementation that also support
PowerMockito created mocks.
|
Copyright © 2007–2015. All rights reserved.