com.atlassian.bamboo.testutils.spring
Class SpringTestHelper

java.lang.Object
  extended by com.atlassian.bamboo.testutils.spring.SpringTestHelper

public class SpringTestHelper
extends java.lang.Object


Constructor Summary
SpringTestHelper()
           
 
Method Summary
static
<T> T
mockSpringComponent(java.lang.String componentKey, java.lang.Class<T> componentClass)
          Mock a component that could be accessed by ComponentAccessor or ContainerManager.
static void mockSpringComponent(java.lang.String componentKey, java.lang.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
 

Constructor Detail

SpringTestHelper

public SpringTestHelper()
Method Detail

mockSpringComponent

public static <T> T mockSpringComponent(@NotNull
                                        java.lang.String componentKey,
                                        java.lang.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 component
componentClass - class of component

mockSpringComponent

public static void mockSpringComponent(@NotNull
                                       java.lang.String componentKey,
                                       java.lang.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 component
componentInstance - component itself


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.