|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.easetech.easytest.util.ConfigContext
public final class ConfigContext
A context class for holding the Configuration beans declared by the user. This class provides a utility for the
EasyTest framework to identify a test bean declared using TestBean annotations inside a class that is
declared in the test class using TestConfigProvider
| Field Summary | |
|---|---|
static ThreadLocal<Map<String,Object>> |
beansByName
The threadlocal variable that is responsible for containing the bean name to object instance mapping |
static ThreadLocal<Map<Class,Object>> |
beansByType
The threadlocal variable that is responsible for containing the bean type to object instance mapping |
| Method Summary | |
|---|---|
static Object |
getBeanByName(String beanName)
Get the test bean by name. |
static Object |
getBeanByType(Class beanType)
Get the test bean by type |
static void |
setTestBeanByName(String beanName,
Object beanInstance)
Set the test bean in the thread local variable by name |
static void |
setTestBeanByType(Class beanType,
Object beanInstance)
Set the test bean in the threadlocal variable by type |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ThreadLocal<Map<String,Object>> beansByName
public static final ThreadLocal<Map<Class,Object>> beansByType
| Method Detail |
|---|
public static void setTestBeanByName(String beanName,
Object beanInstance)
beanName - the name of the beanbeanInstance - the instance to set
public static void setTestBeanByType(Class beanType,
Object beanInstance)
beanType - the type of the beanbeanInstance - the instance to setpublic static Object getBeanByName(String beanName)
beanName - the name of the bean to get value for
public static Object getBeanByType(Class beanType)
beanType - the type of bean to get
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||