com.atlassian.jira.mock.component
Class MockComponentWorker
java.lang.Object
com.atlassian.jira.mock.component.MockComponentWorker
- All Implemented Interfaces:
- ComponentAccessor.Worker
public class MockComponentWorker
- extends Object
- implements ComponentAccessor.Worker
This component worker can be used with the component accessor, return mock instances of
components for unit testing.
- Since:
- v4.4
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockComponentWorker
public MockComponentWorker()
registerMock
public <T,U extends T> void registerMock(Class<T> componentInterface,
U componentMock)
addMock
public <T,U extends T> MockComponentWorker addMock(Class<T> componentInterface,
U componentMock)
getComponent
public <T> T getComponent(Class<T> componentClass)
- Specified by:
getComponent
in interface ComponentAccessor.Worker
getComponentOfType
public <T> T getComponentOfType(Class<T> componentClass)
- Specified by:
getComponentOfType
in interface ComponentAccessor.Worker
getOSGiComponentInstanceOfType
public <T> T getOSGiComponentInstanceOfType(Class<T> componentClass)
- Specified by:
getOSGiComponentInstanceOfType
in interface ComponentAccessor.Worker
getFieldAccessor
public FieldAccessor getFieldAccessor()
- Specified by:
getFieldAccessor
in interface ComponentAccessor.Worker
Copyright © 2002-2012 Atlassian. All Rights Reserved.