com.atlassian.bamboo.testutils.spring
Class SpringTestHelper
java.lang.Object
com.atlassian.bamboo.testutils.spring.SpringTestHelper
public class SpringTestHelper
- extends Object
Method Summary |
static
|
mockSpringComponent(String componentKey,
Class<T> componentClass)
Mock a component that could be accessed by ComponentAccessor or ContainerManager. |
static void |
mockSpringComponent(String componentKey,
Object componentInstance)
Mock a component that could be accessed by ComponentAccessor or ContainerManager. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpringTestHelper
public SpringTestHelper()
mockSpringComponent
public static <T> T mockSpringComponent(@NotNull
String componentKey,
Class<T> componentClass)
- Mock a component that could be accessed by ComponentAccessor or ContainerManager.
This will not work if real Spring context has been setup.
- Parameters:
componentKey
- key of the componentcomponentClass
- class of component
mockSpringComponent
public static void mockSpringComponent(@NotNull
String componentKey,
Object componentInstance)
- Mock a component that could be accessed by ComponentAccessor or ContainerManager.
This will not work if real Spring context has been setup.
- Parameters:
componentKey
- key of the componentcomponentInstance
- component itself
Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.