public class MockitoProvider extends Object implements MockProvider, SpyProvider
MockProvider
implementation. For more details, see
the Mockito documentation.Modifier and Type | Field and Description |
---|---|
static String |
SPY_ANNOTATION_FQN |
FAKE
Constructor and Description |
---|
MockitoProvider() |
Modifier and Type | Method and Description |
---|---|
<T> T |
createMockComponent(Class<T> type)
Creates a mock object of a given class or interface.
|
<T> T |
createSpyComponent(T instance)
Skipping creation, if the type is final or primitive.
|
Class<? extends Annotation> |
getSpyAnnotation() |
boolean |
isSpyRequested(Field field) |
public static final String SPY_ANNOTATION_FQN
public <T> T createMockComponent(Class<T> type)
createMockComponent
in interface MockProvider
type
- class or interface to mockpublic <T> T createSpyComponent(T instance)
createSpyComponent
in interface SpyProvider
public Class<? extends Annotation> getSpyAnnotation()
getSpyAnnotation
in interface SpyProvider
public boolean isSpyRequested(Field field)
isSpyRequested
in interface SpyProvider
Copyright © 2014. All rights reserved.