public class MockComponentContainerBase extends Object
Constructor and Description |
---|
MockComponentContainerBase() |
Modifier and Type | Method and Description |
---|---|
void |
addAnnotatedMocks(Object... testInstances) |
<I,C extends I> |
addMock(Class<I> componentInterface,
C mockComponentImplementation) |
<I,C extends I> |
addMockComponent(Class<I> componentInterface,
C mockComponentImplementation) |
void |
addToContainer(Object mock,
AvailableInContainer annotation,
String fieldName) |
static List<Field> |
getAllDeclaredFields(Class clazz)
Class.getDeclaredFields() does not walk the class hierarchy. |
Class<?> |
getClassExcludingCrap(Object mock) |
List<Class<?>> |
getInterfacesExcludingCrap(Object mock)
Mockito mocks are awesome, except implemeting some crappy marker interface :P
|
MockComponentWorker |
getMockWorker() |
Object |
instantiateAndSet(Object testInstance,
Field field) |
public <I,C extends I> MockComponentContainerBase addMockComponent(Class<I> componentInterface, C mockComponentImplementation)
public <I,C extends I> MockComponentContainerBase addMock(Class<I> componentInterface, C mockComponentImplementation)
public void addAnnotatedMocks(Object... testInstances)
public void addToContainer(Object mock, AvailableInContainer annotation, String fieldName)
public List<Class<?>> getInterfacesExcludingCrap(Object mock)
mock
- a mockpublic static List<Field> getAllDeclaredFields(Class clazz)
Class.getDeclaredFields()
does not walk the class hierarchy.clazz
- the child classpublic MockComponentWorker getMockWorker()
Copyright © 2002-2023 Atlassian. All Rights Reserved.